Skip to content

feat(pages): project pages (F-C01): create, list, edit, lock, archive, access, favourite and delete, with a plain-save description #323

Open

Description

@aRustyDev

What

Build project pages (F-C01: "Pages (project pages): CRUD, lock, archive, access, favorites, labels"; entities Page, ProjectPage, PageLabel) behind the routes the stock React app calls, as a plain-save feature (D-012: no collaboration before P1). A project's Pages screen can list, create, rename, lock, archive, change the access of, favourite, duplicate and delete pages.

The description write (PATCH .../pages/{id}/description/, and the validated triple it stores) is #320. This issue is everything around it, and #320 builds on it.

Why

  • Nothing of pages exists. No table, no port method, no use-case, no route. The only page-shaped thing in the code is the project flag page_view (migration 0010, default true), which already makes the stock app show a Pages tab.
  • The plan schedules it nowhere. PLAN.md:94 and :102 say pages are M3 ("Cycles, modules, views, pages, intake, webhooks, public spaces and exports are M3"), but the M3 row (PLAN.md:41) does not list them, the milestone table (:17) gives M3 only feat(jobs): exports and seeding as queue jobs with a jobs table (no workflow engine) #56, and the M5 row (:43) says "P0 pages open unchanged" as if P0 pages existed. feat(collab): one yrs room hosted on a Durable Object and on axum (spike 0005 first) #54 (the collab room, M5) needs them. Pages are also not on the M2 acceptance list, and DEVIATIONS.md has no stub row for any pages route, though the M2 rule (PLAN.md:94-96, FR-01, ADR-0034) is that every other route the shell calls gets the cheapest recorded answer.
  • F-C01 is a P0-phase feature (FEATURES.md:66, TRACEABILITY.md:39, verified by "e2e + sanitiser XSS corpus").

Found while splitting the pages half out of #48 (#320).

The pin's surface

From tools/compat-inventory/out-pinned/ (server-routes.csv, join-matches.csv, join-unmatched.json), all under /api/workspaces/{slug}/projects/{project_id}/:

Routes What the pin does Here
GET and POST pages/ list; create this issue
GET, PATCH, DELETE pages/{id}/ retrieve (takes track_visit); update (PageDetailSerializer); delete this issue
POST pages/{id}/access/ change access this issue
POST and DELETE pages/{id}/lock/ lock, unlock this issue
POST and DELETE pages/{id}/archive/ archive, restore this issue
POST and DELETE favorite-pages/{id}/ favourite, unfavourite (members and admins) this issue
POST pages/{id}/duplicate/ duplicate this issue
GET and PATCH pages/{id}/description/ the description (PageBinaryUpdateSerializer) #320
GET pages-summary/ served by the pin; the inventory finds no client call to it check before building
GET pages/{id}/versions/ and .../{version}/ page versions out (F-C03, P1)
GET archived-pages/, GET favorite-pages/ no route in the pin (the inventory marks both dead) answer what the pin answers
POST pages/{id}/move/, GET pages/{id}/mentions/, POST pages/{id}/versions/{v}/restore/ no route in the pin, and not dead: the app (or the collab server) calls them answer what the pin answers, and record it

Thirteen served routes are in scope here (the first seven rows); the two description routes are #320, which makes fifteen served routes with a client call. The pin has no v1 page routes, so /api/v1 is not touched.

Design decisions to make

  1. The shape. PageSerializer (list) and PageDetailSerializer (retrieve, create, update) are read off the pin and recorded as fixtures; do not work them out from the app's types. This includes which request sets a page's labels (PageLabel) and what owned_by, access, is_locked and archived_at look like.
  2. Who may do what. Visibility of a private page, who may change access, lock, archive or delete (the owner, an admin, any member), and what a guest sees. Read from the pin; none of it is stated in D-012 or ADR-0060.
  3. What DELETE does. The pin's rules for deleting (for example whether the page must be archived first) and whether a deleted page is soft-deleted and swept by the daily retention cleanup (feat(jobs): daily hard-delete retention cleanup (F-D10, 30-day default per D-001) #59).
  4. The pin's background tasks. The route table counts them: create 1, retrieve 1, update 1, description write 2, duplicate 2. Read what each is and decide, one by one, which has an effect a client can see (an activity row, a recent-visit, a version, a webhook) and which is dropped; record each drop.
  5. Duplicate. The pin copies the stored objects of the description and posts the HTML to apps/live /convert-document to get the JSON and the binary (research/0008 line 43). P0 has no apps/live, and pages store the triple, so a copy of the three stored columns is the candidate; images inside the page are decision 6.
  6. Images in a page. PAGE_DESCRIPTION is one of Plane's ten entity types that the compat asset route recognises, but AssetEntity (crates/core/ports/src/lib.rs:739) builds only ProjectCover, so a page image upload is refused today (ISSUE_DESCRIPTION has the same gap for work items). Decide whether page images are in this issue or a follow-up, and what the page editor shows meanwhile.
  7. The editor without a collab server. The stock app opens a page through the collab socket and uses the fallback (use-page-fallback.ts, which builds the binary client side and PATCHes all three) only when the socket is down (research/0008 lines 38 and 39). Whether the stock app falls back cleanly when the collab path is simply not served by the Worker is not verified here; the browser journey below is how to find out, and if it does not, that needs its own decision (D-012 says plain save at P0).
  8. Pages and feat(pages): store a page description as the validated triple (sanitised HTML, a binary that decodes with yrs, JSON) #320. If POST pages/ or PATCH pages/{id}/ can carry description_html (check the pin), it goes through the same thrust_html::describe path as feat(pages): store a page description as the validated triple (sanitised HTML, a binary that decodes with yrs, JSON) #320's write, never straight to a column.
  9. Where it goes. Follow how projects and work items were built: types and a port method set in crates/core, a use-case module, both adapters (memory and Postgres, with a new expand-only migration, scripts/check-migration-lint.sh), a pages.rs in crates/api/compat-plane, and the contract suite on all targets.

Done when

  • The thirteen routes answer as the pin does, with parity_ fixtures recorded from the pin, added to the acceptance list (crates/api/compat-plane/tests/parity/acceptance.csv); every deviation is a row in DEVIATIONS.md.
  • The routes with no pin route answer what the pin answers, and DEVIATIONS.md says so. The pages-summary/ route is built or recorded as unused.
  • A model_ sequence test against a reference model covers create, update, lock, archive, access, favourite, duplicate and delete across the actors, and runs on every contract target (native-memory, native-pg, worker-cf). Control: a defect planted in one rule (for example an unlocked write to a locked page) makes it fail.
  • A Playwright journey on the stock app (one spec in e2e/journeys/, with its must-fail control and the count guard): create a page, rename it, lock it, archive and restore it, favourite it, delete it, with no 404 in the network log. It runs with no collab server (decision 7).
  • The page HTML that arrives by any route is sanitised by the same path as work items (decision 8), shown by the nine payload classes of research/0008 §7.
  • PLAN.md lists pages in the M3 row and this issue in its tables, feat(collab): one yrs room hosted on a Durable Object and on axum (spike 0005 first) #54 is recorded as depending on it, and docs/src/testing/status.md has a G-entry for it.

Not in this issue

Blocks: #320, #54. Related: #48, #56, #59, #114.

🤖 Generated with Claude Code

Activity

  1. added this to the M3 Breadth milestone on Nov 19, 2026
  2. added
    area:app
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:appprio:p1

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions