Skip to content

Plan page header: the document's title is the header (A3) - #3905

Merged
backnotprop merged 15 commits into
mainfrom
feat/inbox-plan-header-a3
Nov 27, 2026
Merged

backnotprop merged 15 commits into
mainfrom
feat/inbox-plan-header-a3

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

The plan page's header, approval "inbox-plan-page-header-a3" (A3, "the document's title is the header").

Phone (393 px)

  • The top bar holds the sidebar toggle, the project, Share (only while Share this space is on, the same gate as today; it is off by default) and one menu, "Page actions".
  • (Changed in round two, below: the line above the title is gone; Approve, the decision's mark and the clock sit at the end of the top bar.) The plan's name shows once.
  • Once the title scrolls away, the bar takes the plan's name. This is one button that opens Versions. A document whose first block is not a level-1 heading with the plan's name shows that from the start.
  • The file-name row and the chip row are gone. The menu holds Edit, Global comment / Files (with the count), Contents / Copy file, Download / Close.
  • Tools (icon marks only, 44 px), the comments button and Send are one bar at the bottom. Send is its icon alone, named "Send". The line "No agent is running in " is not shown and stays as Send's accessible description. A failed Send's words still show, on their own row.
  • (Changed in round two, below: an older version, a diff and the editor are now in the one top bar too.) An artifact page keeps its own line under the bar. The menu still holds Files and Close.

Desktop

  • The crumbs and the pinned reading line stay: Edit, the approval and the version never scroll away. A menu at the reading line's end holds Copy file, Download and Full screen.
  • The file-name row ("…md", "from … in …", Download, Side by side / Full screen, ×) is gone. Global comment is a mark in the bottom bar with the tools, the comments button and Send. The Send line shows where the bar has room.
  • The desktop detail (a pinned bar, as A1's desktop) is the builder's recommendation. The owner has not confirmed it separately, so it should be shown to them before merge.

Seams (no rebuild of shared UI)

  • AttachmentPane host prop (parts/paneHost.tsx). With it, the pane draws no head row and sends its tools and comments button into the host's bar. Full screen keeps its own bar. Without the prop, nothing changes. The file shrank by one line, and its ceiling went down with it.
  • Viewer handle: openGlobalComment(anchor) and copyDocument(). The Viewer's own chips stay in the DOM, hidden by the page's CSS, so stored comment positions do not move.
  • RailSheet: open / onOpenChange / trigger, so the menu's Files row can open the sheet.
  • ContentsPanel: opener, so the menu's Contents row can open the sheet.
  • PlanEditing returns edit, decision and busy (one start).

No new words, settings, shortcuts or confirmations. "Page actions" is the frame's existing name for the page's group.

Tests

  • packages/inbox/plans/planHeader.test.tsx (new, DOM): the bar at rest and after the title scrolls away; the name from the start; the bottom bar; each menu row and what it does; approval states and an older version; the desktop reading line and menu; the menu's rows.
  • plansPage.test.tsx: two tests now expect the new header.
  • tests/e2e/inbox-plan-header.spec.ts (new): proof pictures in .local/proof/plan-header/, for phone and desktop, light and dark, plus the scrolled state, the menu, 320 px and a long name.

After review

  • The phone's ⋯ menu is drawn inside the Inbox's root (.pn-inbox), so its icons are strokes and its group lines have their colour.
  • A computer whose card has no room for the Contents rail keeps the pane's own Contents button (only a phone's Contents is in the menu).
  • Under 393 px the phone's bottom bar stays one row: tighter gaps; the tools draw 40 px wide (34 px under 360 px), each with a 44 px hit area. The spec checks one row at 390, 375 and 320.
  • The phone's bar no longer opens on the plan's name and fades to the project: the state is unknown until the document is measured, and the cross-fade is on only after that.
  • Copy file in the menu says "Copied!" with a check in its row (the Viewer's own words), then the menu closes after 1 s.
  • On a computer the Send line stays beside Send at every width, cut at its end where the bar is short.
  • Not changed: Close in the phone menu still calls the page's close. The pane's leave() remembers the reading place in a map that lives only as long as the pane, and the pane goes away on close. Its drafts are already kept by the pane's unmount path.

Left panel: P2 (the owner's pick)

  • On a computer the block above "Pages" (back arrow, title, project, decision) is gone; "Pages N" with its Filter comes first, in the docked panel and in the narrow sheet.
  • Its back arrow is now the first thing in the top bar, before "Spaces / / <title>". Its name is now "Back to Spaces" (round two), and it goes where it went before (the Spaces home).
  • On a page other than the main one the crumbs are Spaces / the plan / the file, so the project would be nowhere on screen. There the first crumb reads "Spaces / " (one link to Spaces).
  • A phone has no crumbs, so its files sheet keeps its own back row.
  • The plan's decision is no longer in the panel. It is in the reading line (on the main page's newest version).

The bar: icons, no version text (approval "inbox-plan-header-icons-a2-p2-g1", A2)

  • A computer: one pinned bar (PlanBar.tsx). On the newest version: the approval's words on the left (Approve when it is offered; Done and Cancel while editing); a pencil (Edit), a history clock (Versions) and the menu at the end. No version text; the clock's name and tooltip are "Versions · v4, newest", and it reports aria-expanded while Versions is open. (Round two: the approval's words became one mark at the end.) An older version: one line, "v2 of 4, an older version", Back to version 4, Restore v2, the clock; no pencil. A diff keeps the frame's reading line.
  • A phone: (superseded in round two) the approval and the clock are in the top bar; the bar's title after the title scrolls away holds the name only.
  • Versions is closed until the person opens it; once opened it stays open until they close it (the same kept flag as before, now defaulting to closed).
  • The marks are the Inbox's existing pen and clock, standing in for Pierre's set (@pierre/icons), which is not a dependency of this repository. Swapping them is the PLAN_BAR_MARKS map.
  • Not built: the clone line (G1).

The failing browser shard

inbox-plan-header.spec.ts expected the pane's own Contents button at an 820 px window. At 820 px the document keeps 572 px, so the Contents rail shows beside it (on main too: measured 572 px with the rail at 820 px on main) and there is no button. The spec now checks the rail there; the button for a card too narrow for the rail stays guarded by planHeader.test.tsx.

Round two (the owner's feedback on the pictures, and the independent review)

The decision is one mark at the bar's end (owner: "This should just appear on the right as an icon type thing")

  • Nothing sits on the left of the newest version's bar any more. At the end: Approve while it is offered (or Done and Cancel while editing), the decision's mark (PlanDecision.tsx), the pencil, the history clock, the menu.
  • The mark per state: approved (also "with notes", someone else's, and an approval the person's own edit moved) is a check in a circle in the success colour; changes asked is the reply arrow in the warning colour; no decision, no decision on this version, and an approval that did not carry over are a circle with a dash (the page's other decision marks use a clock for these, which would sit beside the Versions clock).
  • Its name is the decision's line ("Approved by you, with notes", "Changes asked", "No decision on v4", "v4 is new and not approved. You approved v3, and that does not carry over."). Resting the pointer or keyboard focus on it shows a card; a press pins it; Escape, a press outside or a second press closes it (ui's Popover, Base UI's openOnHover with the ref cards' delays). The card: the decision's line, the version and when (v4 Monday, as the Versions rows write them), and "Your approval moved to v4." with its Dismiss while that notice stands.
  • Approve stays a visible button beside the mark whenever it is offered; it is not in the card.
  • The mark is on every state: newest, editing, an older version, a diff (the frame's reading line's approved slot), another page (that page's own decision, which is what its Approve acts on), and on a phone.
  • Marks: 28 px buttons, 16 px glyph, 1.5 px line (a phone keeps 44 px targets with the same glyph). Stand-ins: the Inbox's pen, clock and checkCircle for Pierre's IconPencil, IconClockArrow and IconCheckCircle; clock is a plain clock face, not a clock with a back arrow.

A phone: one slim bar, nothing stacked under it

  • The line above the title is gone. Approve (or Done and Cancel), the mark and the clock sit at the end of the top bar; the pencil stays in "…". The document's title starts right under the bar.
  • The bar is 52 px, the height of the Inbox list's own phone header (.ib-lhead, measured in the built app: 52 px). It was 57 px.
  • An older version: the bar says "v2 of 4, an older version" in the name's place; "Back to version 4" and "Restore v2" are the first rows of "…". A comparison: "Comparing v2 with v4" there. The editor: Done and Cancel at the bar's end. Before, each of these drew a second row under the bar.
  • After the title scrolls away the bar shows the plan's name only (no decision words; the mark carries it).

Review fixes

  • A saved global comment opens again on the bottom bar's Global comment (a phone: the "…" button), not at the hidden Viewer button: the pane host passes globalAnchor, and the Viewer's reopenComment(annotation, onMissing, globalAnchor) uses it (absent: the Viewer's button, as before). Test fails without it.
  • The pencil is disabled while an edit opens, as Edit was.
  • The phone menu's rows read the page's handlers when pressed, not when the sheet opened.
  • The clock keeps aria-expanded only.
  • The back arrow before the crumbs is named "Back to Spaces" (PLAN_FILES_WORDS.back, the plan rail's own words), which is where it goes. It was "Back to ". I kept the arrow, because approval P2 asked for it, and changed only its name.
  • Removed: {compare && menu} and its CSS, PaneHostHandle.contents, aboveTitle, PlanKicker, startNoEdit (one start), and the misplaced doc comment.
  • The Viewer's handle no longer depends on markdown (Copy reads it through a ref). It still depends on blocks, as on main, so a new text still makes it again.
  • docs/agent-guides/inbox-plans.md now describes optional frame props correctly: a change inside components/frame/ is allowed when it leaves other users unchanged.
  • Not changed: the RailSheet top band of a sheet with no head. The sheet's Close (28 px, top right) is drawn in that band, so removing the band would put Close over the Pages row's Filter.

Contents on a narrow computer, and the 820 px claim

I measured this in the built page. A computer's document never gets narrower than PLAN_DOC_MIN (480 px), because the files rail and then the versions give way first. The document is 572 px at 820 px and 486 px at 1030 px with Versions docked, which is the narrowest a computer's card gets. The Contents rail shows at both widths, so no computer width shows the pane's own Contents button.

On main (ea1b0ea) at 820 px the document is also 572 px and the rail shows. Main opens Versions by default, but at 820 px they cannot dock, so they do not narrow the document there. The round-one statement is true.

The spec now asserts the rail at 820 px and at 1030 px with Versions docked. The button itself stays guarded by the happy-dom test with a stand-in layout. The earlier spec comment said "480"; 480 px is the document's minimum, and 572 px is the width at 820 px.

Checked in the built page (sandboxed Inbox, made-up plan)

  • Global comment on a computer: the box opens above the bottom bar's globe mark, on the bar's top edge; it does not cover the tools or Send. On a phone (from "…") the Viewer draws its box at the bottom of the window, over the bottom bar, while it is open.
  • The bottom bar's tools reach the pane: Markup then a drag makes a highlight; Select then a drag shows the comment toolbar.
  • A document starting with frontmatter: the title shows in the document and the phone bar shows the project. A document with no H1 of its name: the phone bar shows the name from the start. On a computer the crumbs carry the name in both.
  • A phone never draws the crumbs, not even for one frame (a mutation observer from the first paint saw only the title state).
  • The decision mark shows on every state: newest (approved, undecided), editing, an older version, a diff, a phone.
  • Phone top bar: 52 px in every state (at rest, older, diff, undecided), the Inbox list's phone header is 52 px; main was 57 px plus a second 60 px row.

Round three (the independent read of round two)

  • The decision's card by keyboard: Escape, or a press outside, closes it, and focus handed back to the mark does not open it again (a new hover, press or focus arrival does). Tab from the mark goes into the card, past Base UI's focus guard, and reaches Dismiss; Shift+Tab, or Tab out of the card's far end, closes it and moves on. Dismiss moves focus to the mark first; the card stays with the decision and its version. The card is named by the decision's line. On a phone, Dismiss keeps its 24 px look with a 44 px hit area. Each of these is guarded by planDecision.test.tsx, which fails without each part, and was checked by keyboard in the built page.
  • A phone while editing (320 and 360 px, Share on): the bar overflowed and the page scrolled sideways. Done and Cancel now take the room of the decision's mark, the clock and Share. Versions is the first row of "…", the crumbs may shrink, and all of them come back with Done or Cancel. The 320 px spec now asserts the editing state.
  • A phone at rest under 400 px with Share on: "…" was pushed off the screen. Share is now its icon alone, with its words kept as its name (as Send's are), and the project name is cut shorter.
  • A phone's Global comment box docks at the foot over the bottom bar. Main does the same, measured at 393 px: box 688–828, Send row 791–852. The comment box's foot markers are only looked for inside the file pane, and the plan's bottom bar is outside the pane. On a phone the box is also anchored to the top bar's "…", outside any pane. So this is not a one-line marker change, and it is unchanged here.

On a phone the bar holds the project, Share (when on) and the page's menu;
the approval and the version sit above the document's own title, and the
bar takes the plan's name once that title scrolls away. The file-name row
and the chips row are gone: Edit, Global comment, Files, Contents, Copy
file, Download and Close are in the menu. Tools, comments and Send are one
bar at the bottom. A computer keeps Edit and the version on the pinned
reading line, with Copy file, Download and Full screen in a menu at its end
and Global comment as a mark in the bottom bar.

Seams: the file pane's host prop (no head row, tools and comments into the
host's bar), the Viewer's openGlobalComment/copyDocument handle (its DOM
unchanged), RailSheet open/onOpenChange/trigger, ContentsPanel opener.
@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 23, 2026
…mputer, one-row phone bar, no name flash, Copied! in the menu, Send line kept on a computer
…ox-plan-header-a3

# Conflicts:
#	apps/inbox/index.css
#	tests/inbox-size-ceilings.json
…e newest is read; Versions closed until opened (A2)
…rsions closed until the clock opens it, the pencil starts an edit
…e clock; at 820 px the Contents rail shows, so the spec checks the rail (the shard 4 failure)
… phone bar

The approval sentence leaves the bar: the plan's decision is one mark at the
right (approved, changes asked, no decision), with a card on hover, keyboard
focus or a press that holds the decision's line, its version and when, and
the moved notice with its Dismiss. Approve stays a button beside it. On a
phone the line above the title is gone: Approve, the mark and the clock sit
at the end of the one top bar, now as tall as the list's own phone header;
an older version or a comparison says so in that bar, with Back to version
and Restore in the menu, so no second row stacks under it.

Review fixes: a saved global comment opens again on the bottom bar's Global
comment (the Viewer's reopenComment takes the host's anchor); the pencil
waits while an edit opens; the menu's rows read the page's handlers when
pressed; the clock keeps aria-expanded only; the back arrow is named Back to
Spaces; dead code removed.
…ow window's bar is read after the files rail gives way
…e and Cancel at the bar's control height

While editing on a phone, the bar is the sidebar button, Done, Cancel and the menu: the crumbs beside them were cut to a
few letters at 320 px, so they are not drawn then (the page's region keeps the plan's name). Done and Cancel are 32 px
to see with a 44 px hit area instead of a 44 px block filling the 52 px bar. The bar at rest is unchanged.
@backnotprop
backnotprop marked this pull request as ready for review November 27, 2026 00:58
@backnotprop
backnotprop merged commit cb9b0b8 into main Nov 27, 2026
73 of 75 checks passed
yermakoffivan pushed a commit to yermakoffivan/plannotator that referenced this pull request Nov 27, 2026
…d Pele 1.13

core 0.25.35 carries what merged after 0.25.34 went to npm: exact-phrase
search in inbox-search (words in double quotes, backnotprop#4117, backnotprop#4124) and the
agent-gone event in external-annotation's ExternalAnnotationEvent (backnotprop#3698).
No exports subpath changes.

ui handles that agent-gone event, so its pin follows and core goes first.
ui 0.67.0 is a minor: DiagramSourceAcceptContext lets a host refuse a fence
by its source before any engine runs (backnotprop#4146), DIAGRAM_REFUSED_RESULT is
exported, Pele 1.13.0 with the inline fit changes (backnotprop#4113), the agent-gone
send failures (backnotprop#3698) and the plan header seams (backnotprop#3905). README and HANDOFF
name the new pair and the order (core first), and the hook and Pele notes
now name ui 0.67.0 instead of "the first ui after 0.66.0".

bun.lock is bun install's own output: the two package version lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant