Replace workspaces with nested collections - #1
Merged
Merged
Conversation
Documents are now top-level with a globally unique slug, served at /docs/<slug> in the browser and /api/docs/<slug> in the API. Collections are optional folders that nest through a parent; a document lives at the root or in exactly one collection. Schema 10 migrates existing data: documents from the "default" workspace move to the root, every other workspace becomes a root collection, and the migration refuses to run if a slug exists in more than one workspace. The skill scripts drop --workspace; publish-document.mjs gains --collection and --root. Reinstall the skill after upgrading. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Refuse to migrate a workspace slugged "root", which the document list reserves for documents outside every collection - Let /api/archive?collection=root name archived root documents, matching the document list filter - Indent nested option labels with non-breaking spaces so the tree shows - Render the 404 page for an unknown collection instead of an empty folder - Explain that a collection slug derives from its name on slug conflicts Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The reserved-slug migration error told users to rename the workspace, but renaming never changed a slug. Name the SQL that does instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A collection whose documents are all archived read as empty while refusing deletion. The folder view now names the archived count with a link to the archive, and the delete hint says archived documents count. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workspaces are gone. Documents are top-level with a globally unique slug, and collections are optional folders that nest like a file tree. A document lives at the root or in exactly one collection.
Breaking. This changes every document URL, the API surface, the database schema, and the skill's script flags.
What changed
/docs/<slug>,/collections/<slug>,/collections,/archive?collection=<slug>. API:/api/docs/...and/api/collections/.... Old/workspacespaths return 404.GET /api/collectionsreturns a flat list withparentSlug,documentCount, andchildCount; the client builds the tree.POSTcreates (optionally inside a parent),PATCHrenames or reparents,DELETEneeds an empty collection. Reparenting into your own descendant is rejected.collectionSlug(nullfor the root, omitted to leave an existing document where it is). Republishing identical content with a new collection moves it without a new version but rotates the ETag.defaultworkspace move to the root, every other workspace becomes a root collection, and the migration refuses to run if a document slug exists in more than one workspace.--workspace;publish-document.mjsgains--collection <slug>and--root. The watcher event no longer carriesworkspaceSlug. Reinstall the skill after upgrading.Verification
--feedback-match, move to root, stale ETag 412), and the browser flows for dashboard, folder view, move, archive and unarchive, a three-level collection tree with reparenting and the delete guard, root search into nested folders, and submitting a comment plus instruction from the review page.Not in this PR
The architecture docs under
docs/still describe workspaces as design history. No version bump; the changelog has an Unreleased entry.🤖 Generated with Claude Code