Lane 8 page P2: an article, History, More, Recent changes, Deleted (#734) #905

Merged
claude-bot merged 3 commits from build/lane8-p2-article into main 2026-09-28 05:21:35 +00:00
Collaborator

Part of #734 (lane 8). Frontend only, on main. Every endpoint it uses already existed.

What it builds

  • WIKI-3, the article (pages/wiki/Article.jsx):
    • the body renders through P1's WikiText, which never filters; the server already did;
    • "See it as…" is GM-only and uses the server's own ?as_user= view, never a client filter;
    • W3's screens: "This page isn't shared with you" (403) and "This page isn't here" (404);
    • relationships (read-only), appearances, mentioned-in, references and footnotes, and the timeline;
    • a margin with the image, facts, stat block, custody (for artifacts) and aliases.
  • WIKI-6, More: add to the shelf, the AI drafts and stat conversion, merge, and delete with an undo banner. That replaces the last alert() delete (WK-049).
  • WIKI-5, History restores through the real POST …/versions/{id}/restore. A player's restore is her own merged save.
  • WIKI-17, Recent changes, with a GM-only Deleted filter. The front page's "All recent changes" link now leads here.
  • WIKI-18, Deleted: GM-only, and not in Contents, as drawn.
  • The routes are /wiki/:entryId, /history, /wiki/recent and /wiki/deleted. /wiki/:entryId/edit keeps the old editor until P3.
  • Removed: the old page's read half of WikiArticle.jsx. It's now edit-only, and still carries relationship and owner editing, so GMs lose nothing before P3.
  • A [[wanted]] link's "new page" address is scoped to the campaign.

Render check (real stack, as Dana and Priya)

  • The article had a :::gm block and a :::party block. Priya had an active character, created with the product's own endpoint as a GM.
  • Playwright ran at 1440 and a true 390, in light and dark. I looked at the shots myself.
  • Dana sees one GM block and one party block. Priya sees the party block and no GM block; it's absent from the DOM and from the API response. There's no horizontal scroll at 390.
  • An earlier round seemed to show every block twice. The cause was the check's own script patching the page twice, not the page, and a regression test now pins "renders exactly once".
  • Note for lane 8's journeys PR: the e2e seed gives Priya no CampaignCharacter, so she's outside "the party" until one is made. The journeys that assert party content will need that in the seed.

Departures (for P3 and later)

  1. "See it as" works per player, not per character (IS-128). It will come with P3's roster work for :::for.
  2. Merge's page picker is a name field resolved through search, not an autocomplete.
  3. Footnote numbering can diverge from the server's in one narrow case. It's documented in the file.
  4. The "GM-only page" tint on links isn't wired yet. That's cosmetic.

Checks

  • vitest: 204 files, 2686 passed. eslint: 0 errors.
  • coverage/lane6b.py: unclassified: none.

🤖 Generated with Claude Code

Part of #734 (lane 8). Frontend only, on main. Every endpoint it uses already existed. ## What it builds - **WIKI-3, the article** (`pages/wiki/Article.jsx`): - the body renders through P1's `WikiText`, which **never filters**; the server already did; - **"See it as…"** is GM-only and uses the server's own `?as_user=` view, never a client filter; - W3's screens: "This page isn't shared with you" (403) and "This page isn't here" (404); - relationships (read-only), appearances, mentioned-in, references and footnotes, and the timeline; - a margin with the image, facts, stat block, custody (for artifacts) and aliases. - **WIKI-6, More:** add to the shelf, the AI drafts and stat conversion, merge, and delete with an undo banner. That replaces the last `alert()` delete (WK-049). - **WIKI-5, History** restores through the real `POST …/versions/{id}/restore`. A player's restore is her own merged save. - **WIKI-17, Recent changes,** with a GM-only Deleted filter. The front page's "All recent changes" link now leads here. - **WIKI-18, Deleted:** GM-only, and not in Contents, as drawn. - **The routes** are `/wiki/:entryId`, `/history`, `/wiki/recent` and `/wiki/deleted`. `/wiki/:entryId/edit` keeps the old editor until P3. - **Removed:** the old page's **read half** of `WikiArticle.jsx`. It's now edit-only, and **still carries relationship and owner editing,** so GMs lose nothing before P3. - **A `[[wanted]]` link's "new page" address** is scoped to the campaign. ## Render check (real stack, as Dana and Priya) - The article had a `:::gm` block and a `:::party` block. Priya had an active character, created with the product's own endpoint as a GM. - Playwright ran at 1440 and a true 390, in light and dark. I looked at the shots myself. - **Dana** sees one GM block and one party block. **Priya** sees the party block and **no GM block**; it's absent from the DOM and from the API response. There's no horizontal scroll at 390. - An earlier round seemed to show every block twice. The cause was the check's own script patching the page twice, not the page, and a regression test now pins "renders exactly once". - **Note for lane 8's journeys PR:** the e2e seed gives Priya no `CampaignCharacter`, so she's outside "the party" until one is made. The journeys that assert party content will need that in the seed. ## Departures (for P3 and later) 1. **"See it as" works per player, not per character** (IS-128). It will come with P3's roster work for `:::for`. 2. **Merge's page picker** is a name field resolved through search, not an autocomplete. 3. **Footnote numbering can diverge from the server's in one narrow case.** It's documented in the file. 4. **The "GM-only page" tint on links** isn't wired yet. That's cosmetic. ## Checks - **vitest:** 204 files, 2686 passed. **eslint:** 0 errors. - **`coverage/lane6b.py`:** unclassified: none. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
WIKI-3, WIKI-5, WIKI-6, WIKI-17 and WIKI-18: a new src/pages/wiki/Article.jsx
renders a page's body through P1's WikiText (never filtering client-side —
the server already did), with "See it as" (?as_user=), W3's "This page isn't
shared with you" screen, relationships, appearances, mentioned-in, references
and a timeline. History.jsx restores through the server's own
POST .../versions/{id}/restore, replacing the old page's plain PATCH, which
was never called. ArticleMore.jsx is the article's ⋯ More menu (shelf, LLM
drafts, convert stats, merge, delete with an undo). Recent.jsx and
Deleted.jsx round out the wiki's remaining P1/P2 surfaces.

The read half of WikiArticle.jsx is deleted; its edit half stays at
/wiki/:entryId/edit until PR 3 rebuilds the editor. Lane 7's Read/Talk/History
tab bar is kept, with History now a plain link to its own page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restores RelationshipManager and OwnerManager to WikiArticle.jsx (they were
dropped along with the read half of the old article page) so a GM loses
nothing between this PR and P3's block-aware editor: adding/editing/deleting
a page's outgoing relationships, and managing a player-character's owners,
both still write through their original endpoints, now always visible on
/wiki/:entryId/edit rather than gated behind the old page's read/edit split.

Also adds a regression test that a single `:::gm` block renders exactly
once (Article.jsx) — a real-stack render check showed each block doubled,
traced to a one-off manual verification script re-running its own PATCH
against an already-patched body, not to WikiText or Article.jsx. A second
real-stack check confirmed the party block (missing from Priya's first
render) was a seed-fixture gap (no active character in the party for the
render check to render for) rather than a server bug, once Priya was given
one for the check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Merge main into build/lane8-p2-article
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 59s
CI / Bot tests and audit (pull_request) Successful in 1m59s
CI / Backend lint (ruff) (pull_request) Successful in 32s
CI / Feedback site tests (pull_request) Successful in 46s
CI / Bot/backend version sync (pull_request) Successful in 28s
CI / Docker image build (pull_request) Successful in 32s
CI / Does this change touch the recording path? (pull_request) Successful in 20s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Backend migration, tests, and audit (pull_request) Successful in 20m48s
CI / Frontend tests, audit, and build (pull_request) Successful in 24m59s
CI / End-to-end journeys (desktop, phone, keyboard-only) (pull_request) Successful in 20m57s
8ad91cb246
Sign in to join this conversation.
No description provided.