From 711efc67f7485b16154e7535ba5e84cde1d96493 Mon Sep 17 00:00:00 2001 From: Prem Date: Tue, 21 Apr 2026 10:07:11 +0100 Subject: [PATCH] chore: remove unused codemirror lang deps and stale bugs.md --- bugs.md | 56 ---------------------------------------------------- bun.lock | 10 ---------- package.json | 2 -- 3 files changed, 68 deletions(-) delete mode 100644 bugs.md diff --git a/bugs.md b/bugs.md deleted file mode 100644 index a82518628..000000000 --- a/bugs.md +++ /dev/null @@ -1,56 +0,0 @@ -# VectorDB Console Bugs - -> VectorsDB shares the `collection-[collection]` route with documentsdb -- no separate pages needed. -> The `sdk.ts` abstraction (`useDatabaseSdk`) already handles all three types. -> The `.bind()` ternary in spreadsheet.svelte is intentional -- sdk.ts returns `Record` types but the spreadsheet expects raw `Models.Document`. Refactoring would require touching the entire document pipeline. - -## ~~Critical -- Will break vectorsdb in production~~ FIXED - -### ~~1. `collection-[collection]/+page.ts` -- listDocuments hardcoded to `documentsDB`~~ FIXED - -### ~~2. `collection-[collection]/+page.svelte` -- EmptySheet type hardcoded to `"documentsdb"`~~ FIXED - -### ~~3. `empty.svelte` -- vectorsdb gets tablesdb layout~~ FIXED - -### ~~4. `empty.svelte` CSS -- no vectorsdb selector~~ FIXED - -### ~~5. `empty.svelte` -- index-only check excludes vectorsdb~~ FIXED - ---- - -## ~~Major -- UX bugs~~ FIXED - -### ~~6. Keyboard hint hardcodes `Cmd` (macOS only)~~ FIXED - -### 7. `Mod-g` conflicts with browser "Find next" - -**File:** `editor/view.svelte:1137` -`Cmd+G` / `Ctrl+G` is the standard "Find next" shortcut after `Cmd+F`. -**Status:** Deprioritized -- CodeMirror captures keys when focused, minor edge case. - ---- - -## Minor -- Cleanup / consistency - -### 9. `getCollectionService()` type signature too broad - -**File:** `(entity)/helpers/sdk.ts:118` -Accepts all `DatabaseType` but only handles `documentsdb` and `vectorsdb`. Calling with `legacy` or `tablesdb` throws at runtime. -**Fix:** Narrow parameter type to `Extract`. - -### 10. `create.svelte` -- `dimension` not reset on modal close - -**File:** `(entity)/views/create.svelte` -`id` and `name` are reset in `updateAndCleanup()` but `dimension` is not. Reopening the modal after creating a collection with dimension 1536 will still show 1536. -**Fix:** Add `dimension = 768;` to the reset paths. - -### 11. `create.svelte` -- No max bound on dimension input - -**File:** `(entity)/views/create.svelte` -The `InputNumber` has `min={1}` but no `max`. A user could enter an arbitrarily large value. -**Fix:** Add a sensible `max` (e.g., 16384). - -### 12. Magic number `768` repeated - -**Files:** `create.svelte:39`, `+layout.svelte:277` -**Fix:** Extract to a constant like `DEFAULT_VECTOR_DIMENSION`. diff --git a/bun.lock b/bun.lock index 657ad22a9..cb39933d4 100644 --- a/bun.lock +++ b/bun.lock @@ -13,8 +13,6 @@ "@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@8dcaa17", "@codemirror/autocomplete": "^6.19.0", "@codemirror/commands": "^6.9.0", - "@codemirror/lang-javascript": "^6.2.4", - "@codemirror/lang-json": "^6.0.2", "@codemirror/language": "^6.11.3", "@codemirror/lint": "^6.9.0", "@codemirror/search": "^6.5.11", @@ -176,10 +174,6 @@ "@codemirror/commands": ["@codemirror/commands@6.10.3", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.6.0", "@codemirror/view": "^6.27.0", "@lezer/common": "^1.1.0" } }, "sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q=="], - "@codemirror/lang-javascript": ["@codemirror/lang-javascript@6.2.5", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } }, "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A=="], - - "@codemirror/lang-json": ["@codemirror/lang-json@6.0.2", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@lezer/json": "^1.0.0" } }, "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ=="], - "@codemirror/language": ["@codemirror/language@6.12.3", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", "@lezer/common": "^1.5.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0", "style-mod": "^4.0.0" } }, "sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA=="], "@codemirror/lint": ["@codemirror/lint@6.9.5", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.35.0", "crelt": "^1.0.5" } }, "sha512-GElsbU9G7QT9xXhpUg1zWGmftA/7jamh+7+ydKRuT0ORpWS3wOSP0yT1FOlIZa7mIJjpVPipErsyvVqB9cfTFA=="], @@ -260,10 +254,6 @@ "@lezer/highlight": ["@lezer/highlight@1.2.3", "", { "dependencies": { "@lezer/common": "^1.3.0" } }, "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g=="], - "@lezer/javascript": ["@lezer/javascript@1.5.4", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", "@lezer/lr": "^1.3.0" } }, "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA=="], - - "@lezer/json": ["@lezer/json@1.0.3", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ=="], - "@lezer/lr": ["@lezer/lr@1.4.10", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A=="], "@marijn/find-cluster-break": ["@marijn/find-cluster-break@1.0.2", "", {}, "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g=="], diff --git a/package.json b/package.json index f5179b68d..29c48a0a7 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,6 @@ "@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@8dcaa17", "@codemirror/autocomplete": "^6.19.0", "@codemirror/commands": "^6.9.0", - "@codemirror/lang-javascript": "^6.2.4", - "@codemirror/lang-json": "^6.0.2", "@codemirror/language": "^6.11.3", "@codemirror/lint": "^6.9.0", "@codemirror/search": "^6.5.11",