Skip to content

Publish over the publication slice - #163

Merged
sgomez merged 3 commits into
frontend-rebuildfrom
agent/frontend/145
Nov 25, 2026
Merged

sgomez merged 3 commits into
frontend-rebuildfrom
agent/frontend/145

Conversation

@sgomez

@sgomez sgomez commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Closes #145. Part of #135.

Summary

Publish is now a page over the publication slice. screens/Publish* is gone.

<PublishPage onChange>                         pages/PublishPage.tsx
  usePublish()            review, moved, outcome, nodes, comment, publish
  useDiscard()            one / all, absent when the port lacks them
  published  → <Done> + <NodeList> (when nodes are served)
  nothing    → <Nothing> (+ History when the History screen exists)
  otherwise  → <MovedNotice> <Problems> "Ready to publish" <Warnings>
               <ChangeList> → <ChangeRow> flat link, or <RowDisclosure> with diff, Open, Discard this change
               <PublishPanel> Becomes, Nodes, Comment, Publish N changes / Publishing, Discard all N changes…
interface PublicationPort {
  review(); publish(hash, comment): published | moved | failed;   // HTTP adapter: app/http/publication.ts (decodes the 409)
  discard?; discardAll?; nodes?;                                    // memory adapter only (app/adapters/memory/publication.ts)
}
  • Rows follow SPEC 10.8 and 10.14: order Modified, Added, Withdrawn, Deleted, Unreadable; verbs "Added" and "Withdrawn"; the object's name (from feat(api): data for the boards: list order, page size, filters, counts and names #153), or its identifier. Warnings and problems link the name too.
  • Capability-gated, shown in Storybook only: kind and summary on rows, diffs, Open / Discard this change, Discard all with its dialog, the Nodes row and Nodes list, PublishMoved's "Moodle was saved again 1 minute ago.", History buttons (shown when the session serves the History screen).
  • After a Publication the page stays on Publish with "Snapshot #N is published" and "N changes." (A4, A11). A failed node build makes it a warning carrying the build message.
  • Widths: page-publish (1180, gap 24) with "Ready to publish"; new page-changes (1180, gap 20) when blocked or moved; default page (1040, gap 20) for Nothing to publish and Published.
  • New design-system primitive RowDisclosure (React Aria Disclosure as a list row). Diff gets tabIndex=0: axe flags a wide diff as a scrollable region that cannot be reached by keyboard.
  • No API change.

Stories:

  • Pages/Publish (boards): Ready, Blocked, Moved, Empty, Done.
  • Pages/Publish states: Draft: Ready, as the API serves it, Draft: Before the first Publication, Draft: Nothing to publish, never published, Draft: Unreadable and unnamed rows, Draft: Several problems, Draft: Loading.
  • Pages/Publish outcomes: Draft: Moved, as the API serves it, Draft: Publishing, Draft: Not published, Draft: Published, this node could not build it, Draft: Discard all.

Decisions under review

  • (3) Header. Publish shows "Live: Snapshot #N" with no time at every width, as built in Shell, sidebar and navigation as the boards show them #141. Nothing changes here.
  • Review: widths (4). Publish, Blocked and Moved are 1180 px. Empty and Done are 1040 px. The gap is 24 on Ready and 20 on the others, as the boards show. Every board story uses these values, so no separate Review: story was needed.

Board differences

Compared at 1440 and 400, light and dark:

  • The board's intro "Saved changes go live together, as one Snapshot." is left out (B1, and SPEC 10.14 has none).
  • The board shows Open on the Deleted row (legacy-radius). SPEC 10.14 says a Deleted row has no Open, so it has none.
  • On the board the first expanded row also has a top border, which doubles the card's edge. Here the first row has none, like list rows.
  • Blocked and Moved boards align the "7 changes" head to the centre with no 8 px top margin. Here every state uses the Ready board's head (baseline, 8 px).
  • The board sets option and file names in problem and warning text in mono (privatekey, default-sp-2027.pem, signature.algorithm). The server sends plain text, so it shows plain.
  • On the Blocked and Moved boards rows are flat links with summaries. On Ready they unfold to diffs. Here a row unfolds whenever it has a diff. The Blocked and Moved fixtures carry no diff, so they match their boards.
  • Production (HTTP adapter) shows rows without kind or summary (the kind falls back to "Service provider"), no diffs, no Discard, no Nodes row or list, no History, and Moved says only "This is the current list.". See Draft: Ready, as the API serves it and Draft: Moved, as the API serves it.
  • Fonts are system stacks (maintainer rule). The sidebar foot has no language selector (B4, shell).

Departures

Evidence

  • Before: screens/Publish.tsx drove fetch itself. Rows showed the entity ID, the verb "Unpublished" and the enum order. After a Publication the page showed "Snapshot 42 published" above "Nothing to publish".
    After: pages/Publish{Review,Confirm,Problems,Refused}.test.tsx (moved from screens/, updated) run through the HTTP adapter. PublishDiscard.test.tsx covers discard one and all, the failure callout and the missing Open on Deleted, over the memory adapter.
  • composer test 607 passed, composer static ok (file sizes ok), lint and type check clean, npm test 583 passed (lines 98.9 %), npm run test:visual three runs of 360 with zero diffs (Playwright server via CONSOLE_VISUAL_WS, since 3765 was taken), composer build leaves no diff. No PHP changed, so coverage and mutate were not run.
  • Under heavy machine load (load average around 20 from parallel worktrees), main.test.tsx and one edit-screen test hit their 5 s timeout twice in the full npm test. Both pass alone and in the next full run.

Merge Danger

Door: two-way

Blast Radius: Publish

Only the Publish route changes. Adds 64 reference screenshots, so this waits for the maintainer's visual-change label.

@sgomez
sgomez merged commit 09a5d12 into frontend-rebuild Nov 25, 2026
16 checks passed
@sgomez
sgomez deleted the agent/frontend/145 branch November 25, 2026 20:36
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