Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
161ce0e
refactor(frontend): clean up and restructure app
dklOrdix May 4, 2026
d2de208
fix: add lint:fix script to package.json and clean up trailing comma …
dklOrdix May 4, 2026
c81b4d0
docs: update AGENTS.md to include Material UI icon library usage
dklOrdix May 4, 2026
9add069
refactor(header): move components for header into own directory
dklOrdix May 4, 2026
8343022
chore: dedupe lockfile
dklOrdix May 4, 2026
4bc8e93
fix(sidebar): add hover cursor style to toggle button
dklOrdix May 4, 2026
952dc80
chore(types): centralise navigation and auth types; update header/sid…
dklOrdix May 4, 2026
cba7866
feat(storage): initial Filebrowser UI implementation
dklOrdix May 6, 2026
5de8d9f
refactor(storage): extract service layer and consolidate storage type…
dklOrdix May 6, 2026
20909ae
Merge branch 'feat/s3-file-browser' into feat/s3-file-browser-ui
dklOrdix May 6, 2026
2b33533
chore(storage): remove outdated STORAGE_REORG_PLAN.md
dklOrdix May 6, 2026
aeac85d
fix(lint): resolve errors
dklOrdix May 6, 2026
f2ba284
refactor(tests): update ThemeToggle tests to use checkbox role
dklOrdix May 6, 2026
af9b651
style: format code
dklOrdix May 6, 2026
8373974
fix(tests): update theme toggle role from button to checkbox
dklOrdix May 6, 2026
7aff59b
fix: revert changes to Theme Toggle
dklOrdix May 6, 2026
266a045
fix: revert changes to Theme Toggle
dklOrdix May 6, 2026
805f693
Merge pull request #90 from stackabletech/feat/s3-file-browser-ui
dklOrdix May 6, 2026
3386182
#80 use pagination controls to navigate the file browser
F3l1x1vo May 7, 2026
b77bcfa
#80 show page counter for pagination control
F3l1x1vo May 7, 2026
48b552e
#80 fix lint and svelte check
F3l1x1vo May 7, 2026
7c9733f
fix lint error
F3l1x1vo May 7, 2026
9d85f57
Merge pull request #100 from stackabletech/feat/s3-file-browser-pagin…
F3l1x1vo May 7, 2026
b4e25ec
File Browser: Feature Flag (#105)
F3l1x1vo May 8, 2026
c36f1c8
Rename option STACKABLE_UI_COMPLETION_DISABLED (#106)
F3l1x1vo May 8, 2026
ff43b22
S3 File Browser: Shared Pagination Component (#103)
F3l1x1vo May 8, 2026
ed9be69
Merge branch 'main' into feat/s3-file-browser
dklOrdix May 11, 2026
21bb0f2
#93 S3 File Browser: Document Preview (#113)
F3l1x1vo May 11, 2026
184fa84
Feat/s3 file browser refactor object table (#120)
dklOrdix May 12, 2026
8886814
#91 - Feat/s3 filebrowser downloads (#116)
dklOrdix May 12, 2026
d8e7d2a
#121 check multiselect checkbox on ctrl click to enable multiselect (…
F3l1x1vo May 12, 2026
3f5231b
#144 remove trailing slash on directory name
F3l1x1vo May 19, 2026
5f8c739
#94 S3 File Browser: Delete Action (#137)
F3l1x1vo May 19, 2026
0342366
#118 S3 File Browser: Pinned and Recent Access (#126)
F3l1x1vo May 19, 2026
079cee9
#140 Add tooltips to BucketList (#145)
dklOrdix May 19, 2026
567da57
#108 Store S3 Bucket Credentials in localStorage (#117)
F3l1x1vo May 19, 2026
7625c66
#146 Bugfix: Deleting Directories (#147)
F3l1x1vo May 20, 2026
45f61ef
#138 add svelte best practices (#139)
F3l1x1vo May 20, 2026
d7ed9d0
chore: remove package duplicates with npm dedupe
dklOrdix May 20, 2026
1b37cfd
feat: Add support for path-style and VirtualHosted addressing in S3 c…
dklOrdix May 20, 2026
110d588
#92 S3 File Browser: Upload (#141)
dklOrdix May 20, 2026
b02c803
chore: remove package duplicates with npm dedupe
dklOrdix May 20, 2026
98500e5
#130 improve various ux issues from this ticket (#150)
F3l1x1vo May 21, 2026
7d50dbd
Filebrowser: Refactor Filebrowser by using global state (#163)
dklOrdix May 27, 2026
2d81027
#135 Add s3 Garage instance for e2e tests (#162)
F3l1x1vo May 29, 2026
134b88f
#135 Add E2E Tests to S3 File Browser (#166)
F3l1x1vo Jun 1, 2026
b6ab288
#93 fix non translated error message, #89 remove unnecessary key handler
F3l1x1vo Jun 1, 2026
d3aecd6
Feat/add component tests (#170)
dklOrdix Jun 2, 2026
6ac766e
#94 #118 bugfix deleting a path removes it from recent access (#174)
F3l1x1vo Jun 2, 2026
4daae3a
#154 Add Refresh Button (#169)
F3l1x1vo Jun 2, 2026
de1aa62
#127 Env Variables for Preview Limits, Recent Items, Page Size (#177)
F3l1x1vo Jun 2, 2026
c14d734
Merge remote-tracking branch 'origin/main' into feat/s3-file-browser
dklOrdix Jun 2, 2026
bf13b71
#185 move saved s3 connection from backend to frontend
F3l1x1vo Jun 2, 2026
6ea6b16
#185 update e2e tests for browser connections
F3l1x1vo Jun 3, 2026
c07a3bc
#185 fix unit test
F3l1x1vo Jun 3, 2026
3dbcd2b
#185 fix lint
F3l1x1vo Jun 3, 2026
028b416
Filebrowser: Rename Stackable UI to Stackable Cockpit (#191)
F3l1x1vo Jun 3, 2026
99e7d62
#185 move request handling to middleware
F3l1x1vo Jun 3, 2026
b7197b7
Merge branch 'feat/file-browser-save-connection-in-browser' into refa…
dklOrdix Jun 3, 2026
e4b8b84
refactor: move service logic into StorageProvider interface and imple…
dklOrdix Jun 3, 2026
54971d2
merge: origin/feat/file-browser-save-connection-in-browser — use loca…
dklOrdix Jun 3, 2026
739fbdb
refactor: rename listBuckets to listContainers across storage provide…
dklOrdix Jun 8, 2026
265654a
refactor: centralize S3 error handling with withS3Errors function
dklOrdix Jun 8, 2026
f8e7f2d
#185 Save Connection in Browser (#189)
F3l1x1vo Jun 9, 2026
f2b9111
Merge branch 'feat/s3-file-browser' into refactor/service-into-storag…
dklOrdix Jun 9, 2026
80b75d5
#79 implement all requested changes
F3l1x1vo Jun 16, 2026
d82cbe1
Merge origin/main into feat/s3-file-browser
Copilot Jun 16, 2026
9abd491
#79 revert remove mobile e2e tests, fix mobile tests
F3l1x1vo Jun 16, 2026
dae8f8e
feat(database): integrate Drizzle ORM with PostgreSQL 18 (#200)
dklOrdix Jun 18, 2026
7878805
Merge branch 'feat/s3-file-browser' into feat/s3-file-browser-v1
dklOrdix Jun 18, 2026
04758db
Feat/more file icons (#197)
dklOrdix Jun 18, 2026
f390bb7
#98 simplified garage access key retrieval
F3l1x1vo Jun 22, 2026
7902156
fix format on templates
F3l1x1vo Jun 23, 2026
78b6446
#98 fix limiting deleting keys, reset pagination on bucket switch
F3l1x1vo Jun 23, 2026
bf20c7c
#98 fix pagination inside the same bucket
F3l1x1vo Jun 23, 2026
87f9a1c
add svelte check to lint command
F3l1x1vo Jun 23, 2026
44791d0
#153 Allow Upload of Empty Files (#171)
F3l1x1vo Jun 23, 2026
d8d9d68
Merge remote-tracking branch 'origin/feat/s3-file-browser' into feat/…
Copilot Jun 24, 2026
9a96d47
update lock
F3l1x1vo Jun 24, 2026
b7aad81
#98 swap order of action and selection bar
F3l1x1vo Jun 25, 2026
17ed09c
#98 allow for resizing sidebar
F3l1x1vo Jun 25, 2026
e0c6aa0
#98 add copy path and full path actions
F3l1x1vo Jun 25, 2026
079638e
#98 close modals by clicking outside of them
F3l1x1vo Jun 25, 2026
0a4f465
#98 add disconnect confirmation box
F3l1x1vo Jun 25, 2026
433a41f
#98 move api paths to /<app>/api
F3l1x1vo Jun 25, 2026
42709ea
#98 add skip and replace all buttons for upload conflicts
F3l1x1vo Jun 25, 2026
cbe1c15
#98 fix trino unit tests, limit upload concurrency, fix sidebar z index
F3l1x1vo Jun 25, 2026
047ccb8
#98 fix e2e tests
F3l1x1vo Jun 25, 2026
1a66e94
Merge remote-tracking branch 'origin/feat/s3-file-browser' into feat/…
Copilot Jun 25, 2026
b33923b
rebuild server for e2e tests
F3l1x1vo Jun 29, 2026
c636494
Add code editor (#209)
F3l1x1vo Jun 29, 2026
58e4b9c
Add minor visual improvements (#205)
F3l1x1vo Jun 29, 2026
80e7aa6
Feat/s3 file browser preview parquet (#202)
F3l1x1vo Jun 29, 2026
2463e0d
S3 File Browser: Tab View (#178)
F3l1x1vo Jun 29, 2026
6397e0d
fix unconfirmed save button size
F3l1x1vo Jun 29, 2026
d06fba7
Feat/s3 file browser csv zip preview (#203)
F3l1x1vo Jul 1, 2026
d75bf31
#98 add possible checksum calculation to s3 client
F3l1x1vo Jul 1, 2026
f476802
fix unit test
F3l1x1vo Jul 1, 2026
5835bef
#98 fix e2e tests
F3l1x1vo Jul 2, 2026
afd6b7d
fix e2e test, add error message for copy file path
F3l1x1vo Jul 2, 2026
a7f9ffa
Feat/connection editing (#227)
dklOrdix Jul 7, 2026
21e7cbb
Merge branch 'main' into feat/s3-file-browser
dklOrdix Jul 7, 2026
4c1c13e
Merge branch 'feat/s3-file-browser' into feat/s3-file-browser-v1
dklOrdix Jul 7, 2026
1ad6b09
fix: e2e tests
dklOrdix Jul 7, 2026
b48ea63
Merge branch 'feat/s3-file-browser' into feat/s3-file-browser-v1
dklOrdix Jul 7, 2026
f1937bf
#98 add possible checksum calculation to s3 client
F3l1x1vo Jul 1, 2026
d4d177d
fix unit test
F3l1x1vo Jul 1, 2026
5e8635e
#98 fix text truncation, use env for csv max rows, clamp page size
F3l1x1vo Jul 10, 2026
9026983
#98 fix multi select behavior, add image preview limit fallback
F3l1x1vo Jul 10, 2026
f4de415
#98 limit max columns in CSV preview
F3l1x1vo Jul 10, 2026
7e49fa0
fix e2e test, fix replacement character in text editor due to truncation
F3l1x1vo Jul 10, 2026
80ef600
#98 allow overwrites again
F3l1x1vo Jul 13, 2026
f443c9b
#98 fix text preview of binary files
F3l1x1vo Jul 13, 2026
e830d33
#98 csv max columns use feature flag instead of magic number
F3l1x1vo Jul 13, 2026
c2ce945
move tooltips to own component, add orientation, add tooltips to stor…
F3l1x1vo Jul 13, 2026
38e4317
#208 show different connection error messages
F3l1x1vo Jul 13, 2026
5e6c5be
minor spelling change
F3l1x1vo Jul 13, 2026
7ba94c0
fix unit tests
F3l1x1vo Jul 13, 2026
eee9036
fix lint
F3l1x1vo Jul 13, 2026
a78e19d
Refactor/migrate to db (#221)
dklOrdix Jul 14, 2026
1f35d8b
#233 Add JSON Preview via Prettify Processing (#241)
F3l1x1vo Jul 14, 2026
40f3698
#222 add infinite scrolling to CSV, add feature flag for infinite scr…
F3l1x1vo Jul 14, 2026
52d3a60
Feat/s3 file browser copy move rename (#228)
F3l1x1vo Jul 15, 2026
98e5d41
Feat/s3 file browser details pane (#237)
F3l1x1vo Jul 15, 2026
a490fa2
fix: redirect to /storage from bucket page when no active connection …
dklOrdix Jul 15, 2026
34757b4
Filebrowser: Support users explicitly stating S3 bucket names (#186)
dklOrdix Jul 15, 2026
3449abb
Merge branch 'feat/s3-file-browser' into feat/s3-file-browser-v1
dklOrdix Jul 22, 2026
69684f4
Refactor v1 (#247)
dklOrdix Jul 22, 2026
9f19563
refactor: modularize dev setup script and improve logging (#246)
dklOrdix Jul 22, 2026
747be6c
Update Tests to current Feature Set (#256)
F3l1x1vo Jul 24, 2026
b195deb
#223 add copy name and path actions to tab and breadcrumb context men…
F3l1x1vo Jul 24, 2026
4cec1c9
Fix loading error states in storage UI (#259)
dklOrdix Jul 27, 2026
785f253
Keep tabs after page reload (#258)
F3l1x1vo Jul 27, 2026
86f9fcb
#220 #236 bind keys to font size inside code editor, add select all f…
F3l1x1vo Jul 29, 2026
df8629e
CSV column horizontal scrolling (#261)
F3l1x1vo Jul 29, 2026
fcf7bde
fix unicode quotes
F3l1x1vo Jul 31, 2026
208310e
Fitness Function (updated) (#267)
F3l1x1vo Aug 4, 2026
b2e3901
Merge branch 'origin/main' into feat/s3-file-browser-v1
F3l1x1vo Aug 6, 2026
c4d043b
fix saving newly created files
F3l1x1vo Aug 10, 2026
286a7fb
open connection options on right click as well as button
F3l1x1vo Aug 10, 2026
db0dcea
Add loading bar, use prefetch on main navigation (#285)
F3l1x1vo Aug 13, 2026
4ac24e7
#224 add tooltips to many locations (#286)
F3l1x1vo Aug 13, 2026
ea867b6
#208 fix actions tooltip, show parquet line number only on data tab
F3l1x1vo Aug 31, 2026
416e78c
use tabs by default, fix tooltips, rename storage routes, operations …
F3l1x1vo Aug 31, 2026
f9bd54d
fix tab and bucket switching behavior
F3l1x1vo Aug 31, 2026
c3da477
Merge branch 'main' into feat/s3-file-browser-v1
F3l1x1vo Aug 31, 2026
6737272
remove close button
F3l1x1vo Aug 31, 2026
f29eedf
fix lint
F3l1x1vo Aug 31, 2026
b0ada4c
fix history.pushState
F3l1x1vo Aug 31, 2026
84df7be
add nvm version
F3l1x1vo Aug 31, 2026
297fcc6
fix unit and e2e tests
F3l1x1vo Sep 2, 2026
aac2e50
Merge branch 'main' into feat/s3-file-browser-v1
F3l1x1vo Sep 2, 2026
b828fb6
remove mobile e2e test config
F3l1x1vo Sep 3, 2026
4f42efb
fix e2e tests
F3l1x1vo Sep 3, 2026
e53d280
Merge branch 'main' into feat/s3-file-browser-v1
F3l1x1vo Sep 4, 2026
22bbf4c
Merge branch 'main' into feat/s3-file-browser-v1
F3l1x1vo Sep 4, 2026
cc88897
Merge origin/main into feat/s3-file-browser-v1
F3l1x1vo Sep 4, 2026
cb1eec5
Merge branch 'main' into feat/s3-file-browser-v1
F3l1x1vo Sep 4, 2026
cc979f0
Merge branch 'main' into feat/s3-file-browser-v1
F3l1x1vo Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,14 @@ STACKABLE_COCKPIT_OIDC_CLIENT_SECRET=your-client-secret
# Feature flags
# STACKABLE_COCKPIT_COMPLETION_ENABLED=false # Disable SQL editor code completion (default: true)
# STACKABLE_COCKPIT_STORAGE_BROWSER_ENABLED=true # Enable S3/HDFS file browser (default: false)
# STACKABLE_COCKPIT_ARCHIVE_PREVIEW_MAX_MB=100 # Max decompressed size for archive preview in megabytes (default: 100)
# STACKABLE_COCKPIT_PARQUET_PREVIEW_DISALLOWED_COMPRESSION_TYPES=gzip-no_offset # Comma-separated list of compression types to disallow from parquet data preview (default: "gzip-no_offset")
# PUBLIC_STACKABLE_COCKPIT_STORAGE_AUTO_CONNECT_TIMEOUT_MS=15000 # Auto-connect to last used storage after this many milliseconds (default: 15000)
# PUBLIC_STACKABLE_COCKPIT_STORAGE_RESTORE_TABS=true # File browser: continue where you left off — restore open tabs from the last session (default: false)
# PUBLIC_STACKABLE_COCKPIT_MAX_EDITABLE_FILE_SIZE=1048576 # Max file size (in bytes) of editable text files in the storage browser (default: 5 MiB)
# PUBLIC_STACKABLE_COCKPIT_UPLOAD_CONCURRENCY=3 # Maximum number of concurrent file uploads (default: 3)
# PUBLIC_STACKABLE_COCKPIT_INFINITE_SCROLL_ENABLED=true # Enable infinite scroll in the storage browser (default: true)
# PUBLIC_STACKABLE_COCKPIT_STORAGE_CUT_COPY_ENABLED=true # Enables cut/copy/paste functionality in the storage browser (default: false)
# PUBLIC_STACKABLE_COCKPIT_STORAGE_PASTE_ENABLED=true # Enables paste functionality in the storage browser (default: false)
# PUBLIC_STACKABLE_COCKPIT_STORAGE_RENAME_ENABLED=true # Enables rename functionality in the storage browser (default: false)
# PUBLIC_STACKABLE_COCKPIT_STORAGE_MOVE_ENABLED=true # Enables move functionality in the storage browser (default: false)
11 changes: 11 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ STACKABLE_COCKPIT_IMAGE_PREVIEW_BYTES=5242880
STACKABLE_COCKPIT_PDF_PREVIEW_BYTES=26214400
STACKABLE_COCKPIT_FILE_PREVIEW_ROWS=250
STACKABLE_COCKPIT_FILE_PREVIEW_COLUMNS=50
STACKABLE_COCKPIT_PARQUET_PREVIEW_DISALLOWED_COMPRESSION_TYPES=gzip-no_offset
PUBLIC_STACKABLE_COCKPIT_STORAGE_AUTO_CONNECT=true
PUBLIC_STACKABLE_COCKPIT_STORAGE_RESTORE_TABS=true
PUBLIC_STACKABLE_COCKPIT_PAGE_SIZES=25,50,100
PUBLIC_STACKABLE_COCKPIT_DEFAULT_PAGE_SIZE=25
PUBLIC_STACKABLE_COCKPIT_MAX_RECENT_FILES=15
PUBLIC_STACKABLE_COCKPIT_UPLOAD_CONCURRENCY=3
PUBLIC_STACKABLE_COCKPIT_INFINITE_SCROLL_ENABLED=true
PUBLIC_STACKABLE_COCKPIT_STORAGE_CUT_COPY_ENABLED=true
PUBLIC_STACKABLE_COCKPIT_STORAGE_PASTE_ENABLED=true
PUBLIC_STACKABLE_COCKPIT_STORAGE_RENAME_ENABLED=true
PUBLIC_STACKABLE_COCKPIT_STORAGE_MOVE_ENABLED=true
GARAGE_ADMIN_URL=http://localhost:30902
GARAGE_ADMIN_TOKEN=stackable-cockpit-e2e-admin-token
BETTER_AUTH_URL=http://localhost:4173
BETTER_AUTH_SECRET=stackable-cockpit-e2e-better-auth-secret
STORAGE_ENCRYPTION_KEY=a781775ee543107bfa97191691bb23c982dd9d9550542df27194ebc09d617dfd
PORT=4173
49 changes: 13 additions & 36 deletions .github/workflows/pr_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: python -m pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
run: pre-commit run --all-files --hook-stage manual --show-diff-on-failure --color=always

unit-tests:
name: Unit Tests
Expand All @@ -85,10 +85,9 @@ jobs:
- name: Run unit tests
run: npm run test:unit

e2e-with-garage:
name: E2E Tests with Garage S3
e2e-tests:
name: E2E Tests with Garage S3 and PostgreSQL
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -107,35 +106,13 @@ jobs:
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium firefox

- name: Start Garage S3 and initialize bucket
run: |
# GitHub Actions services now support entrypoint + command, but we still
# start Garage manually here because service containers are created before
# actions/checkout runs. The upstream Garage image contains only the
# /garage binary (no /bin/sh), so the service cannot wait for the checked-
# out e2e/garage.toml to appear before it starts.
docker run -d --name garage \
-p 3900:3900 \
-p 3902:3902 \
-e GARAGE_CONFIG_FILE=/workspace/dev/garage/garage.toml \
-v "$PWD:/workspace" \
--entrypoint /garage \
oci.stackable.tech/stackable/dxflrs/garage:v2.3.0 \
server --single-node

# Wait for the S3 API to become available
for _ in $(seq 1 30); do
if curl -s http://localhost:3900 >/dev/null 2>&1; then
break
fi
sleep 1
done

S3_SECRET_ACCESS_KEY="e2e-test-secret-key-for-ci" \
GARAGE_ADMIN_TOKEN='stackable-cockpit-e2e-admin-token' \
S3_ENDPOINT='http://localhost:3900' \
S3_CONFIG_PATH="$PWD/s3-config.json" \
./e2e/init-garage-s3.sh

- name: Run E2E tests with Garage
run: npm run test:e2e:garage
- name: Run E2E tests with Garage and PostgreSQL
run: npm run test:e2e

- name: Upload Playwright traces
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-traces
path: e2e/test-results/
retention-days: 7
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ coverage/*
# Playwright
e2e/test-results
e2e/.auth
.playwright/
# Paraglide
src/lib/paraglide
project.inlang/cache/
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.13.1
28 changes: 23 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,45 @@ repos:

- repo: local
hooks:
# ── Fix variant (runs locally on commit — auto-fixes where possible) ──
- id: npm-lint-fix
name: npm lint with --fix (prettier + eslint)
language: system
entry: npm run lint:fix
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.(svelte|ts|js|css|html|json|md)$

# ── Check-only variant (runs in CI — no auto-fix) ──
- id: npm-lint
name: npm lint (prettier + eslint)
name: npm lint check only (prettier + eslint)
language: system
entry: npm run lint
stages: [pre-commit, pre-merge-commit]
stages: [manual]
pass_filenames: false
files: \.(svelte|ts|js|css|html|json|md)$

# ── Shared hooks (same behaviour locally and in CI) ──
- id: npm-check
name: npm check (svelte-check)
language: system
entry: npm run check
stages: [pre-commit, pre-merge-commit]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
files: \.(svelte|ts|js)$

- id: npm-arch-test
name: npm arch test (fitness functions)
language: system
entry: npm run test:arch
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false

- id: helm-lint
name: helm lint
language: system
entry: helm lint deploy/helm/cockpit
stages: [pre-commit, pre-merge-commit]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
files: ^deploy/helm/

Expand All @@ -76,6 +94,6 @@ repos:
--set auth.oidc.discoveryUrl=https://stub
--set auth.oidc.clientId=stub
--set auth.oidc.clientSecret.secretKeyRef.name=stub > /dev/null'
stages: [pre-commit, pre-merge-commit]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
files: ^deploy/helm/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ coverage/
# Helm templates
deploy/helm/
dev/garage/
dev/postgresql/
35 changes: 33 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ The application uses **Paraglide-JS v2** for type-safe, compiler-based internati

### Node.js Version

The required Node.js version is pinned in `.node-version`. Use `nvm` to install and activate it before running any `npm` commands — `npm` will hard-fail with engine errors otherwise (`.npmrc` sets `engine-strict=true`).
The required Node.js version is pinned in `.node-version` for CI and `.nvmrc` for NVM. Keep both files synchronised. Use `nvm` to install and activate it before running any `npm` commands — `npm` will hard-fail with engine errors otherwise (`.npmrc` sets `engine-strict=true`).

```bash
nvm install # installs the version from .node-version
nvm install # installs the version from .nvmrc
nvm use # activates it in the current shell
```

Expand Down Expand Up @@ -225,6 +225,37 @@ pre-commit run --all-files # Run all checks: lint (prettier + eslint), type ch
# markdownlint, yamllint, shellcheck, actionlint, hadolint, helm lint
```

### Architecture Fitness Functions

```bash
npm run test:arch # Run all architecture fitness function tests (~5 s)
npm run test:arch:report # Same, plus generate HTML dependency/metrics reports in /reports/
```

Architecture tests live in `src/architecture/*.spec.ts` and use [ArchUnitTS](https://github.com/LukasNiessen/ArchUnitTS) together with plain Node.js `fs` checks. They run in CI and must remain **green at all times**.

**Run `npm run test:arch` whenever you:**

- Add a new file to `src/lib/server/` (verify it doesn't break client-boundary rules)
- Add a new Svelte component (PascalCase naming, no raw `<dialog>`, no hardcoded colours)
- Add or remove message keys in `messages/en.json` (both locale files must stay in sync)
- Refactor the Trino sub-layer (circular-dependency rules)

**What the fitness functions enforce:**

| Category | What is checked |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Server / Client Boundary | `src/lib/client`, `stores`, `storage`, `editor`, `types` must not import `src/lib/server/**` |
| No Circular Dependencies | `src/lib/**` (excluding Trino, see TECH_DEBT.md) and `src/routes/**` must be cycle-free |
| Naming Conventions | Stores → `*.svelte.ts`; lib components → PascalCase `.svelte`; server files → no `.svelte.ts` extension |
| Code Size Limits | `.ts` files < 2 400 LOC; `.svelte` files < 1 100 LOC; test files < 1 000 LOC |
| UI Pattern Enforcement | No hardcoded Tailwind colours; no raw `<dialog>`; no native date inputs; `<img>` must have `alt`; no `<div onclick>` (known violations listed in TECH_DEBT.md) |
| Server Logging | Server files must use pino logger, not `console.*` |
| i18n Compliance | `messages/en.json` and `messages/de.json` must have the same keys; no static `aria-label="English text"` (known violations listed in TECH_DEBT.md) |

**Extending the fitness functions:**
When you add a new architectural rule (e.g., a new layer, a new naming convention), add a new `.spec.ts` file in `src/architecture/` following the existing patterns. Use archunit for TypeScript dependency/cycle rules and plain Node.js `fs` for content checks on Svelte files.

### E2E Testing

```bash
Expand Down
Loading