Skip to content

refactor(databases): remove DocumentsDB collection usage page#3111

Merged
lohanidamodar merged 1 commit into
mainfrom
refactor-remove-documentsdb-collection-usage
Jul 9, 2026
Merged

refactor(databases): remove DocumentsDB collection usage page#3111
lohanidamodar merged 1 commit into
mainfrom
refactor-remove-documentsdb-collection-usage

Conversation

@lohanidamodar

Copy link
Copy Markdown
Member

What

Removes the DocumentsDB collection usage page and its command-center Go to usage entry.

Why

The per-service DocumentsDB (and VectorsDB) /usage endpoints were removed in cloud — appwrite-labs/cloud#4679 ("chore(databases): remove per-service /usage endpoints", merged 2026-07-08) — because they duplicated the org/project usage surface. The console's collection usage page was the only consumer of the now-deleted documentsDB.getCollectionUsage, so calling it against any post-#4679 server 404s / breaks the type-check once the SDK is bumped.

Scope

  • Deleted database-[database]/collection-[collection]/usage/[[period]]/ (+page.svelte, +page.ts)
  • Removed the Go to usage command from the collection +layout.svelte

Unaffected (retained endpoints): the database, table, and project usage pages all use tablesDB.* (listUsage, getUsage, getTableUsage). The shared Usage view component stays (still used by the table usage page). Note: DocumentsDB is gated behind the multi-db feature flag, so this page was only reachable for opted-in accounts.

Verification

bun run check0 errors (88 pre-existing warnings unchanged). Prettier clean; ESLint 0 errors.

The per-service DocumentsDB usage endpoints were removed in cloud
(appwrite-labs/cloud#4679, 'remove per-service /usage endpoints') as they
duplicated the org/project usage surface. The console collection usage page
was the only consumer of documentsDB.getCollectionUsage, so remove it and its
command-center 'Go to usage' entry. Database/table/project usage pages are
unaffected (they use the retained tablesDB.* usage endpoints).
@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the DocumentsDB collection usage page and its command-center shortcut following the removal of the /usage endpoints on the server side. The three changed files handle the deletion cleanly, but header.svelte — which was not included in the diff — still contains a "Usage" navigation tab pointing to the now-deleted route.

  • +page.svelte and +page.ts under usage/[[period]]/ are deleted, removing the page component and its documentsDB.getCollectionUsage load call.
  • The "Go to usage" keyboard shortcut is removed from +layout.svelte.
  • header.svelte (unchanged in this PR) still renders a "Usage" tab that links to ${path}/usage, which will 404 for all collection pages accessible to multi-db users.

Confidence Score: 3/5

The route deletion is incomplete — the Usage tab in the collection header still navigates to the deleted page, leaving a broken tab visible to all multi-db users.

The keyboard shortcut and route files are cleaned up correctly, but header.svelte was not updated. Every collection header rendered for multi-db users will show a Usage tab that resolves to a missing route. The fix is a small, isolated deletion in header.svelte.

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/header.svelte — the Usage tab entry needs to be removed.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/+layout.svelte Correctly removes the "Go to usage" keyboard shortcut command from the command-center binding list.
src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/usage/[[period]]/+page.svelte Deleted correctly — the Svelte page component that rendered the DocumentsDB collection usage view is removed.
src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/usage/[[period]]/+page.ts Deleted correctly — the load function calling the now-removed documentsDB.getCollectionUsage endpoint is removed.

Reviews (1): Last reviewed commit: "refactor(databases): remove DocumentsDB ..." | Re-trigger Greptile

@lohanidamodar lohanidamodar merged commit 9c54e5f into main Jul 9, 2026
3 of 4 checks passed
@lohanidamodar lohanidamodar deleted the refactor-remove-documentsdb-collection-usage branch July 9, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant