feat(webapp): the wiki's text — blocks, one renderer, page audiences (lane 8 PR 1) — stacked on #846 #868
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane8-1-wiki-text"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lane 8 (#734), wave 1, PR 1. This is stacked on lane 7 (#846), because it needs
audience_service. Until #858 and #846 merge, the diff includes theirs.It covers D165–D167, D192–D199 and D219 (W13: blocks may name players).
What's built
wiki_text.py: blocks, written as:::gm,:::partyand:::for Ossian Vale, @Priya.render_forshows each reader only what they may see.merge_editputs back every block the writer couldn't see.?as_user=or?as_character=(IS-128)./ask, the summary, the shelf, the timeline, the vocabulary;tests/wiki/test_body_readers.pyis an AST allowlist, so any new raw read fails CI.test_wiki_crawl.pywalks every wiki read as 8 different readers.body,gm_notesandplayer_private_notesare read out of the text, plus a newtextfield.Migration
8a1b2c3d4e5f(on7f2d0c1a3b4e)gm_notesbecomes a top:::gmblock, and private notes become a foot block for exactly the people who could read them before.Tests
Deferred to later lane 8 PRs: relationship audiences and links as records (PR 2a), and
:::party <name>(PR 3).🤖 Generated with Claude Code
Tests first: GET/PATCH /sessions/{id}/prep with the sheet's own version, migration 3b7e1d9c5a26 (prep_sheets, prep_items, shelf_pins' shelf start and its backfill), and reconcile_pins filling shelves only from a pin's shelf start (P3a). The one-head pin moves to the new migration's test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Migration 3b7e1d9c5a26 on c3d5e7f9a1b2: prep_sheets (one per session, made on the first save, with its own version for autosave), prep_items (the table only; 1b writes it), and shelf_pins.shelf_start_session_id, backfilled to each pin's start once, when the column is made. GET and PATCH /api/sessions/{id}/prep, GMs of the campaign only (P7). A stale save is a 409 carrying the current sheet. The beats stay in sessions.beat_notes and are saved under the sheet's version; the old beat-notes endpoint moves that version, and a beats save from the sheet moves the old endpoint's token, so the two editors meet as conflicts. P3(a): a pin rides every later sheet from its start, but reconcile_pins fills shelves only from its shelf start. The table's pin sets both. The cancel prune and the cold open's carried count treat the shelf start as where a card originated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Items: Insert into sheet (a run under Generated, a rule under Rules, a wiki article under Wiki: P10a), one per source per sheet, Remove with an undo; Keep for later (P11a) and moving it onto a sheet. The item routes live at /api/prep-items/{id}, For later at /api/campaigns/{id}/prep/later. Pins (D39, P3a): pinning an item makes one pin that rides every later sheet, and rides the shelves only if the item is already on this shelf. Add to shelf, from an item or a carried block, sets the pin's shelf start there and files the card (and the pin) in the scene. Unpin and Pin again reopen the same pin; the table's Unpin tail is now shelf_service.end_pin, shared. The plan (D38): POST .../prep/plan queues session_prep with the sheet's want as its direction and names the run on the sheet. The worker (run_workbench_generation_core, on task_session) writes the plan into the sheet if the sheet still names that run, dated by when the tool began, so a change made while drafting leaves it stale. Use this draft, and each scene, secret or NPC onto the shelf as a note or wiki card. The plan and items never move the sheet's autosave version. No migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>- GET /campaigns/{id}/planning: the sessions ahead and what their sheets hold, every pin and what it rides, the scene library, the arcs, the open quests and For later, in one read that writes nothing. - P8(a): POST /campaigns/{id}/pins/{pin}/unpin stops a pin at the last session played or being played (or where it was pinned, if that is later) and names the session; /pin-again is its Undo. - Arcs: a soft delete with POST .../restore, and PUT .../arcs/order. - scenes.session_id, the session a scene was made for. - prep_session on the campaign list, and This week's prep line gains beats, plan_drafted and has_sheet, both from the rule Planning uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>The page at /campaigns/:id/safety (CAMP-18): lines and veils for everyone; for a GM, Edit, Remove with Undo (D12), "+ Add", and the waiting queue with Add as a veil / Add as a line (in the GM's wording) and Dismiss. A player gets the anonymous suggest card with the drawn words (T3(a)) and every GM named (T10(a)), and IS-017's Sent card. The flag dialog, "Flag something to Dana", behind four doors: This week's card (IS-205, about no session), the foot of a live or played session's page (T2(a), IS-210), and Table mode's players' face ("Flag something quietly"). The GM's Table-mode face gets the quiet "N waiting in Table rules & safety" in its place, polled from GET …/safety/waiting (T4(a)). The Contents gains the Table rules & safety entry, with the GM's count (IS-204, IS-212); a player is never asked for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>"Make it canon" on a party thread wrote the answer, unblocked, into a wiki page the whole table reads, so members outside the party read it there (found by the lane 8 survey). CANON_AUDIENCES is ("table",) until lane 8's party and visibility blocks (IS-148) can carry the thread's audience into the article; a party answer is now a 422, like a narrower one. The thread page follows: no "Make it canon" on a party thread. Tests hold both sides; API.md and the CHANGELOG say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>The owner's answer to P12: the old pinned runs that P4's migration left pinned, the ones that failed or never finished, stay ordinary unkept runs and clear 30 days after they were made, like any other. With nothing left to read or write it, the column goes. - Migration d6f8b0c2e4a7, after a7b9c1d3e5f6, drops the column; its downgrade re-adds it as NOT NULL DEFAULT false, and f6a8b0c2d4e5's own downgrade then re-pins what a live item keeps. The one-head pin moves to test_drop_generation_pinned_migration; test_planning_migration's becomes still-in-the-chain; test_notifications' history names it. - The sweep's exemption goes from kept_clause, so the failed runs clear. - Removed with it: the model column, set_pinned, the list's pinned filter, POST .../workbench/history/{id}/pin and /unpin (the History panel that called them is gone; nothing in the frontend did), the pinned field on History's rows, the demo seed's pinned=False, and the frontend's unused pinResult/unpinResult. - Tests: the retired routes are 404s, a failed run clears 30 days after it was made, the sweep takes an old failed run, and the migration's up, down, up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Admin becomes a place with sections in Home's Contents rather than a page of ten tabs, reusing the same shape lane 3 gave Settings: - adminSections.js (16 sections, the survey's addresses); ADMIN_SECTIONS' `built` flag follows settingsSections.js's own rollout rule — three sections with no legacy screen at all (Content notices, Instance health, Plans & entitlements) stay unmounted for their own PR (4c/4d). - /admin/* routes; `?tab=` redirects to the new address (paths are contracts, R1-8); `bot` (ambiguous) goes to AI models. - Home's Contents "This instance" group, the crumb ("Admin › <section>"), and IS-377's Stop for a non-administrator (AdminDoc.jsx). - The index (GET /admin/overview, already on this branch from lane 9 A): grouped status lines, D142's quiet leftovers box, and D141's accept/ decline banner for an offered server. - ADMIN-15 About this server: the admin GET/PUT this lane's server work added, now with a form. - ADMIN-1 Users: the owner's chip, "Hand the server on…" (an offer, D68), Make/Remove administrator (a dialog, then an undo), delete with the typed name and the blocked-by-campaigns state, and D56's search-scope radio cards (new GET endpoint — the setter existed, nothing read it back). - ADMIN-2 Campaigns: the instance-wide list, and an immediate (never an offer) hand-on for a campaign whose owner is unreachable or just moved on — the admin's own recovery path either way. - D141's server-scoped attention item: AttentionItem.campaign_id/ campaign_name become optional for the one kind that isn't a campaign's (server_owner_offer), checked ahead of the membership scope so it reaches an administrator with no campaigns of their own. - Every other built section keeps working at its new address by mounting pages/Admin.jsx's existing component unchanged (the tab bar is gone); AI models and Discord share one interim mount until page 4c splits BotSettings along the new addresses — a documented departure. - J1's Admin leg walked for real: the leftovers list, Backup's own heading and Contents-current row, a whole-page axe scan (no longer scoped to [role="alert"]), the desktop project settling the step, and the keyboard project reaching Admin through the account menu and its Contents sub-list. A new IS-377 journey test (Priya, stopped, axed). Backend: GET /api/admin/settings/member-search-scope (D56's setter has existed since #855; nothing read it back before this). Not in this PR (see the survey's §7 row 4a and the file's own notes): AI models/AI usage & speed/Discord's real split, Recording & retention, Backup, Content packs, Content notices, Audit log's names/categories, and Plans & entitlements — pages 4b/4c/4d. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>