Skip to content

fleet: the proposals push names the newest proposal and opens the Proposed group on it - #1026

Merged
ZacxDev merged 2 commits into
mainfrom
fix/fleet-push-opens-proposal
Nov 23, 2026
Merged

ZacxDev merged 2 commits into
mainfrom
fix/fleet-push-opens-proposal

Conversation

@ZacxDev

@ZacxDev ZacxDev commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

What was wrong

The fleet's batched push ("N proposals waiting") opened /?chief=open. Home redirects / to the chief's own chat page, which draws no chief panel, and the redirect dropped the query. So the tap landed on the chief's chat with no digest on screen. The Attention notice beside the push had no link. And even where the panel did open, the digest's groups start closed, so the Proposed group was hidden.

What changes

  • Tap target. The push and the Attention notice link to /tasks?chief=open&fleet=proposed[&proposal=<id>] (ui.FleetProposalsURL). The panel script asks for the card with those parameters while the panel is still shut. The server draws the Proposed group open (on a phone, its sheet) with that proposal outlined (data-fleet-highlight). The panel then slides in and scrolls to the card, so Approve, Edit and Reject are on screen. Because the card lands while the panel is off screen, the arrival shifts nothing. If the proposal no longer waits, a line says so with the time ("That proposal expired at …", "…was already approved / rejected at …", "…not sent: its session moved on") and the newest proposal still waiting is outlined instead. An older /?chief=open link now goes to the board with its query.
  • The push names the proposal. Example: Wrap 'muster-asks-ux'? +2 more. Nothing is sent until you approve them. The name is the label the card shows, with control and format characters removed, straight quotes curled, and a 40-rune cap. The push never includes a message's text or a reason. It has no actions and keeps the same tag. FleetNotFromPhone and fleetCardRefusal are unchanged.
  • Cards show expiry. Each card reads "expires in 3h (10:07 PM)". The time comes from the new fleet.ExpiresAt (ProposalTTL), which the tap and the draw now also use, and the clock is drawn in the reader's own time zone.
  • Docs: docs/chief.md (Fleet proposals: the cards and the push). No migration. CHANGELOG.md is generated at release time (scripts/changelog-bump.sh, "do not edit it by hand"), so it is not edited here.

Tests

  • Go (pg): TestTheFleetPushNamesTheNewestProposalAndOpensIt drives the real pass into a captured Web Push. It checks literal bodies (n=1, and n=2 with a capped, quoted name), the url, the title and that there are no actions. TestAChiefOpenLinkReachesThePanel, TestTheFleetNoticeLinksTheDigest and TestAFleetLinkOpensTheProposedGroupOnItsProposal cover the open group, the highlight, the gone lines (rejected, expired at its 12 h, none waiting, unknown id), the expiry line and a control with no parameter.
  • Go (unit): TestThePushNamesEveryClass and TestThePushBodyLiterals. These are invariant pins on new symbols, not regression tests.
  • e2e: chief-fleet-proposals.spec.ts has a new test at 390×844 and 1280×800. It arrives by the push URL and checks:
    • the panel is open on the Proposed group (sheet or <details open>);
    • the newest card is highlighted and its Approve is in view;
    • each card's expiry line, in the reader's clock;
    • the address bar is cleaned;
    • layout shift is under 0.01;
    • Approve works;
    • arriving later on an expired proposal and on an approved one shows the line.

Red/green: the four Go regression tests and the new e2e test fail at origin/main on their own assertions and pass on this branch.

🤖 Generated with Claude Code

The batched fleet push opened `/?chief=open`, which home redirected to the
chief's own chat page (no chief panel there) with the parameter dropped, so
its tap never showed the digest; its Attention notice linked nowhere.

- The push's tap and the notice's link open the board with the chief panel
  on the digest's Proposed group (on a phone, its sheet), scrolled to the
  newest proposal and outlined (/tasks?chief=open&fleet=proposed&proposal=<id>).
  The card lands while the panel is shut, so the arrival shifts nothing.
  A proposal that no longer waits says so (expired, approved, rejected,
  not sent), with when. An older `/?chief=open` goes to the board too.
- The push names what is proposed and the session ("Wrap 'muster-asks-ux'?
  +2 more."), name capped at 40 runes, no message text, no actions.
- Each card says when it expires, from fleet.ExpiresAt (ProposalTTL).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ZacxDev
ZacxDev marked this pull request as ready for review November 23, 2026 21:06
@ZacxDev
ZacxDev merged commit a1773da into main Nov 23, 2026
33 checks passed
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