oficina / equipo Public

Merge branch 'daily-rollup' into main

Merge daily-rollup: earlier days fold into day boxes

The conversation folds earlier days into day boxes that expand in
place. Hosted CI passed on bdecedf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev b1c1e5a4abf3d7b03bd075315aaf1a144e0f9146 parent 7fde334parent bdecedf
12 files changed, +1,316 −130
  • .rastrillo/budgets.txt +4 −4
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +71 −0
  • internal/equipo/chat/days.go +370 −0
  • internal/equipo/chat_days.go +376 −0
  • internal/equipo/chat_page.go +35 −44
  • internal/equipo/copy.go +58 −44
  • internal/equipo/static/chat-stream.js +40 −1
  • internal/equipo/static/equipo.css +34 −0
  • internal/equipo/templates/chat.html +26 −12
  • internal/equipo/work_pages.go +0 −25
  • internal/thintest/rollup_browser_test.go +65 −0
  • internal/thintest/rollup_pages_test.go +237 −0

CI passed — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 1cfbb113..beb700d3 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,7 +14,7 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr
time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI.
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
-size internal/equipo 17513 - Explore fastlane 2 merged onto preview hosts: measured 17513. Waiting lines in one sentence and the direction panel's order: waitReason, the link line under the question (about 21 lines); measured 17449. Preview hosts add Settings > Machines' Previews section (which machine hosts previews, how to pair one), the tailnet card line that leaves when the task ends and the pairing link on an exploration's card (about 65 lines); measured 17492. Exploration fast-lane fixes: an exploration's own track, its pre-switch merges left out of the pages with one line, the old merge card reworded, Needs you led by the card's question (about 71 lines); measured 17428. Exploration tasks: the direction decision with its preview or branch link and note field, the Exploration badge, the kind switch in the task menu and its page action, and 22 strings (about 86 lines); measured 17357. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 17271. The first merge into an empty repository: the task line says it waits on Amadan (triageLine and two copy strings, about 7 lines); measured 17180. Release previews add the preview step to the timeline (prepared, then ready with its link), the task card's preview line with its expiry, and keep previews out of the live and stopped step and the card lines (about 90 lines); measured 17264. Needs-you triage: the task page's triage lines, recommendation and Try another round (triageAdvice, triageLine, workTaskRound, about 84 lines); measured 17173. Mac checks wait for the sandbox: the waiting line and summary, the decision card with Run outside the sandbox and its warning, its route and handler, and 7 strings (about 51 lines, with the sandbox_unproven reason); measured 17089. Empty repositories merged onto main: measured 17037. The access card picks its grant line and namespace from the card's name (GrantHow, about 6 lines). The paste box's look adds its three labels (Prompt, Text, Command) and pasteBox, which gives the renderer Copy's icons (about 13 lines); measured 17031. Token row facts merged onto main: measured 17018. Token row facts add the row's stated email and usage line (rowFacts), the email route and its field, connections.js keeping an open field across refreshes, their CSS and 8 strings (about 90 lines); measured 17009. Merge authority merged onto Machines in Settings and stale thinking lines: measured 16914. Stale thinking lines (the queued note in chat_page.go and chat.html, the refresh and turn ownership in chat-stream.js, about 60 lines) merged onto Machines in Settings: measured 16725. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here. Merge authority thin v1 adds the project page's "How Equipo merges" section and form (merge_policy_page.go, about 90 lines) and 86 strings; measured 16568 with main (spend-1, the four UI branches) merged. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here.
+size internal/equipo 17869 - Daily rollup merged onto main: measured 17869. The daily roll-up: earlier days as day boxes on the conversation page, the open items at the top of today, a day opened in place (chat_days.go, about 330 lines without the withMessage it replaces), the day box and line templates, their CSS, chat-stream.js keeping an opened day open and 13 strings; measured 17784. Explore fastlane 2 merged onto preview hosts: measured 17513. Waiting lines in one sentence and the direction panel's order: waitReason, the link line under the question (about 21 lines); measured 17449. Preview hosts add Settings > Machines' Previews section (which machine hosts previews, how to pair one), the tailnet card line that leaves when the task ends and the pairing link on an exploration's card (about 65 lines); measured 17492. Exploration fast-lane fixes: an exploration's own track, its pre-switch merges left out of the pages with one line, the old merge card reworded, Needs you led by the card's question (about 71 lines); measured 17428. Exploration tasks: the direction decision with its preview or branch link and note field, the Exploration badge, the kind switch in the task menu and its page action, and 22 strings (about 86 lines); measured 17357. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 17271. The first merge into an empty repository: the task line says it waits on Amadan (triageLine and two copy strings, about 7 lines); measured 17180. Release previews add the preview step to the timeline (prepared, then ready with its link), the task card's preview line with its expiry, and keep previews out of the live and stopped step and the card lines (about 90 lines); measured 17264. Needs-you triage: the task page's triage lines, recommendation and Try another round (triageAdvice, triageLine, workTaskRound, about 84 lines); measured 17173. Mac checks wait for the sandbox: the waiting line and summary, the decision card with Run outside the sandbox and its warning, its route and handler, and 7 strings (about 51 lines, with the sandbox_unproven reason); measured 17089. Empty repositories merged onto main: measured 17037. The access card picks its grant line and namespace from the card's name (GrantHow, about 6 lines). The paste box's look adds its three labels (Prompt, Text, Command) and pasteBox, which gives the renderer Copy's icons (about 13 lines); measured 17031. Token row facts merged onto main: measured 17018. Token row facts add the row's stated email and usage line (rowFacts), the email route and its field, connections.js keeping an open field across refreshes, their CSS and 8 strings (about 90 lines); measured 17009. Merge authority merged onto Machines in Settings and stale thinking lines: measured 16914. Stale thinking lines (the queued note in chat_page.go and chat.html, the refresh and turn ownership in chat-stream.js, about 60 lines) merged onto Machines in Settings: measured 16725. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here. Merge authority thin v1 adds the project page's "How Equipo merges" section and form (merge_policy_page.go, about 90 lines) and 86 strings; measured 16568 with main (spend-1, the four UI branches) merged. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. Machines in Settings adds the Machines list and Add a machine screens (machines_view.go, the runners.html rewrite, machines.js, their CSS, three icons and 35 strings, about 280 lines); measured 16664. Spend 1 (work_spend.go and the task page lines, about 90 lines) merged onto the four UI branches: measured 16381. The team panel merged onto Projects UX, the Settings pattern and the Connections countdown: measured 16280 with all four. The team panel adds the compact specialist rows, the drawer page and its view (team_panel.go, team.html, team-panel.js, about 420 lines), the activity wording (team_activity.go) and their CSS and copy; the command reading went to its own package (internal/equipo/activity); measured 15788. Projects UX merged onto the Connections countdown and the Settings pattern: measured 15942 with all three. Projects UX adds the Projects page order (starred, active, quiet folded), the auto-star rules and their receipt, whole-word descriptions and the star action (project_order.go, about 200 lines), the Mac decision and Ask about this; measured 15815. Connection resets as a countdown (inText and its words, about 60 lines) and the Settings page pattern (settings_hub.go, team_links.go, about 30 lines) together; measured 15577 with both merged. The Connections Add page and four display fixes add the Add page handler, account naming, stale meter filtering and the resting row's destination (connections_view.go, chat_connections.go, about 120 lines); measured 15467. Claude setup tokens add the token card, sealing route and Check again beside the composer and Mac lines; measured 15350. Settings in sections adds the section pages, the secondary menu and the old URLs' redirects (settings_hub.go, about 110 lines, less the removed Thinking words page); measured 14922. Mac runners (Darwin worker) add the one-tap enrolment link, the runners view's self-probes, /install.sh, the outside-the-sandbox label and their copy (about 90 lines); measured 15058. Mac runners add the runner role, the protocol route and the placement minute, then two-phase removal, Remove now and Recover (about 110 lines). Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. Thin v1 UX1 thinking words adds the settings page and the set registry wiring (thinking_words.go) and 55 strings of phrases; measured 14411. The Connections page to Paul's approved mockup (connections_view.go: what is answering, the preference, rows with headroom, roles, usage and the recovery action, about 300 lines); measured 14268. Merged with UX1 round 3 (duplicate combining with Undo, timeline headlines) beside the Connections page; measured 13895. Connections slice 1 adds the Connections page, the switched line and the no_connection card and their copy (chat_connections.go, about 220 lines). Measured 12269. Thin v1 UX1 adds the inner screens' view model (work_views.go: stage track, badges, timeline, decisions, project facts, about 830 lines), the rich page handlers and their copy (about 170 lines); measured 13263. Thin v1 slice 4c adds the merged line, the merge card and its copy (about 60 lines). Thin v1 slice 4 adds the thin sidebar (rail.go), review and checks lines on the task card and pages, and their copy (about 190 lines). Thin v1 slice 3 adds the task card, the thin Tasks and Projects pages and their actions over the chat store, and their copy (about 280 lines). Thin v1 slice 2 adds activity labels, card copy and card rendering on the chat page (about 250 lines); slice 1 added the chat wiring and page (about 180 lines) beside code its slice 7 sweep deletes (the live hub, the old coordinator); lower then. Task 7 keeps the existing ceiling by moving transaction-bound event lookup into conversation. Measured 10796 source and 437 test lines; roster, database, pending copy and execution wiring remain here.
size internal/equipotest - 13400 Task 21 repairs historical migration and conversation fixtures after Plan 3. Measured 13024 test lines; the 300s time ceiling is unchanged.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded); 60s gives 34 percent headroom. Shared baseline capture reduces repeated Go runs; retain the CI allowance for sandbox sentinels, timeout and child cleanup. 2026-11-07: loaded CI (host load about 24) measured 66.5s with the package unchanged by thin v1 slice 4 beyond optional check mounts; 90s keeps 35 percent headroom.
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s). Parallel plan graphs and removal of repeated progress floods reduced their local targeted run from 146.920s to 30.784s; the original bug graph retains volume coverage. Keep 330s for journal, proxy, recovery and namespace integration, with 13 percent headroom.
@@ -49,7 +49,7 @@ perf GET /api/v1/notebook skip Thin v1 person API: bearer-only JSON for devices;
perf GET /api/v1/thinking skip Thin v1 person API: bearer-only JSON for devices; the browser reads thinking words on /settings/thinking.
perf GET /api/v1/tasks skip Thin v1 person API: bearer-only JSON for devices; the browser reads tasks through /tasks.
perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads a task through /tasks/{id}.
-size internal/equipo/chat 16321 - Preview hosts accept a devbox app (eq-<task>) beside a temporary site; measured 16321. Exploration tasks: explore.go (the flow, the direction card and its three answers, Build this one in one transaction, the kind switch at rest, the one-time start-up switch, the preview line, previews advertised later; about 560 lines) and kind-aware progress, briefs, duplicates and the gate's input (about 90 lines); measured 16319. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 15668. The first merge into an empty repository: the task waits on the platform (triageView, about 4 lines); measured 15347. Release previews Astra round 2 adds settlePreview: a started preview is never replaced, a withdrawn one keeps its outcome (about 45 lines); measured 15664. Release previews add the preview step's store side (preview.go: scheduling once per approved candidate, the start and publish checks inside the lease transaction, the built and done reports' acceptance, the fence for older runners and the audit rows, about 260 lines); measured 15619. Needs-you triage: triage's three actions, the stall sweep, the ledger's rounds, the view and RoundTask (triage.go, about 690 lines; retryStep factored out of RetryTask); measured 15343. Mac checks wait for the sandbox: placement holds checks off a Mac whose sandbox is not proven (waiting_sandbox), the refusal puts them back to wait, a newly proven hello places them, recheckMac skips an unproven Mac, and RunUnsandboxed records and audits the creator's choice (macsandbox.go; about 186 lines); measured 14519. Empty repositories merged onto main: measured 14333. Empty repositories: the read gate answers empty and not read yet, find covers repositories on the runner's list, and the access card names a namespace only from ns/repo (AccessName, GrantNamespace; about 58 lines). Token row facts merged onto main: measured 14275. Token row facts add the stated email's store write with its shape check and the row facts read (StatedEmailShape, SetStatedEmail, ConnectionRowFacts, about 95 lines); measured 14195. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep. The duplicate keep rule merged onto main: measured 14175. The duplicate combine keeps the decided task: the housekeeping view reads each task's newest merge card and marks it Decided (about 12 lines); measured 14110. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep. Release slice 1 (hosted checks) adds the hosted CI offer, the binding's acceptance inside the step report's transaction, the hosted sandbox rule and the fix round's failing units (about 65 lines); measured 14160. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep.
+size internal/equipo/chat 16691 - Daily rollup merged onto main: measured 16691. The daily roll-up reads: days with messages, a day's window, what is still open and a day's records for its box (days.go, about 370 lines), reads only; measured 16689. Preview hosts accept a devbox app (eq-<task>) beside a temporary site; measured 16321. Exploration tasks: explore.go (the flow, the direction card and its three answers, Build this one in one transaction, the kind switch at rest, the one-time start-up switch, the preview line, previews advertised later; about 560 lines) and kind-aware progress, briefs, duplicates and the gate's input (about 90 lines); measured 16319. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 15668. The first merge into an empty repository: the task waits on the platform (triageView, about 4 lines); measured 15347. Release previews Astra round 2 adds settlePreview: a started preview is never replaced, a withdrawn one keeps its outcome (about 45 lines); measured 15664. Release previews add the preview step's store side (preview.go: scheduling once per approved candidate, the start and publish checks inside the lease transaction, the built and done reports' acceptance, the fence for older runners and the audit rows, about 260 lines); measured 15619. Needs-you triage: triage's three actions, the stall sweep, the ledger's rounds, the view and RoundTask (triage.go, about 690 lines; retryStep factored out of RetryTask); measured 15343. Mac checks wait for the sandbox: placement holds checks off a Mac whose sandbox is not proven (waiting_sandbox), the refusal puts them back to wait, a newly proven hello places them, recheckMac skips an unproven Mac, and RunUnsandboxed records and audits the creator's choice (macsandbox.go; about 186 lines); measured 14519. Empty repositories merged onto main: measured 14333. Empty repositories: the read gate answers empty and not read yet, find covers repositories on the runner's list, and the access card names a namespace only from ns/repo (AccessName, GrantNamespace; about 58 lines). Token row facts merged onto main: measured 14275. Token row facts add the stated email's store write with its shape check and the row facts read (StatedEmailShape, SetStatedEmail, ConnectionRowFacts, about 95 lines); measured 14195. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep. The duplicate keep rule merged onto main: measured 14175. The duplicate combine keeps the decided task: the housekeeping view reads each task's newest merge card and marks it Decided (about 12 lines); measured 14110. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep. Release slice 1 (hosted checks) adds the hosted CI offer, the binding's acceptance inside the step report's transaction, the hosted sandbox rule and the fix round's failing units (about 65 lines); measured 14160. Turn batching adds turnText, the frame fit (fitTail, batchFull) and the stranded-turn recovery in sync (about 115 lines); measured 14095. The re-run ruling (recheckMayMerge, refreshAfterRecheck, about 70 lines); measured 13981. Merge authority thin v1 adds the gate's store side (mergeauth.go: authorizeMerge before dispatch and at each hub request, the fence for runners below the merge-facts protocol, the ask card in Equipo's words, the ships question, receipts with Undo, the policy tool and API, about 1000 lines); the gate is pure, in internal/equipo/mergegate, but its inputs and audit must be read and written inside the store's transactions. Measured 13204. Mac recheck runs a waiting task's needs_macos checks again when a Mac that fits arrives (macrecheck.go, about 90 lines); measured 12485. Spend 1 merged onto Projects UX: measured 12376 with both. Spend 1 adds a task's spend from its usage rows (TaskSpend, about 60 lines) and the usage rows' round; measured 12047. Projects UX adds per-person project stars with the auto-star reconciliation, the person's and the coordinator's star_project (stars.go, about 210 lines) and the project's own repository in its view; measured 12206. Claude's sign-in by a link adds the code route beside the token's in SendSecret, the sign-in prompt and the kind it becomes (about 40 lines); measured 11933. Mac runners slices A and B add per-runner mailboxes, placement, withdrawal, the offline rule, the runners view, transfers and publication (runners.go, transfers.go, about 1100 lines). Composer attachments add uploads, the message link, the mailbox relay with chunk frames hydrated from the stored file, and serving (attachments.go, attachments_http.go, about 330 lines); the link and relay run inside the send and dispatch transactions, so they live beside them; sniffing and stripping are pure, in internal/attach. Measured 10292. Merged with UX1 thinking words (f2602d3), measured 9801. Housekeeping slice 1 adds the loop's ledger and state machine, the housekeeping principal's checks inside the shared store functions, reservations, Pause, quiet hours, the digest, claim recovery and the API (housekeeping.go, housekeeping_control.go, housekeeping_http.go, about 1,350 lines); the checks must run inside the store's transactions, so they live beside them; the detectors themselves are pure, in internal/equipo/housekeeping. Measured 9637. Thin v1 UX1 thinking words adds the per-person set and its API (thinking.go, about 100 lines); measured 8305. Connections slice 1 review round 2: the mutation ledger matches record_task by subject only and refuses an ambiguous call with the earlier operations, the preference and forget (about 120 lines); measured 8236. Thin v1 UX1 round 3 adds Equipo combining duplicate tasks reversibly (duplicates.go: detection, the in-transaction fold checks, fold, Undo, about 400 lines) and headlines on findings and steps (headline.go); measured 7898. Connections slice 1 adds connection records from hello and attempts, the connect mailbox, the API, usage rows and the turn's mutation ledger (connections.go and tools.go, about 600 lines); measured 7400 after merging UX1. Thin v1 UX1 adds step activity lines, duplicates and their fold, the coordinator at work on a task, project facts from the runner catalog and open merge cards for the pages (inner.go, about 330 lines); measured 6610 with slice 4c's review fixes. Thin v1 slice 4c adds the merge policy, the merge card, the rebase round and duplicate reports (merge.go, about 380 lines). Thin v1 instance core: conversation, projects, tasks, review and, from slice 4b, questions to the specialists (questions.go, about 470 lines) share one store, transaction and event log; splitting would export the transaction internals. Measured 5514 source lines; revisit at the slice 7 sweep.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
@@ -61,6 +61,6 @@ perf GET /conversation/attachments/{id} skip Composer attachments: the bytes of
perf GET /conversation/attachments/{id}/preview skip Composer attachments: an image thumbnail inside the conversation; a file, not a screen.
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s Mac runners slice B: TestReleaseRunnerHasNoFakeWorker builds the release runner exactly as make release-runner does and the thin package under the testbuild tag (measured 11.9s locally with a warm cache).
-size internal/headless - 9387 Empty repository fix rounds add scenario 3_empty_fix_round (a fix round pushed as a fast-forward, main still unborn; about 61 lines); measured 9387. An unborn default in one request adds scenario 3_empty_merge_rebuilt, threatmin's state through the real runner (RebuildHead, about 65 lines); measured 9326. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 9261. The first merge into an empty repository adds scenario 3_empty_merge through both hubs (HubUpdate, about 89 lines); measured 9261. Needs-you triage merged onto main: measured 9172. Needs-you triage: scenario 4 checks the automatic retry's receipt (about 12 lines). Empty repositories merged onto main: measured 9099. Empty repositories add scenario 3_empty_repo through the real runner (grantEmpty, GrantEmpty and Indexed controls; about 87 lines). The paste box's look adds TestBrowserPasteBoxLook (one unit at 1280 and 390, light and dark: the bar inside the box, the labels, the prompt wrapped in the body font, the command scrolling, the tick and Copied without the bar moving; about 60 lines) and the streaming icon check; measured 9012. Copy's drive records what paste.js hands the clipboard API and the execCommand fallback on every run, and reads the real clipboard back only where the browser grants it (CI's Chromium refused it; about 34 lines); measured 8949. Copy's real clipboard drive and the stale page reload merged onto token row facts: measured 8915. They add browser_paste_copy_test.go (about 166 lines: both replies and the fallback through the real clipboard, the older page that reloads when quiet, the composer that holds it, the place kept and no loop); measured 8845. Token row facts merged onto main: measured 8749. Token row facts add TestHeadlessTokenCheckHeadroom (a check's windows and a quota-refused check through the real runner and fake CLI, about 70 lines); measured 8593. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The duplicate keep rule merged onto main: measured 8679. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Release slice 1 merged onto main: measured 8679. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Engineering in an empty repository adds scenario 3_empty_engineering (about 64 lines); measured 9163. Empty repositories merged onto main: measured 9099. Empty repositories add scenario 3_empty_repo through the real runner (grantEmpty, GrantEmpty and Indexed controls; about 87 lines). The paste box's look adds TestBrowserPasteBoxLook (one unit at 1280 and 390, light and dark: the bar inside the box, the labels, the prompt wrapped in the body font, the command scrolling, the tick and Copied without the bar moving; about 60 lines) and the streaming icon check; measured 9012. Copy's drive records what paste.js hands the clipboard API and the execCommand fallback on every run, and reads the real clipboard back only where the browser grants it (CI's Chromium refused it; about 34 lines); measured 8949. Copy's real clipboard drive and the stale page reload merged onto token row facts: measured 8915. They add browser_paste_copy_test.go (about 166 lines: both replies and the fallback through the real clipboard, the older page that reloads when quiet, the composer that holds it, the place kept and no loop); measured 8845. Token row facts merged onto main: measured 8749. Token row facts add TestHeadlessTokenCheckHeadroom (a check's windows and a quota-refused check through the real runner and fake CLI, about 70 lines); measured 8593. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The duplicate keep rule merged onto main: measured 8679. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Release slice 1 merged onto main: measured 8679. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090.
-size internal/thintest - 16108 Explore fastlane 2 merged onto preview hosts: measured 16108. The direction panel's order and the one-sentence waiting line in TestExploreNeedsYou (about 15 lines); measured 16063. Preview hosts add the devbox contract (Machines line, tailnet card, gone when the task ends) and the pairing link checks; measured 16093. Exploration fast-lane fixes: TestExploreNeedsYou and TestExploreTrackAndHistory on staging's barber history (about 110 lines); measured 16048. Exploration tasks: TestExplore* contracts (flow, build, try again, drop, never merges, kind switch, round trip, previews off and later, once at start-up, kinds not duplicates, direction stays; about 474 lines); measured 15938. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 15464. The merge adds a protocol 8 primary to TestContractPreviewNotScheduled and moves the fence to protocol 8 (about 5 lines). The first merge into an empty repository adds TestTriageWaitsOnThePlatform (about 61 lines); measured 15223. Release previews add their contracts (preview_contract_test.go: scheduling, the start and publish checks bound to the export, the card and timeline, audit rows, a quiet failure, the fence; about 240 lines); measured 15399. Timeline star alignment adds 44 browser regression lines in inner_browser_test.go for central-star geometry on full and compact tracks at desktop/mobile sizes with normal and reduced motion, using the existing instance/browser harness; measured 15162 with the current default branch merged. Needs-you triage merged onto main: measured 15118. Needs-you triage: TestTriage* contracts (retry, merge never, rebase chain, stale checks, recommendation, budget, staleness, re-triage, untouched, the stall sweep; about 634 lines); measured 15118. Mac checks wait for the sandbox: the staging sequence through placement and the page, a proven sandbox and a refusal, and the Mac re-check (sandbox_wait_contract_test.go, about 237 lines); measured 14484. Empty repositories merged onto main: measured 14247. Empty repositories add TestContractEmptyRepository and TestAccessName and extend the grant card page test to a named namespace (about 138 lines). Token row facts merged onto main: measured 14109. Token row facts add the token row's page and browser tests (token_row_pages_test.go, token_row_browser_test.go, about 225 lines); measured 13902. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The duplicate keep rule merged onto main: measured 13885. The duplicate combine keeps the decided task adds staging's Woodstar pair as a contract through the real store (TestContractCombineKeepsDecided, about 60 lines); measured 13747. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Release slice 1 merged onto main: measured 13823. Release slice 1 (hosted checks) adds its contracts (hosted_checks_contract_test.go: the pass that asks, the failure's fix round, every binding rule, the protocol 4 runner; about 140 lines); measured 13816. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Mac checks wait for the sandbox: the staging sequence through placement and the page, a proven sandbox and a refusal, and the Mac re-check (sandbox_wait_contract_test.go, about 237 lines); measured 14484. Empty repositories merged onto main: measured 14247. Empty repositories add TestContractEmptyRepository and TestAccessName and extend the grant card page test to a named namespace (about 138 lines). Token row facts merged onto main: measured 14109. Token row facts add the token row's page and browser tests (token_row_pages_test.go, token_row_browser_test.go, about 225 lines); measured 13902. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The duplicate keep rule merged onto main: measured 13885. The duplicate combine keeps the decided task adds staging's Woodstar pair as a contract through the real store (TestContractCombineKeepsDecided, about 60 lines); measured 13747. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Release slice 1 merged onto main: measured 13823. Release slice 1 (hosted checks) adds its contracts (hosted_checks_contract_test.go: the pass that asks, the failure's fix round, every binding rule, the protocol 4 runner; about 140 lines); measured 13816. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness.
+size internal/headless - 9387 Daily rollup merged onto main: measured 9387. An unborn default in one request adds scenario 3_empty_merge_rebuilt, threatmin's state through the real runner (RebuildHead, about 65 lines); measured 9326. Empty repository fix rounds add scenario 3_empty_fix_round (a fix round pushed as a fast-forward, main still unborn; about 61 lines); measured 9387. An unborn default in one request adds scenario 3_empty_merge_rebuilt, threatmin's state through the real runner (RebuildHead, about 65 lines); measured 9326. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 9261. The first merge into an empty repository adds scenario 3_empty_merge through both hubs (HubUpdate, about 89 lines); measured 9261. Needs-you triage merged onto main: measured 9172. Needs-you triage: scenario 4 checks the automatic retry's receipt (about 12 lines). Empty repositories merged onto main: measured 9099. Empty repositories add scenario 3_empty_repo through the real runner (grantEmpty, GrantEmpty and Indexed controls; about 87 lines). The paste box's look adds TestBrowserPasteBoxLook (one unit at 1280 and 390, light and dark: the bar inside the box, the labels, the prompt wrapped in the body font, the command scrolling, the tick and Copied without the bar moving; about 60 lines) and the streaming icon check; measured 9012. Copy's drive records what paste.js hands the clipboard API and the execCommand fallback on every run, and reads the real clipboard back only where the browser grants it (CI's Chromium refused it; about 34 lines); measured 8949. Copy's real clipboard drive and the stale page reload merged onto token row facts: measured 8915. They add browser_paste_copy_test.go (about 166 lines: both replies and the fallback through the real clipboard, the older page that reloads when quiet, the composer that holds it, the place kept and no loop); measured 8845. Token row facts merged onto main: measured 8749. Token row facts add TestHeadlessTokenCheckHeadroom (a check's windows and a quota-refused check through the real runner and fake CLI, about 70 lines); measured 8593. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The duplicate keep rule merged onto main: measured 8679. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Release slice 1 merged onto main: measured 8679. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Engineering in an empty repository adds scenario 3_empty_engineering (about 64 lines); measured 9163. Empty repositories merged onto main: measured 9099. Empty repositories add scenario 3_empty_repo through the real runner (grantEmpty, GrantEmpty and Indexed controls; about 87 lines). The paste box's look adds TestBrowserPasteBoxLook (one unit at 1280 and 390, light and dark: the bar inside the box, the labels, the prompt wrapped in the body font, the command scrolling, the tick and Copied without the bar moving; about 60 lines) and the streaming icon check; measured 9012. Copy's drive records what paste.js hands the clipboard API and the execCommand fallback on every run, and reads the real clipboard back only where the browser grants it (CI's Chromium refused it; about 34 lines); measured 8949. Copy's real clipboard drive and the stale page reload merged onto token row facts: measured 8915. They add browser_paste_copy_test.go (about 166 lines: both replies and the fallback through the real clipboard, the older page that reloads when quiet, the composer that holds it, the place kept and no loop); measured 8845. Token row facts merged onto main: measured 8749. Token row facts add TestHeadlessTokenCheckHeadroom (a check's windows and a quota-refused check through the real runner and fake CLI, about 70 lines); measured 8593. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The duplicate keep rule merged onto main: measured 8679. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Release slice 1 merged onto main: measured 8679. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. The draft stream drive records each draw and the commit (about 27 lines) merged onto the paste box: measured 8679. The paste box merged onto turn batching: measured 8652. The paste box adds its browser drive (browser_paste_test.go, about 130 lines: streaming, copy text, keyboard, scripts off); measured 8464. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090. Turn batching merged onto the browser lane: measured 8523. Turn batching adds TestHeadlessTurnBatching (three messages behind a slow turn through the real runner and fake CLI: the one next turn, its input, the bubbles and note, the usage rows and the spend lines) and TestHeadlessBatchAfterRefusedReply (the real runner reconnects after a refused reply), about 190 lines; measured 8518. Merge authority extends 4c_checks_card to end in Equipo's own merge, measured by the real runner, with its receipt (about 30 lines); measured 8330. Claude's sign-in by a link adds its end-to-end, contained-launch and real runner kill tests (signin_test.go, signin_contained_test.go, about 400 lines); measured 8090.
+size internal/thintest - 16410 Daily rollup merged onto main: measured 16410. The daily roll-up: TestRollupDayBox, TestRollupExpand and TestBrowserRollup on a rig with yesterday behind it (about 300 lines); measured 16350. Explore fastlane 2 merged onto preview hosts: measured 16108. The direction panel's order and the one-sentence waiting line in TestExploreNeedsYou (about 15 lines); measured 16063. Preview hosts add the devbox contract (Machines line, tailnet card, gone when the task ends) and the pairing link checks; measured 16093. Exploration fast-lane fixes: TestExploreNeedsYou and TestExploreTrackAndHistory on staging's barber history (about 110 lines); measured 16048. Exploration tasks: TestExplore* contracts (flow, build, try again, drop, never merges, kind switch, round trip, previews off and later, once at start-up, kinds not duplicates, direction stays; about 474 lines); measured 15938. Release previews merged with the first merge into an empty repository (previews move to protocol 9, empty-repository merge keeps 8): measured 15464. The merge adds a protocol 8 primary to TestContractPreviewNotScheduled and moves the fence to protocol 8 (about 5 lines). The first merge into an empty repository adds TestTriageWaitsOnThePlatform (about 61 lines); measured 15223. Release previews add their contracts (preview_contract_test.go: scheduling, the start and publish checks bound to the export, the card and timeline, audit rows, a quiet failure, the fence; about 240 lines); measured 15399. Timeline star alignment adds 44 browser regression lines in inner_browser_test.go for central-star geometry on full and compact tracks at desktop/mobile sizes with normal and reduced motion, using the existing instance/browser harness; measured 15162 with the current default branch merged. Needs-you triage merged onto main: measured 15118. Needs-you triage: TestTriage* contracts (retry, merge never, rebase chain, stale checks, recommendation, budget, staleness, re-triage, untouched, the stall sweep; about 634 lines); measured 15118. Mac checks wait for the sandbox: the staging sequence through placement and the page, a proven sandbox and a refusal, and the Mac re-check (sandbox_wait_contract_test.go, about 237 lines); measured 14484. Empty repositories merged onto main: measured 14247. Empty repositories add TestContractEmptyRepository and TestAccessName and extend the grant card page test to a named namespace (about 138 lines). Token row facts merged onto main: measured 14109. Token row facts add the token row's page and browser tests (token_row_pages_test.go, token_row_browser_test.go, about 225 lines); measured 13902. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The duplicate keep rule merged onto main: measured 13885. The duplicate combine keeps the decided task adds staging's Woodstar pair as a contract through the real store (TestContractCombineKeepsDecided, about 60 lines); measured 13747. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Release slice 1 merged onto main: measured 13823. Release slice 1 (hosted checks) adds its contracts (hosted_checks_contract_test.go: the pass that asks, the failure's fix round, every binding rule, the protocol 4 runner; about 140 lines); measured 13816. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Mac checks wait for the sandbox: the staging sequence through placement and the page, a proven sandbox and a refusal, and the Mac re-check (sandbox_wait_contract_test.go, about 237 lines); measured 14484. Empty repositories merged onto main: measured 14247. Empty repositories add TestContractEmptyRepository and TestAccessName and extend the grant card page test to a named namespace (about 138 lines). Token row facts merged onto main: measured 14109. Token row facts add the token row's page and browser tests (token_row_pages_test.go, token_row_browser_test.go, about 225 lines); measured 13902. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The duplicate keep rule merged onto main: measured 13885. The duplicate combine keeps the decided task adds staging's Woodstar pair as a contract through the real store (TestContractCombineKeepsDecided, about 60 lines); measured 13747. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. Release slice 1 merged onto main: measured 13823. Release slice 1 (hosted checks) adds its contracts (hosted_checks_contract_test.go: the pass that asks, the failure's fix round, every binding rule, the protocol 4 runner; about 140 lines); measured 13816. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness. The InnerScreens transition wait merged onto main: measured 13685. The inner screens drive waits for the row menu's opacity transition to end before it reads the menu at rest (about 7 lines); measured 13251. Turn batching merged onto the ThinkingCycles clock fix (the drive takes a still clock and the page's record of each phrase, about 50 lines): measured 13678. Turn batching merged onto the browser lane: measured 13631. Turn batching adds its contracts (the crash between turns, the stranded recovery, failed, cancelled, interrupted and retried turns, the cancelled batch, the note clearing, batches split to fit one frame and the failed batch's note; about 430 lines); measured 13630 with the ship buttons merged. The ship buttons add their contract and browser tests (ships_buttons_test.go, ships_buttons_browser_test.go, about 190 lines); measured 13196. Merge authority merged onto Machines in Settings, with the re-run ruling's cases and stale thinking lines: measured 12998. Merge authority thin v1 adds its contracts (mergeauth_contract_test.go, about 650 lines) the protocol-aware rigs and the Mac re-run contract (macrecheck_mergeauth_contract_test.go) and the review fixes' contracts; measured 12535 with main merged. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Stale thinking lines merged onto Machines in Settings: measured 11967. Machines in Settings adds its fixture, page and browser tests (machines_fixture_test.go, machines_pages_test.go, machines_browser_test.go, about 160 lines); measured 11759. Stale thinking lines add their browser drive (stale_thinking_browser_test.go, about 200 lines) and the queued test now checks the note; measured 11795. Mac recheck adds its enrolment, skip and outcome contracts (macrecheck_contract_test.go, about 210 lines); measured 11537. Spend 1 merged onto the four UI branches: measured 11325. Spend 1 marks overcounting Claude rows (about 120 lines); it adds the task page's spend contract and the 0059 upgrade (spend_pages_test.go, about 100 lines) and the fix round feedback by protocol (about 40); measured 10224. The team panel merged onto Projects UX and the Settings UX pass: measured 11064 with all three. The team panel adds its page contract and the drawer's browser drive at 1280 and 390 (team_panel_test.go, team_panel_browser_test.go, about 300 lines); measured 10235. Projects UX merged onto the Settings UX pass: measured 10768 with both. Projects UX adds the Projects page contracts (order, quiet fold, filter, stars and Undo, the coordinator's star, repository counts, whole words), the decision cards' Mac and Ask about this contracts and their browser drive (projects_pages_test.go, projects_browser_test.go, about 330 lines); measured 10321. The Settings UX pass adds the Settings pattern's page contracts and the savebar, Housekeeping groups and Teams browser drives (settings_ux_pages_test.go, settings_ux_browser_test.go, about 430 lines); measured 10390. Claude's sign-in by a link adds the code contract (signin_contract_test.go: the card, the code route's refusals, the wrong-code card, the kind it becomes and the canary sweep, about 220 lines); measured 9896. The Connections Add page and the Settings rail add their page contracts and the rail's browser drive (connections_add_pages_test.go, settings_rail_pages_test.go, about 230 lines); measured 9676. Claude setup tokens add the token and Check again contracts; measured 9444 with the composer and Mac lines merged. The instant thinking line adds its browser drive (instant_browser_test.go, about 230 lines); measured 9064 with the composer and Mac lines merged. Mac runners add the role, scoping, migration, placement, withdrawal, transfer and publication contracts (about 900 test lines) beside the thin v1 contracts; one package keeps one instance harness.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index df7b1ef8..8a32d969 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -5991,6 +5991,19 @@ records remain unchanged.
| `chat.card.cancel` | Cancel | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.card.policy_chose_save` | Saved. | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.card.policy_chose_cancel` | Left as it was. | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `chat.day.today` | Today | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.still_open` | Still open from earlier days | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.started` | Added | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.merged` | Merged | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.finished` | Finished | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.decided` | You decided | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.open` | Still open | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.quiet` | No tasks added or decisions made. | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.more` | and %d more | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.messages` | %d messages | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.messages_one` | 1 message | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.show` | Show the conversation | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
+| `chat.day.hide` | Hide the conversation | Daily roll-up (2026-11-12) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12) |
| `chat.merge.policy.rules` | merge on my own when all the rules are met, up to %d lines in %d files | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.policy.ask` | ask before every merge | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `chat.merge.policy.ships_unknown` | I don't know yet whether main ships to users | Merge authority thin v1 (2026-11-11) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
@@ -7143,3 +7156,61 @@ effort high) reviewed the two strings branch empty-repo-merge adds, both
shown to people: it accepted `work.reason.merge_unborn_default` and revised
`work.triage.waiting` (rows above, COPY ACCEPTED BY DELEGATION (Astra,
2026-11-11); copy.go matches).
+
+## Daily roll-up (2026-11-12)
+
+Paul, 2026-11-12: yesterday's scrollback is chaff; roll each finished day
+into a box that says what was done and links to the transcript. Fast lane
+with a self-review; no Astra code review (the coordinator's context is not
+touched: no change to Snapshot, the person API or the conversation
+package).
+
+- When: a day is rolled up once it is over in the person's zone. The app
+ records no browser zone; the chat store's zone helper (UTC until a
+ person's zone is known, the one housekeeping uses) decides, through the
+ new `Store.Zone`. Today is never rolled up.
+- The box: date, message count, and rows from records (no model):
+ Added, Merged, Finished, You decided (the answered card's own note),
+ Still open; task titles link to their pages, five per row then
+ "and N more".
+- The transcript opens inline (`?day=`, also the scriptless page):
+ cards keep working where they stand, `?message=` links land in the one
+ conversation with the composer, and chat-stream.js asks for opened days
+ on every refresh so the live feed keeps them open.
+- Open items: cards still asking and tasks still underway from earlier
+ days stand at the top of today with their buttons, once (left out of an
+ opened day's transcript).
+- Loading: earlier days render boxes only (14 latest days with messages,
+ plus any day asked for); a day's messages load when it is opened.
+- Not built: the optional model narrative (v1 is deterministic only).
+
+Guards, each broken once (then restored) to see its test fail:
+
+| Break | Failed |
+| --- | --- |
+| Today's window starts after midnight (`created_at > from`) | TestRollupDayBox: today's first message rolled up |
+| Today a microsecond earlier | TestRollupDayBox: yesterday's last message outside its box |
+| Earlier days and their records read up to tomorrow | TestRollupDayBox: today rolled up; TestRollupExpand: ?day=today opened something |
+| Open cards dropped from the store read | TestRollupDayBox: no Still open row |
+| Open cards not surfaced in today | TestRollupDayBox: open merge card not at the top of today; TestRollupExpand: shown 0 times |
+| Open card not removed from an opened day | TestRollupExpand: the open card shows 2 times |
+| Day never expands | TestRollupExpand: day not open |
+| `?message=` does not open its day | TestRollupExpand: the link did not open its day at the message |
+
+Verification (targeted): `go test ./internal/thintest -run TestRollup`,
+`go test -tags browser ./internal/thintest -run TestBrowserRollup`
+(1280 light, 390 dark), the existing conversation contract and page tests
+in thintest and plan3test, `go test ./internal/equipo ./internal/equipo/chat`,
+headless TestBrowserReceipts*, TestBrowserThinkingAndCards and
+TestBrowserRefreshRace, TestPlan3ReleaseBoundaries, budget size, vet and
+staticcheck on the changed packages: ok.
+
+## Delegated copy pass: daily roll-up (Astra, 2026-11-12)
+
+Paul delegated copy review on 2026-10-25. One Astra pass (gpt-6-astra,
+effort high) reviewed the 13 strings: it accepted ten, revised
+`chat.day.started` to "Added" and `chat.day.quiet` to "No tasks added or
+decisions made.", and proposed "Needs you" for `chat.day.open`. A
+follow-up gave the fact the brief left out (the row also lists unfinished
+work that asks nothing yet) and Astra kept "Still open". Rows above, COPY
+ACCEPTED BY DELEGATION (Astra, 2026-11-12); copy.go matches.
diff --git a/internal/equipo/chat/days.go b/internal/equipo/chat/days.go
new file mode 100644
index 00000000..1b841129
--- /dev/null
+++ b/internal/equipo/chat/days.go
@@ -0,0 +1,370 @@
+package chat
+
+import (
+ "context"
+ "errors"
+ "time"
+
+ "gorm.io/gorm"
+
+ "amadan.net/oficina/equipo/internal/equipo/housekeeping"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// The conversation page's daily roll-up (Paul, 2026-11-12: "at the end
+// of the day, the day's conversation gets rolled up and summarised into
+// a box"). These are reads only: the transcript, the coordinator's
+// context and its notebook are what they were. What a day held is read
+// from records (messages, tasks, answered cards), never from a model.
+
+// Now is the store's clock (tests move it).
+func (s *Store) Now() time.Time { return s.now() }
+
+// Zone is the person's time zone, the one their days end in: the
+// housekeeping loop's, UTC until a person's zone is known.
+func (s *Store) Zone(person string) *time.Location { return (&txn{s: s}).zone(person) }
+
+// DayStart is the start of at's day in loc, in UTC.
+func DayStart(at time.Time, loc *time.Location) time.Time { return housekeeping.DayStart(at, loc) }
+
+// NextDay is the start of the day after the one starting at start.
+func NextDay(start time.Time, loc *time.Location) time.Time {
+ l := start.In(loc)
+ return time.Date(l.Year(), l.Month(), l.Day()+1, 0, 0, 0, 0, loc).UTC()
+}
+
+// maxDayScan bounds how many messages EarlierDays reads to find days.
+const maxDayScan = 20000
+
+// EarlierDays is the start of each of the person's latest n days before
+// before that have a message, newest first.
+func (s *Store) EarlierDays(ctx context.Context, person string, before time.Time, n int) (out []time.Time, err error) {
+ loc := s.Zone(person)
+ err = s.read(ctx, func(tx *gorm.DB) error {
+ if err := s.authority.CurrentPerson(ctx, tx); err != nil {
+ return err
+ }
+ cut, scanned := before, 0
+ for len(out) < n && scanned < maxDayScan {
+ var at []time.Time
+ if err := tx.Model(&messageRecord{}).Where("person = ? AND created_at < ?", person, cut).Order("seq DESC").Limit(500).Pluck("created_at", &at).Error; err != nil {
+ return err
+ }
+ for _, t := range at {
+ if d := DayStart(t, loc); len(out) == 0 || d.Before(out[len(out)-1]) {
+ if len(out) == n {
+ break
+ }
+ out = append(out, d)
+ }
+ }
+ if len(at) < 500 || len(out) == n {
+ return nil
+ }
+ // The next page starts before the day already found: one query
+ // per day, not one per message.
+ cut, scanned = out[len(out)-1], scanned+len(at)
+ }
+ return nil
+ })
+ return out, err
+}
+
+// MessageAt is when one of the person's messages was written.
+func (s *Store) MessageAt(ctx context.Context, person, id string) (at time.Time, err error) {
+ err = s.read(ctx, func(tx *gorm.DB) error {
+ if err := s.authority.CurrentPerson(ctx, tx); err != nil {
+ return err
+ }
+ var m messageRecord
+ if err := tx.Select("created_at").Where("id = ? AND person = ?", id, person).First(&m).Error; errors.Is(err, gorm.ErrRecordNotFound) {
+ return ErrNotFound
+ } else if err != nil {
+ return err
+ }
+ at = m.CreatedAt
+ return nil
+ })
+ return at, err
+}
+
+// Window is a stretch of the person's conversation as the page shows
+// it: the messages written in it (the newest limit), the cards that
+// stand among them, and the tasks those cards name.
+type Window struct {
+ Messages []wire.Message
+ Cards []wire.Card
+ Tasks []wire.Task
+}
+
+// Placed is where a card stands in the conversation: a card a turn
+// produced stands with that turn's last message; any other at the time
+// it showed (after quiet hours).
+func placed(c cardRecord, lastOfTurn map[string]time.Time) (time.Time, bool) {
+ if c.TurnID != "" {
+ at, ok := lastOfTurn[c.TurnID]
+ return at, ok
+ }
+ if c.VisibleAt != nil && c.VisibleAt.After(c.CreatedAt) {
+ return *c.VisibleAt, true
+ }
+ return c.CreatedAt, true
+}
+
+func within(at, from, to time.Time) bool {
+ return !at.Before(from) && (to.IsZero() || at.Before(to))
+}
+
+// Window reads [from, to) of the person's conversation; a zero to is
+// open-ended (today).
+func (s *Store) Window(ctx context.Context, person string, from, to time.Time, limit int) (out Window, err error) {
+ err = s.read(ctx, func(tx *gorm.DB) error {
+ if err := s.authority.CurrentPerson(ctx, tx); err != nil {
+ return err
+ }
+ q := tx.Where("person = ? AND created_at >= ?", person, from)
+ if !to.IsZero() {
+ q = q.Where("created_at < ?", to)
+ }
+ var rows []messageRecord
+ if err := q.Order("seq DESC").Limit(limit).Find(&rows).Error; err != nil {
+ return err
+ }
+ out.Messages = make([]wire.Message, 0, len(rows))
+ var turns []string
+ for i := len(rows) - 1; i >= 0; i-- {
+ out.Messages = append(out.Messages, messageView(rows[i]))
+ if rows[i].TurnID != "" {
+ turns = append(turns, rows[i].TurnID)
+ }
+ }
+ if err := withFiles(tx, out.Messages); err != nil {
+ return err
+ }
+ t := &txn{s: s, db: tx}
+ last, err := t.lastOfTurns(person, turns)
+ if err != nil {
+ return err
+ }
+ // Cards with no turn showed at most a night after they were made.
+ cq := tx.Where("person = ? AND (held IS NULL OR held = ?)", person, false).Where(tx.Where("turn_id IN ?", turns).Or("turn_id = ? AND created_at >= ?", "", from.Add(-24*time.Hour)))
+ if !to.IsZero() {
+ cq = cq.Where("created_at < ?", to)
+ }
+ var cards []cardRecord
+ if err := cq.Order("created_at, id").Find(&cards).Error; err != nil {
+ return err
+ }
+ names := map[string]bool{}
+ for _, c := range cards {
+ if at, ok := placed(c, last); !ok || !within(at, from, to) {
+ continue
+ }
+ v, err := t.cardView(c)
+ if err != nil {
+ return err
+ }
+ out.Cards = append(out.Cards, v)
+ if c.TaskID != "" {
+ names[c.TaskID] = true
+ }
+ }
+ out.Tasks, err = t.tasksNamed(names)
+ return err
+ })
+ return out, err
+}
+
+func (t *txn) lastOfTurns(person string, turns []string) (map[string]time.Time, error) {
+ out := map[string]time.Time{}
+ if len(turns) == 0 {
+ return out, nil
+ }
+ var rows []messageRecord
+ if err := t.db.Select("turn_id", "created_at").Where("person = ? AND turn_id IN ?", person, turns).Find(&rows).Error; err != nil {
+ return nil, err
+ }
+ for _, m := range rows {
+ if m.CreatedAt.After(out[m.TurnID]) {
+ out[m.TurnID] = m.CreatedAt
+ }
+ }
+ return out, nil
+}
+
+func (t *txn) tasksNamed(ids map[string]bool) ([]wire.Task, error) {
+ if len(ids) == 0 {
+ return nil, nil
+ }
+ list := make([]string, 0, len(ids))
+ for id := range ids {
+ list = append(list, id)
+ }
+ var rows []taskRecord
+ if err := t.db.Where("id IN ?", list).Order("created_at, id").Find(&rows).Error; err != nil {
+ return nil, err
+ }
+ out := make([]wire.Task, 0, len(rows))
+ for _, k := range rows {
+ v, err := t.taskView(k)
+ if err != nil {
+ return nil, err
+ }
+ out = append(out, v)
+ }
+ return out, nil
+}
+
+// Underway are the stages of a task that is being worked on: its
+// creator sees it until it ends, whatever day it started.
+var Underway = []string{wire.StageInProgress, wire.StageInReview, wire.StageReadyToMerge, wire.StageMerging}
+
+// StillOpen is what stands in the person's conversation before before
+// and may need them: cards still asking (a question, a decision, access,
+// a home to confirm) and the cards of their tasks still underway, with
+// the tasks those cards name. The page shows these whatever day they
+// are from; whether a card still asks is the page's reading of it.
+func (s *Store) StillOpen(ctx context.Context, person string, before time.Time) (out Window, err error) {
+ err = s.read(ctx, func(tx *gorm.DB) error {
+ if err := s.authority.CurrentPerson(ctx, tx); err != nil {
+ return err
+ }
+ var cards []cardRecord
+ if err := tx.Where("person = ? AND (held IS NULL OR held = ?)", person, false).
+ Where(tx.Where("kind IN ? AND state = ?", []string{wire.CardQuestion, wire.CardAccess, wire.CardMerge, wire.CardDirection, wire.CardMergeShips, wire.CardMergePolicy}, wire.CardOpen).
+ Or("kind = ? AND state = ?", wire.CardHome, wire.CardHomeAsk).
+ Or("kind = ? AND task_id IN (SELECT id FROM chat_tasks WHERE creator = ? AND stage IN ?)", wire.CardTask, person, Underway)).
+ Order("created_at, id").Find(&cards).Error; err != nil {
+ return err
+ }
+ var turns []string
+ for _, c := range cards {
+ if c.TurnID != "" {
+ turns = append(turns, c.TurnID)
+ }
+ }
+ t := &txn{s: s, db: tx}
+ last, err := t.lastOfTurns(person, turns)
+ if err != nil {
+ return err
+ }
+ names := map[string]bool{}
+ for _, c := range cards {
+ at, ok := placed(c, last)
+ if !ok {
+ // A turn with no message: never shown in the feed, so it
+ // stands with the earlier days rather than nowhere.
+ at = c.CreatedAt
+ }
+ if !at.Before(before) {
+ continue
+ }
+ v, err := t.cardView(c)
+ if err != nil {
+ return err
+ }
+ out.Cards = append(out.Cards, v)
+ if c.TaskID != "" {
+ names[c.TaskID] = true
+ }
+ }
+ out.Tasks, err = t.tasksNamed(names)
+ return err
+ })
+ return out, err
+}
+
+// DayTask is a task as a day's summary names it.
+type DayTask struct {
+ ID, Title, Stage string
+ CreatedAt time.Time
+ DoneAt, MergedAt *time.Time
+}
+
+// Decision is a card the person answered, and when.
+type Decision struct {
+ Card wire.Card
+ At time.Time
+ // Task is the task the card asked about, when it names one.
+ Task *DayTask
+}
+
+// Rollup is what [from, to) of the person's conversation held, for its
+// days' summaries: when each message was written, the person's tasks
+// started, finished or merged then, and the decisions they made.
+type Rollup struct {
+ Messages []time.Time
+ Tasks []DayTask
+ Decisions []Decision
+}
+
+// decisionKinds are the cards whose answer is a decision of the
+// person's: merge or wait, a direction, a policy question, a question.
+var decisionKinds = []string{wire.CardMerge, wire.CardDirection, wire.CardMergeShips, wire.CardMergePolicy, wire.CardQuestion}
+
+// Rollup reads [from, to) for the day boxes.
+func (s *Store) Rollup(ctx context.Context, person string, from, to time.Time) (out Rollup, err error) {
+ err = s.read(ctx, func(tx *gorm.DB) error {
+ if err := s.authority.CurrentPerson(ctx, tx); err != nil {
+ return err
+ }
+ if err := tx.Model(&messageRecord{}).Where("person = ? AND created_at >= ? AND created_at < ?", person, from, to).Order("seq").Pluck("created_at", &out.Messages).Error; err != nil {
+ return err
+ }
+ var tasks []taskRecord
+ if err := tx.Select("id", "title", "stage", "created_at", "done_at", "merged_at").Where("creator = ?", person).
+ Where(tx.Where("created_at >= ? AND created_at < ?", from, to).Or("done_at >= ? AND done_at < ?", from, to).Or("merged_at >= ? AND merged_at < ?", from, to)).
+ Order("created_at, id").Find(&tasks).Error; err != nil {
+ return err
+ }
+ for _, k := range tasks {
+ out.Tasks = append(out.Tasks, dayTask(k))
+ }
+ // An answer is the person's message with the card's choice; a card
+ // answered without one (no message) counts when it changed.
+ var cards []cardRecord
+ if err := tx.Where("person = ? AND state = ? AND kind IN ? AND updated_at >= ?", person, wire.CardAnswered, decisionKinds, from).Order("created_at, id").Find(&cards).Error; err != nil {
+ return err
+ }
+ t := &txn{s: s, db: tx}
+ named := map[string]*DayTask{}
+ for _, c := range cards {
+ at := c.UpdatedAt
+ if c.AnswerMessage != "" {
+ var m messageRecord
+ if err := tx.Select("created_at").Where("id = ? AND person = ?", c.AnswerMessage, person).First(&m).Error; err == nil {
+ at = m.CreatedAt
+ } else if !errors.Is(err, gorm.ErrRecordNotFound) {
+ return err
+ }
+ }
+ if !within(at, from, to) {
+ continue
+ }
+ v, err := t.cardView(c)
+ if err != nil {
+ return err
+ }
+ d := Decision{Card: v, At: at}
+ if c.TaskID != "" {
+ if named[c.TaskID] == nil {
+ var k taskRecord
+ if err := tx.Select("id", "title", "stage", "created_at", "done_at", "merged_at").Where("id = ?", c.TaskID).First(&k).Error; err == nil {
+ dt := dayTask(k)
+ named[c.TaskID] = &dt
+ } else if !errors.Is(err, gorm.ErrRecordNotFound) {
+ return err
+ }
+ }
+ d.Task = named[c.TaskID]
+ }
+ out.Decisions = append(out.Decisions, d)
+ }
+ return nil
+ })
+ return out, err
+}
+
+func dayTask(k taskRecord) DayTask {
+ return DayTask{ID: k.ID, Title: k.Title, Stage: k.Stage, CreatedAt: k.CreatedAt, DoneAt: k.DoneAt, MergedAt: k.MergedAt}
+}
diff --git a/internal/equipo/chat_days.go b/internal/equipo/chat_days.go
new file mode 100644
index 00000000..8508eb50
--- /dev/null
+++ b/internal/equipo/chat_days.go
@@ -0,0 +1,376 @@
+package equipo
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "slices"
+ "sort"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/equipo/chat"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// The daily roll-up (Paul, 2026-11-12): "the value of the scrollback
+// diminishes and just becomes a distraction". Once a day is over in the
+// person's zone it shows as one day box: its date, what was started,
+// merged or finished, what the person decided and what is still open,
+// all read from records (no model, no tokens), and "Show the
+// conversation", which opens the day's transcript in place. Today is
+// never rolled up.
+//
+// The transcript opens inline rather than on a page of its own: the
+// day's cards keep working where they stand, a link to one of its
+// messages (/conversation?message=) lands in the one conversation with
+// the composer under it, and the live feed keeps an opened day open
+// across its refreshes. Without script the same link is a plain
+// /conversation?day= page with that day open.
+//
+// Whatever still needs the person is never rolled away: cards still
+// asking and tasks still underway from earlier days stand together at
+// the top of today.
+
+// earlierDayBoxes is how many earlier days with messages the page shows.
+const earlierDayBoxes = 14
+
+// maxDayMessages bounds one day's transcript, and today's.
+const maxDayMessages = 1000
+
+// dayListMax is how many items a day box names in one row.
+const dayListMax = 5
+
+// chatDay is one earlier day on the conversation page.
+type chatDay struct {
+ Key, Label string
+ Messages string
+ // Rows are what the day held, in a fixed order: started, merged,
+ // finished, decided, still open. A day with none is Quiet: talk only.
+ Rows []dayRow
+ Quiet bool
+ // Expanded days carry their transcript; Toggle is the link that
+ // opens or closes it (the page's other open days kept).
+ Expanded bool
+ Toggle string
+ Feed chatFeed
+}
+
+// chatFeed is a run of conversation lines and whose they are.
+type chatFeed struct {
+ Lines []chatLine
+ Address string
+}
+
+// Today is today's lines; Earlier what still needs the person from
+// earlier days.
+func (v chatView) Today(address string) chatFeed { return chatFeed{v.Messages, address} }
+func (v chatView) Earlier(address string) chatFeed { return chatFeed{v.Open, address} }
+
+// dayRow is a row of a day box: its label, its items, and how many more
+// there are. A stacked row (decisions, what is still open) puts each
+// item on its own line.
+type dayRow struct {
+ Key, Label string
+ Items []dayItem
+ More string
+ Stack bool
+}
+
+// dayItem names a task (a link) or, with no task, says what was asked;
+// Note is what a decision decided.
+type dayItem struct {
+ TaskID, Text, Note string
+}
+
+func (r *dayRow) add(it dayItem) {
+ if slices.Contains(r.Items, it) {
+ return
+ }
+ r.Items = append(r.Items, it)
+}
+
+func (r *dayRow) trim() {
+ if n := len(r.Items) - dayListMax; n > 0 {
+ r.Items, r.More = r.Items[:dayListMax], fmt.Sprintf(copyText("chat.day.more"), n)
+ }
+}
+
+// dayRowOrder is the order of a day box's rows.
+var dayRowOrder = []string{"started", "merged", "finished", "decided", "open"}
+
+func newDayRows() map[string]*dayRow {
+ out := map[string]*dayRow{}
+ for _, key := range dayRowOrder {
+ out[key] = &dayRow{Key: key, Label: copyText("chat.day." + key), Stack: key == "decided" || key == "open"}
+ }
+ return out
+}
+
+// dayKey is the day's name in URLs and ids.
+func dayKey(start time.Time, loc *time.Location) string { return start.In(loc).Format("2006-01-02") }
+
+// parseDay reads a day key as the start of that day in loc.
+func parseDay(key string, loc *time.Location) (time.Time, bool) {
+ t, err := time.ParseInLocation("2006-01-02", key, loc)
+ if err != nil {
+ return time.Time{}, false
+ }
+ return t.UTC(), true
+}
+
+// dayLabel is how a day is named: "Tuesday 11 November", with the year
+// when it is not this one.
+func dayLabel(start, today time.Time, loc *time.Location) string {
+ l := start.In(loc)
+ if l.Year() != today.In(loc).Year() {
+ return l.Format("Monday 2 January 2006")
+ }
+ return l.Format("Monday 2 January")
+}
+
+// dayToggle is the link that opens (or closes) one day, keeping the
+// other open days open.
+func dayToggle(key string, open map[string]bool) string {
+ var keys []string
+ for k := range open {
+ if k != key {
+ keys = append(keys, k)
+ }
+ }
+ if !open[key] {
+ keys = append(keys, key)
+ }
+ sort.Strings(keys)
+ path := "/conversation"
+ if len(keys) > 0 {
+ path += "?" + url.Values{"day": keys}.Encode()
+ }
+ return path + "#day-" + key
+}
+
+// asksPerson is whether a card from an earlier day still needs the
+// person: a question, decision or access card still open, or the card of
+// a task still underway.
+func asksPerson(c wire.Card, v chatCard, tasks map[string]wire.Task) bool {
+ if c.Kind == wire.CardTask {
+ t, ok := tasks[c.TaskID]
+ return ok && v.Task != nil && slices.Contains(chat.Underway, t.Stage)
+ }
+ return v.Open
+}
+
+// receiptKind is whether a card shows as a quiet receipt line.
+func receiptKind(c wire.Card) bool {
+ return c.Kind == wire.CardProject || c.Kind == wire.CardTask || c.Kind == wire.CardCombined || c.Kind == wire.CardHousekeeping || c.Kind == wire.CardHome && c.State != wire.CardHomeAsk
+}
+
+// decisionNote is what an answered card decided, in the words its card
+// shows once answered.
+func decisionNote(c wire.Card) string {
+ key := ""
+ switch c.Kind {
+ case wire.CardMerge:
+ key = "chat.card.merge_chose_" + c.Choice
+ case wire.CardDirection:
+ key = "chat.card.direction_chose_" + c.Choice
+ case wire.CardMergeShips:
+ key = "chat.card.ships_chose_" + c.Choice
+ case wire.CardMergePolicy:
+ key = "chat.card.policy_chose_" + c.Choice
+ }
+ if text := copyText(key); key != "" && text != "" {
+ return text
+ }
+ return fmt.Sprintf(copyText("chat.card.answered"), c.Choice)
+}
+
+// earlierDays is the page's earlier days, oldest first, with the ones
+// asked for (expand) open, and what still needs the person from before
+// today, as loose lines for the top of today.
+func (a *application) earlierDays(ctx context.Context, address string, loc *time.Location, today time.Time, expand map[time.Time]bool, choices []string, tasks map[string]wire.Task) ([]chatDay, []chatLine, error) {
+ chats := a.store.Chat()
+ starts, err := chats.EarlierDays(ctx, address, today, earlierDayBoxes)
+ if err != nil {
+ return nil, nil, err
+ }
+ for d := range expand {
+ if !slices.ContainsFunc(starts, d.Equal) {
+ starts = append(starts, d)
+ }
+ }
+ slices.SortFunc(starts, func(x, y time.Time) int { return x.Compare(y) })
+ open, err := chats.StillOpen(ctx, address, today)
+ if err != nil {
+ return nil, nil, err
+ }
+ for _, t := range open.Tasks {
+ tasks[t.ID] = t
+ }
+ // What still needs the person: loose lines, in the order they came.
+ var loose []chatLine
+ shown := map[string]bool{}
+ byDay := map[time.Time][]wire.Card{}
+ for _, c := range open.Cards {
+ v := cardView(c, choices, tasks)
+ if !asksPerson(c, v, tasks) {
+ continue
+ }
+ v.Receipt = receiptKind(c)
+ at := c.CreatedAt
+ if c.VisibleAt != nil && c.VisibleAt.After(at) {
+ at = *c.VisibleAt
+ }
+ loose = append(loose, chatLine{ID: c.ID, CardOnly: true, Cards: []chatCard{v}, CreatedAt: at})
+ shown[c.ID] = true
+ byDay[chat.DayStart(at, loc)] = append(byDay[chat.DayStart(at, loc)], c)
+ }
+ if len(starts) == 0 {
+ return nil, loose, nil
+ }
+ roll, err := chats.Rollup(ctx, address, starts[0], today)
+ if err != nil {
+ return nil, nil, err
+ }
+ counts := map[time.Time]int{}
+ for _, at := range roll.Messages {
+ counts[chat.DayStart(at, loc)]++
+ }
+ // A day asked for that held no message is no day of the person's.
+ starts = slices.DeleteFunc(starts, func(d time.Time) bool { return counts[d] == 0 })
+ if len(starts) == 0 {
+ return nil, loose, nil
+ }
+ days := make([]chatDay, len(starts))
+ rows := make([]map[string]*dayRow, len(starts))
+ index := map[time.Time]int{}
+ opened := map[string]bool{}
+ for _, d := range starts {
+ if expand[d] {
+ opened[dayKey(d, loc)] = true
+ }
+ }
+ for i, d := range starts {
+ index[d] = i
+ key := dayKey(d, loc)
+ days[i] = chatDay{Key: key, Label: dayLabel(d, today, loc), Expanded: expand[d], Toggle: dayToggle(key, opened)}
+ rows[i] = newDayRows()
+ days[i].Messages = copyText("chat.day.messages_one")
+ if n := counts[d]; n != 1 {
+ days[i].Messages = fmt.Sprintf(copyText("chat.day.messages"), n)
+ }
+ }
+ in := func(at *time.Time) (int, bool) {
+ if at == nil {
+ return 0, false
+ }
+ i, ok := index[chat.DayStart(*at, loc)]
+ return i, ok
+ }
+ for _, t := range roll.Tasks {
+ it := dayItem{TaskID: t.ID, Text: t.Title}
+ if i, ok := in(&t.CreatedAt); ok {
+ rows[i]["started"].add(it)
+ }
+ if i, ok := in(t.MergedAt); ok {
+ rows[i]["merged"].add(it)
+ } else if i, ok := in(t.DoneAt); ok && t.Stage == wire.StageDone {
+ rows[i]["finished"].add(it)
+ }
+ }
+ for _, d := range roll.Decisions {
+ i, ok := in(&d.At)
+ if !ok {
+ continue
+ }
+ it := dayItem{Text: d.Card.Question, Note: decisionNote(d.Card)}
+ if d.Task != nil {
+ it.TaskID, it.Text = d.Task.ID, d.Task.Title
+ }
+ rows[i]["decided"].add(it)
+ }
+ for start, cards := range byDay {
+ i, ok := index[start]
+ if !ok {
+ continue
+ }
+ for _, c := range cards {
+ if t, ok := tasks[c.TaskID]; ok && c.TaskID != "" {
+ rows[i]["open"].add(dayItem{TaskID: t.ID, Text: t.Title})
+ } else {
+ rows[i]["open"].add(dayItem{Text: cardView(c, choices, tasks).Line})
+ }
+ }
+ }
+ for i := range days {
+ d := &days[i]
+ for _, key := range dayRowOrder {
+ if r := rows[i][key]; len(r.Items) > 0 {
+ r.trim()
+ d.Rows = append(d.Rows, *r)
+ }
+ }
+ d.Quiet = len(d.Rows) == 0
+ if !d.Expanded {
+ continue
+ }
+ start := starts[i]
+ win, err := chats.Window(ctx, address, start, chat.NextDay(start, loc), maxDayMessages)
+ if err != nil {
+ return nil, nil, err
+ }
+ for _, t := range win.Tasks {
+ tasks[t.ID] = t
+ }
+ // A card still asking stands at the top of today, once.
+ cards := slices.DeleteFunc(win.Cards, func(c wire.Card) bool { return shown[c.ID] })
+ d.Feed = chatFeed{Lines: feedLines(win.Messages, cards, choices, tasks), Address: address}
+ }
+ return days, loose, nil
+}
+
+// feedLines places a stretch's messages and cards as the page shows
+// them: a receipt sits where its action happened, before the reply of
+// its turn (or after the person's message while the turn runs); other
+// cards come after the turn's last message, in event order; a card no
+// turn produced stands at its own time.
+func feedLines(msgs []wire.Message, cards []wire.Card, choices []string, tasks map[string]wire.Task) []chatLine {
+ var out []chatLine
+ last := map[string]int{}
+ for i, m := range msgs {
+ out = append(out, chatLine{ID: m.ID, Text: m.Text, TurnID: m.TurnID, Own: m.Role == wire.RolePerson, CreatedAt: m.CreatedAt, Switched: switchedText(m.Switched), Files: m.Attachments})
+ last[m.TurnID] = i
+ }
+ reply := map[string]int{}
+ for i, m := range out {
+ if !m.Own {
+ if _, ok := reply[m.TurnID]; !ok {
+ reply[m.TurnID] = i
+ }
+ }
+ }
+ var loose []chatLine
+ for _, c := range cards {
+ v := cardView(c, choices, tasks)
+ if c.Kind == wire.CardTask && v.Task == nil {
+ continue
+ }
+ v.Receipt = receiptKind(c)
+ if i, ok := reply[c.TurnID]; ok && v.Receipt && c.TurnID != "" {
+ out[i].Receipts = append(out[i].Receipts, v)
+ } else if i, ok := last[c.TurnID]; ok && c.TurnID != "" {
+ out[i].Cards = append(out[i].Cards, v)
+ } else if c.TurnID == "" {
+ // A receipt held through quiet hours stands where it showed.
+ at := c.CreatedAt
+ if c.VisibleAt != nil && c.VisibleAt.After(at) {
+ at = *c.VisibleAt
+ }
+ loose = append(loose, chatLine{ID: c.ID, CardOnly: true, Cards: []chatCard{v}, CreatedAt: at})
+ }
+ }
+ for _, l := range loose {
+ at := sort.Search(len(out), func(i int) bool { return out[i].CreatedAt.After(l.CreatedAt) })
+ out = slices.Insert(out, at, l)
+ }
+ return out
+}
diff --git a/internal/equipo/chat_page.go b/internal/equipo/chat_page.go
index 4a1add1a..0926959e 100644
--- a/internal/equipo/chat_page.go
+++ b/internal/equipo/chat_page.go
@@ -6,8 +6,6 @@ import (
"errors"
"fmt"
"net/http"
- "slices"
- "sort"
"strconv"
"strings"
"time"
@@ -25,8 +23,12 @@ import (
type chatView struct {
// Draft is the composer's opening words: "Ask about this" on a task
// opens the conversation with the task referenced (?about=tk...).
- Draft string
+ Draft string
+ // Messages are today's; Days the earlier days, oldest first; Open what
+ // still needs the person from them, at the top of today.
Messages []chatLine
+ Days []chatDay
+ Open []chatLine
Waiting []wire.Turn
Ended *chatEnded
// NoConnection is the card for a turn held because nothing the person
@@ -202,8 +204,6 @@ func (a *application) chatPage(w http.ResponseWriter, r *http.Request) {
a.failure(w, r, chatError(err))
return
}
- // A task's "From your conversation" link: older history up to it.
- snap.Messages = a.withMessage(ctx, address, snap.Messages, r.URL.Query().Get("message"))
data, err := a.page(r, "conversation")
if err != nil {
a.failure(w, r, err)
@@ -217,56 +217,46 @@ func (a *application) chatPage(w http.ResponseWriter, r *http.Request) {
view.Draft = fmt.Sprintf(copyText("work.ask_about.draft"), t.Title)
}
}
- last := map[string]int{}
- for i, m := range snap.Messages {
- view.Messages = append(view.Messages, chatLine{ID: m.ID, Text: m.Text, TurnID: m.TurnID, Own: m.Role == wire.RolePerson, CreatedAt: m.CreatedAt, Switched: switchedText(m.Switched), Files: m.Attachments})
- last[m.TurnID] = i
+ // Today, in the person's zone, is the conversation; each earlier day
+ // is a day box (chat_days.go), open when asked for (?day=) or when a
+ // task's "From your conversation" link names one of its messages.
+ chats := a.store.Chat()
+ loc := chats.Zone(address)
+ today := chat.DayStart(chats.Now(), loc)
+ expand := map[time.Time]bool{}
+ for _, key := range r.URL.Query()["day"] {
+ if d, ok := parseDay(key, loc); ok && d.Before(today) {
+ expand[d] = true
+ }
+ }
+ if id := r.URL.Query().Get("message"); id != "" {
+ if at, err := chats.MessageAt(ctx, address, id); err == nil && at.Before(today) {
+ expand[chat.DayStart(at, loc)] = true
+ }
}
- choices, err := a.store.Chat().ProjectChoices(ctx, address)
+ win, err := chats.Window(ctx, address, today, time.Time{}, maxDayMessages)
if err != nil {
a.failure(w, r, chatError(err))
return
}
- // A receipt sits where its action happened: before the reply of its
- // turn (or after the person's message while the turn runs). Cards come
- // in event order.
- reply := map[string]int{}
- for i, m := range view.Messages {
- if !m.Own {
- if _, ok := reply[m.TurnID]; !ok {
- reply[m.TurnID] = i
- }
- }
+ choices, err := chats.ProjectChoices(ctx, address)
+ if err != nil {
+ a.failure(w, r, chatError(err))
+ return
}
- var loose []chatLine
tasks := map[string]wire.Task{}
for _, t := range snap.Tasks {
tasks[t.ID] = t
}
- for _, c := range snap.Cards {
- v := cardView(c, choices, tasks)
- if c.Kind == wire.CardTask && v.Task == nil {
- continue
- }
- v.Receipt = c.Kind == wire.CardProject || c.Kind == wire.CardTask || c.Kind == wire.CardCombined || c.Kind == wire.CardHousekeeping || c.Kind == wire.CardHome && c.State != wire.CardHomeAsk
- if i, ok := reply[c.TurnID]; ok && v.Receipt && c.TurnID != "" {
- view.Messages[i].Receipts = append(view.Messages[i].Receipts, v)
- } else if i, ok := last[c.TurnID]; ok && c.TurnID != "" {
- view.Messages[i].Cards = append(view.Messages[i].Cards, v)
- } else if c.TurnID == "" {
- // A receipt held through quiet hours stands where it showed.
- at := c.CreatedAt
- if c.VisibleAt != nil && c.VisibleAt.After(at) {
- at = *c.VisibleAt
- }
- loose = append(loose, chatLine{ID: c.ID, CardOnly: true, Cards: []chatCard{v}, CreatedAt: at})
- }
+ for _, t := range win.Tasks {
+ tasks[t.ID] = t
}
- // Cards no turn produced stand at their own time among the messages.
- for _, l := range loose {
- at := sort.Search(len(view.Messages), func(i int) bool { return view.Messages[i].CreatedAt.After(l.CreatedAt) })
- view.Messages = slices.Insert(view.Messages, at, l)
+ view.Days, view.Open, err = a.earlierDays(ctx, address, loc, today, expand, choices, tasks)
+ if err != nil {
+ a.failure(w, r, chatError(err))
+ return
}
+ view.Messages = feedLines(win.Messages, win.Cards, choices, tasks)
// Nothing can answer: no turn shows the thinking line or a timer
// until an attempt starts on a connection. A turn waiting for one, and
// any queued behind it, get a quiet status under the person's message;
@@ -324,7 +314,8 @@ func (a *application) chatPage(w http.ResponseWriter, r *http.Request) {
break
}
}
- if latest != nil && (latest.State == wire.TurnFailed || latest.State == wire.TurnCancelled) {
+ // A turn that ended unanswered on an earlier day is history there.
+ if latest != nil && !latest.CreatedAt.Before(today) && (latest.State == wire.TurnFailed || latest.State == wire.TurnCancelled) {
key := "chat." + latest.State
switch {
case latest.Reason == wire.ReasonStorageFull:
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index 986191ee..0dae3072 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -1656,50 +1656,64 @@ var pageCopy = map[string]string{
"specialist.instructions": "Instructions",
// Merge authority (spec 2026-11-11-equipo-merge-authority.md).
- "chat.merge.stance_merge": "Merge %s? I'd merge: %s, but %s.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.stance_wait": "Merge %s? I'd wait: %s.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.why.approved": "approved by Review", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.why.small": "a small change, %d lines in %d files", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.why.small_one": "a small change, %d lines in one file", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.why.not_shipping": "nothing ships until a release", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.why.exact_revert": "it exactly reverts %s", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.environment": "checks couldn't run because %s", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.no_checks": "it has no checks to run", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.protocol": "your runner needs an update before I merge on my own", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.facts": "the runner didn't say what changed", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.small": "it's larger than I can merge on my own (%d lines in %d files)", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.small_one": "it's larger than I can merge on my own (%d lines in one file)", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.special": "it changes a symlink, a submodule or a file mode", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.sensitive": "it touches %s (%s)", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.signing": "it changes signing or version settings", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.ships": "merging to %s's main branch ships to users", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.ships_unknown": "I don't know yet whether merging to %s's main branch ships to users", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.policy": "I ask before every merge in this project", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.revert": "it doesn't exactly revert %s", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.eligible": "it was ready before I could merge on my own", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.sandbox": "its checks ran outside the sandbox", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.not.hosted": "its hosted checks passed, but I need to verify those runs before I can merge it on my own", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.migrations": "the database schema", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.auth_secrets": "sign-in, keys or secrets", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.payments": "payments", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.ci_config": "the checks or CI setup", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.dependencies": "dependencies", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.release_signing": "release or signing settings", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.infrastructure": "infrastructure", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.area.project": "a path I must ask about", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.wait_mac": "Wait for a Mac", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.merge_chose_wait_mac": "Waiting for a Mac.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.ships_question": "Does merging to %s's main branch ship to users?", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.ships": "It ships", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.not_ships": "It doesn't", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.ships_chose_ships": "Merging to main ships to users, so I'll ask before merging without checks.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.ships_chose_not_ships": "Main isn't a release, so I can merge small changes on my own when the other rules allow.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.merge_policy_stale": "The merge rules changed since I asked, so nothing was saved.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.merge.policy_confirm": "Change how Equipo merges %s: %s?", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.save": "Save", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.cancel": "Cancel", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.policy_chose_save": "Saved.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
- "chat.card.policy_chose_cancel": "Left as it was.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.stance_merge": "Merge %s? I'd merge: %s, but %s.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.stance_wait": "Merge %s? I'd wait: %s.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.why.approved": "approved by Review", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.why.small": "a small change, %d lines in %d files", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.why.small_one": "a small change, %d lines in one file", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.why.not_shipping": "nothing ships until a release", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.why.exact_revert": "it exactly reverts %s", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.environment": "checks couldn't run because %s", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.no_checks": "it has no checks to run", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.protocol": "your runner needs an update before I merge on my own", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.facts": "the runner didn't say what changed", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.small": "it's larger than I can merge on my own (%d lines in %d files)", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.small_one": "it's larger than I can merge on my own (%d lines in one file)", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.special": "it changes a symlink, a submodule or a file mode", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.sensitive": "it touches %s (%s)", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.signing": "it changes signing or version settings", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.ships": "merging to %s's main branch ships to users", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.ships_unknown": "I don't know yet whether merging to %s's main branch ships to users", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.policy": "I ask before every merge in this project", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.revert": "it doesn't exactly revert %s", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.eligible": "it was ready before I could merge on my own", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.sandbox": "its checks ran outside the sandbox", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.not.hosted": "its hosted checks passed, but I need to verify those runs before I can merge it on my own", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.migrations": "the database schema", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.auth_secrets": "sign-in, keys or secrets", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.payments": "payments", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.ci_config": "the checks or CI setup", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.dependencies": "dependencies", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.release_signing": "release or signing settings", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.infrastructure": "infrastructure", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.area.project": "a path I must ask about", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.wait_mac": "Wait for a Mac", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.merge_chose_wait_mac": "Waiting for a Mac.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.ships_question": "Does merging to %s's main branch ship to users?", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.ships": "It ships", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.not_ships": "It doesn't", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.ships_chose_ships": "Merging to main ships to users, so I'll ask before merging without checks.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.ships_chose_not_ships": "Main isn't a release, so I can merge small changes on my own when the other rules allow.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.merge_policy_stale": "The merge rules changed since I asked, so nothing was saved.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.policy_confirm": "Change how Equipo merges %s: %s?", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.save": "Save", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.cancel": "Cancel", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.policy_chose_save": "Saved.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.card.policy_chose_cancel": "Left as it was.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ // The daily roll-up (2026-11-12): earlier days on the conversation page.
+ "chat.day.today": "Today", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.still_open": "Still open from earlier days", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.started": "Added", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.merged": "Merged", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.finished": "Finished", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.decided": "You decided", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.open": "Still open", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.quiet": "No tasks added or decisions made.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.more": "and %d more", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.messages": "%d messages", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.messages_one": "1 message", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.show": "Show the conversation", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
+ "chat.day.hide": "Hide the conversation", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-12)
"chat.merge.policy.rules": "merge on my own when all the rules are met, up to %d lines in %d files", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"chat.merge.policy.ask": "ask before every merge", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"chat.merge.policy.ships_unknown": "I don't know yet whether main ships to users", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
diff --git a/internal/equipo/static/chat-stream.js b/internal/equipo/static/chat-stream.js
index fd00e5fb..c9c2617a 100644
--- a/internal/equipo/static/chat-stream.js
+++ b/internal/equipo/static/chat-stream.js
@@ -757,8 +757,20 @@
following = atBottom();
return true;
}
+ // Earlier days the reader opened stay open across refreshes: the page
+ // is asked for them (?day=), as the server rendered them.
+ var days = new Set();
+ feed.querySelectorAll("[equipo-rollup][data-expanded]").forEach(function (el) { days.add(el.dataset.day); });
+ function pageURL() {
+ if (!days.size) return location.pathname;
+ return location.pathname + "?" + Array.from(days).sort().map(function (d) { return "day=" + encodeURIComponent(d); }).join("&");
+ }
+ // refreshed settles once a refresh started after this call has run.
+ function refreshed() {
+ return inflight ? inflight.then(refreshed, refreshed) : refresh();
+ }
function load() {
- return fetch(location.pathname, { credentials: "same-origin", headers: { "Accept": "text/html" } })
+ return fetch(pageURL(), { credentials: "same-origin", headers: { "Accept": "text/html" } })
.then(function (r) { if (!r.ok) throw new Error("refresh"); return r.text(); })
.then(function (body) {
var doc = new DOMParser().parseFromString(body, "text/html");
@@ -995,6 +1007,33 @@
card.toggleAttribute("data-open", open);
more.setAttribute("aria-expanded", String(open));
});
+ // "Show the conversation" opens an earlier day in place (its link,
+ // ?day=, is the page without script); "Hide the conversation" closes
+ // it. The day's box stays where the reader is looking.
+ feed.addEventListener("click", function (event) {
+ var toggle = event.target.closest("[data-day-toggle]");
+ if (!toggle || event.button || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
+ event.preventDefault();
+ var day = toggle.dataset.dayToggle;
+ var opening = !days.has(day);
+ if (opening) days.add(day); else days.delete(day);
+ toggle.setAttribute("aria-busy", "true");
+ following = false;
+ function place() {
+ var li = feed.querySelector('[equipo-rollup][data-day="' + CSS.escape(day) + '"]');
+ if (!li) return;
+ if (box) {
+ box.scrollTop += li.getBoundingClientRect().top - box.getBoundingClientRect().top - 8;
+ following = atBottom();
+ }
+ var again = li.querySelector("[data-day-toggle]");
+ if (again) again.focus({ preventScroll: true });
+ }
+ refreshed().then(place, function () {
+ if (opening) days.delete(day); else days.add(day);
+ toggle.removeAttribute("aria-busy");
+ });
+ });
// Card actions (Change, Remove, answers) post in the background and the
// card events re-render the feed; without script the forms still work.
feed.addEventListener("submit", function (event) {
diff --git a/internal/equipo/static/equipo.css b/internal/equipo/static/equipo.css
index 3bee6432..52d5fc78 100644
--- a/internal/equipo/static/equipo.css
+++ b/internal/equipo/static/equipo.css
@@ -1563,3 +1563,37 @@ label[equipo-sp-label] { cursor: pointer; }
[equipo-mach-facts] dd + dt { margin-block-start: var(--rst-sp-2); }
}
[equipo-machines] [equipo-conn-add-foot] > a { flex: none; white-space: nowrap; }
+
+/* The daily roll-up (chat_days.go): each earlier day is one quiet box,
+ its date, what it held and the way into its transcript; the
+ transcript opens under the box when asked for. */
+[equipo-rollup] { list-style: none; display: flex; flex-direction: column; gap: var(--rst-sp-4); min-width: 0; }
+[equipo-day-box] { align-self: stretch; max-inline-size: 36rem; box-sizing: border-box; padding: var(--rst-sp-3) var(--rst-sp-4); border: 1px solid var(--rst-line); border-radius: calc(2 * var(--rst-radius)); background: var(--rst-surface); color: var(--rst-text-muted); font-size: var(--rst-fs-sm); }
+[equipo-day-head] { display: flex; align-items: baseline; gap: var(--rst-sp-3); }
+[equipo-day-head] h2 { flex: 1; min-width: 0; margin: 0; font-size: var(--rst-fs-sm); font-weight: 600; color: var(--rst-text); }
+[equipo-day-count] { flex: none; font-size: var(--rst-fs-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
+[equipo-day-rows] { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--rst-sp-1) var(--rst-sp-4); margin: var(--rst-sp-3) 0 0; }
+[equipo-day-row] { display: contents; }
+[equipo-day-row] dt { color: var(--rst-text-muted); }
+[equipo-day-row] dd { margin: 0; min-width: 0; color: var(--rst-text); overflow-wrap: anywhere; }
+[equipo-day-row] dd[data-stack] { display: flex; flex-direction: column; gap: var(--rst-sp-1); }
+[equipo-day-item] a { color: inherit; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 2px; }
+[equipo-day-item] a:hover { text-decoration-color: currentColor; }
+[equipo-day-decision], [equipo-day-more] { color: var(--rst-text-muted); }
+[equipo-day-quiet] { margin: var(--rst-sp-2) 0 0; }
+[equipo-day-toggle] { display: inline-flex; align-items: center; gap: var(--rst-sp-1); margin-block-start: var(--rst-sp-3); min-block-size: 1.75rem; color: var(--rst-text-muted); text-decoration: none; }
+[equipo-day-toggle]:hover { color: var(--rst-text); }
+[equipo-day-toggle]:hover span { text-decoration: underline; text-underline-offset: 2px; }
+[equipo-day-toggle] .icon { inline-size: 1em; block-size: 1em; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
+[equipo-day-toggle][aria-expanded="true"] .icon { transform: rotate(180deg); }
+[equipo-day-toggle][aria-busy="true"] { opacity: .6; }
+[equipo-day-feed] { margin: 0; }
+[equipo-day-note] { list-style: none; color: var(--rst-text-muted); font-size: var(--rst-fs-sm); }
+[equipo-day-divider] { list-style: none; display: flex; align-items: center; gap: var(--rst-sp-3); color: var(--rst-text-muted); font-size: var(--rst-fs-xs); }
+[equipo-day-divider]::before, [equipo-day-divider]::after { content: ""; flex: 1; border-block-start: 1px solid var(--rst-line); }
+@media (max-width: 479.98px) {
+ [equipo-day-rows] { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
+ [equipo-day-row] dt { margin-block-start: var(--rst-sp-2); font-size: var(--rst-fs-xs); }
+ [equipo-day-row]:first-child dt { margin-block-start: 0; }
+}
+@media (prefers-reduced-motion: reduce) { [equipo-day-toggle] .icon { transition: none; } }
diff --git a/internal/equipo/templates/chat.html b/internal/equipo/templates/chat.html
index 3bb93efc..d0d19a3b 100644
--- a/internal/equipo/templates/chat.html
+++ b/internal/equipo/templates/chat.html
@@ -13,6 +13,26 @@
{{end}}</li>{{end}}
{{define "work-task-receipt"}}{{with .Task}}<p equipo-card-line>{{icon "check-circle"}}<span><a href="/tasks/{{.ID}}">{{.Title}}</a></span><span equipo-stage data-stage="{{.Stage}}" data-needs="{{.NeedsYou}}">{{.StageLine}}</span></p>{{if and .Pushed (not .MergedLine)}}<p equipo-card-note data-pushed><span>{{.Pushed}}</span><a href="{{.URL}}" rel="noopener" target="_blank" data-open-amadan>{{copy "work.open"}}</a></p>{{end}}{{if or .ChecksLine .ReviewLine}}<p equipo-card-note data-judged>{{with .ChecksLine}}<span data-checks>{{.}}</span>{{end}}{{with .ReviewLine}}<span data-verdict>{{.}}</span>{{end}}</p>{{end}}{{if .MergedLine}}<p equipo-card-note data-merged><span>{{.MergedLine}}</span><a href="{{.RepoURL}}" rel="noopener" target="_blank" data-open-amadan>{{copy "work.open"}}</a></p>{{end}}{{if .PreviewURL}}<p equipo-card-note data-preview><a href="{{.PreviewURL}}" rel="noopener" target="_blank">{{.PreviewLine}}</a></p>{{end}}{{end}}{{if .Open}}<button type="button" equipo-receipt-more aria-expanded="false" aria-controls="acts-{{.ID}}" aria-label="{{copy "chat.card.more"}}">⋯</button><span equipo-receipt-actions id="acts-{{.ID}}">{{template "work-task-actions" .Task}}</span>{{end}}{{end}}
{{define "message-files"}}{{with .}}<div equipo-message-files>{{range .}}{{if eq .Kind "image"}}<a equipo-file-thumb href="/conversation/attachments/{{.ID}}" target="_blank" rel="noopener" data-attachment="{{.ID}}"><img src="/conversation/attachments/{{.ID}}/preview" alt="{{.Name}}"{{if .Width}} width="{{.Width}}" height="{{.Height}}"{{end}} loading="lazy" decoding="async"></a>{{else}}<a equipo-file-chip href="/conversation/attachments/{{.ID}}" target="_blank" rel="noopener" data-attachment="{{.ID}}">{{icon "file-text"}}<span equipo-file-name>{{.Name}}</span><span equipo-file-size>{{fileSize .Size}}</span></a>{{end}}{{end}}</div>{{end}}{{end}}
+{{define "chat-lines"}}{{$address := .Address}}{{range .Lines}}
+{{if .CardOnly}}{{range .Cards}}{{template "chat-card" .}}{{end}}{{else}}
+{{range .Receipts}}{{template "chat-card" .}}{{end}}
+<li equipo-message="{{if .Own}}own{{else}}incoming{{end}}" data-message="{{.ID}}" data-turn-id="{{.TurnID}}">
+<div equipo-message-meta><strong{{if .Own}} equipo-visually-hidden{{end}}>{{if .Own}}{{$address}}{{else}}{{icon "message-circle"}}{{copy "conversation.coordinator"}}{{end}}</strong><time datetime="{{.CreatedAt.Format "2006-01-02T15:04:05Z07:00"}}">{{.CreatedAt.Format "15:04"}}</time></div>
+{{if .Own}}{{template "message-files" .Files}}{{end}}<div equipo-bubble>{{if .Own}}<p equipo-message-body>{{.Text}}</p>{{else}}<div equipo-message-body equipo-markdown>{{chatMarkdown .Text}}</div>{{end}}</div>
+{{with .Waiting}}<p equipo-card-note data-waiting-connection>{{.}}</p>{{end}}
+{{with .Queued}}<p equipo-card-note data-queued>{{.}}</p>{{end}}
+{{with .Switched}}<p equipo-card-note data-switched>{{.}}</p>{{end}}
+</li>
+{{range .Cards}}{{template "chat-card" .}}{{end}}{{end}}{{end}}{{end}}
+{{define "chat-day"}}<li equipo-rollup id="day-{{.Key}}" data-day="{{.Key}}"{{if .Expanded}} data-expanded{{end}}>
+<section equipo-day-box aria-labelledby="day-title-{{.Key}}">
+<header equipo-day-head><h2 id="day-title-{{.Key}}"><time datetime="{{.Key}}">{{.Label}}</time></h2><span equipo-day-count>{{.Messages}}</span></header>
+{{if .Quiet}}<p equipo-day-quiet>{{copy "chat.day.quiet"}}</p>{{else}}<dl equipo-day-rows>{{range .Rows}}{{template "day-row" .}}{{end}}</dl>{{end}}
+<a equipo-day-toggle href="{{.Toggle}}" data-day-toggle="{{.Key}}" aria-expanded="{{if .Expanded}}true{{else}}false{{end}}" aria-controls="day-feed-{{.Key}}"><span>{{if .Expanded}}{{copy "chat.day.hide"}}{{else}}{{copy "chat.day.show"}}{{end}}</span>{{icon "chevron-down"}}</a>
+</section>
+{{if .Expanded}}<ol equipo-feed equipo-day-feed id="day-feed-{{.Key}}" aria-labelledby="day-title-{{.Key}}">{{template "chat-lines" .Feed}}</ol>{{end}}
+</li>{{end}}
+{{define "day-row"}}<div equipo-day-row data-row="{{.Key}}"><dt>{{.Label}}</dt><dd{{if .Stack}} data-stack{{end}}>{{range $i, $it := .Items}}{{if and $i (not $.Stack)}}, {{end}}<span equipo-day-item>{{if .TaskID}}<a href="/tasks/{{.TaskID}}">{{.Text}}</a>{{else}}{{.Text}}{{end}}{{with .Note}}: <span equipo-day-decision>{{.}}</span>{{end}}</span>{{end}}{{with .More}} <span equipo-day-more>{{.}}</span>{{end}}</dd></div>{{end}}
{{define "content"}}
<div equipo-conversation data-chat-stream data-thinking-set="{{.ThinkingSet}}" data-thinking-words="{{.ThinkingWords}}" data-cursor="{{.Chat.Cursor}}" data-person="{{.Address}}" data-elapsed="{{copy "chat.elapsed"}}" data-moving-in="{{copy "chat.moving_in"}}" data-exploring="{{copy "chat.exploring"}}" data-queued-note="{{copy "chat.queued"}}">
<header equipo-chat-header><h1>{{copy "conversation.title"}}</h1><a href="/conversation/settings/notebook" equipo-header-button aria-label="{{copy "chat.notebook.link"}}" title="{{copy "chat.notebook.link"}}">{{icon "notebook"}}</a><a href="/housekeeping" equipo-header-button aria-label="{{copy "chat.housekeeping.link"}}" title="{{copy "chat.housekeeping.link"}}" data-housekeeping-link>{{icon "list-checks"}}</a><a href="/conversation/settings/connections" equipo-header-button aria-label="{{copy "chat.connections.title"}}" title="{{copy "chat.connections.title"}}" data-connections-link>{{icon "plug"}}</a></header>
@@ -26,18 +46,12 @@
<template equipo-thinking-template><li equipo-message="incoming" equipo-thinking data-turn="" data-started="" aria-busy="true"><div equipo-message-meta><strong>{{icon "message-circle"}}{{copy "conversation.coordinator"}}</strong><time></time></div><div equipo-bubble><div equipo-message-body equipo-markdown data-stream-text></div><p equipo-activity-line><span equipo-activity>{{copy "chat.activity.thinking"}}</span><span equipo-activity-sep aria-hidden="true">·</span><span equipo-elapsed></span></p></div></li></template>
<template equipo-ended-template><li equipo-system-note data-ended=""><p></p></li></template>
<ol equipo-feed>
-{{range .Chat.Messages}}
-{{if .CardOnly}}{{range .Cards}}{{template "chat-card" .}}{{end}}{{else}}
-{{range .Receipts}}{{template "chat-card" .}}{{end}}
-<li equipo-message="{{if .Own}}own{{else}}incoming{{end}}" data-message="{{.ID}}" data-turn-id="{{.TurnID}}">
-<div equipo-message-meta><strong{{if .Own}} equipo-visually-hidden{{end}}>{{if .Own}}{{$.Address}}{{else}}{{icon "message-circle"}}{{copy "conversation.coordinator"}}{{end}}</strong><time datetime="{{.CreatedAt.Format "2006-01-02T15:04:05Z07:00"}}">{{.CreatedAt.Format "15:04"}}</time></div>
-{{if .Own}}{{template "message-files" .Files}}{{end}}<div equipo-bubble>{{if .Own}}<p equipo-message-body>{{.Text}}</p>{{else}}<div equipo-message-body equipo-markdown>{{chatMarkdown .Text}}</div>{{end}}</div>
-{{with .Waiting}}<p equipo-card-note data-waiting-connection>{{.}}</p>{{end}}
-{{with .Queued}}<p equipo-card-note data-queued>{{.}}</p>{{end}}
-{{with .Switched}}<p equipo-card-note data-switched>{{.}}</p>{{end}}
-</li>
-{{range .Cards}}{{template "chat-card" .}}{{end}}{{end}}
-{{else}}<li data-empty-state="conversation.empty">{{copy "conversation.empty"}}</li>{{end}}
+{{range .Chat.Days}}{{template "chat-day" .}}{{end}}
+{{if .Chat.Days}}<li equipo-day-divider data-today><span>{{copy "chat.day.today"}}</span></li>{{end}}
+{{with .Chat.Open}}<li equipo-day-note data-still-open>{{copy "chat.day.still_open"}}</li>{{end}}
+{{template "chat-lines" (.Chat.Earlier .Address)}}
+{{template "chat-lines" (.Chat.Today .Address)}}
+{{if not (or .Chat.Days .Chat.Open .Chat.Messages)}}<li data-empty-state="conversation.empty">{{copy "conversation.empty"}}</li>{{end}}
{{range .Chat.Waiting}}<li equipo-message="incoming" equipo-thinking data-turn="{{.ID}}"{{with .Kind}} data-kind="{{.}}"{{end}} data-started="{{.CreatedAt.UnixMilli}}" aria-busy="true"><div equipo-message-meta><strong>{{icon "message-circle"}}{{copy "conversation.coordinator"}}</strong><time></time></div><div equipo-bubble><div equipo-message-body equipo-markdown data-stream-text></div><p equipo-activity-line><span equipo-activity>{{if eq .Kind "move_in"}}{{copy "chat.moving_in"}}{{else if eq .Kind "explore"}}{{copy "chat.exploring"}}{{else}}{{copy "chat.activity.thinking"}}{{end}}</span><span equipo-activity-sep aria-hidden="true">·</span><span equipo-elapsed></span></p></div></li>{{end}}
{{with .Chat.NoConnection}}<li equipo-card="no_connection" data-no-connection="{{.TurnID}}"><p equipo-card-line>{{.Line}}</p><p equipo-actions><a rst-btn="primary" href="/conversation/settings/connections/add" data-add-connection>{{copy "chat.no_connection.add"}}</a></p></li>{{end}}
{{with .Chat.Ended}}<li equipo-system-note data-ended="{{.ID}}"><p>{{copy .Key}}</p></li>{{end}}
diff --git a/internal/equipo/work_pages.go b/internal/equipo/work_pages.go
index 8b833330..b956ab8f 100644
--- a/internal/equipo/work_pages.go
+++ b/internal/equipo/work_pages.go
@@ -746,31 +746,6 @@ func workBack(r *http.Request, id string) string {
var taskIDPattern = regexp.MustCompile(`^tk[a-z0-9]{1,40}$`)
-// withMessage extends the conversation's newest messages back to want
-// (at most 1,000 older ones), so a task's link to the message it was
-// noted from finds it.
-func (a *application) withMessage(ctx context.Context, address string, msgs []wire.Message, want string) []wire.Message {
- has := func(ms []wire.Message) bool {
- return slices.ContainsFunc(ms, func(m wire.Message) bool { return m.ID == want })
- }
- if want == "" || len(msgs) == 0 || has(msgs) {
- return msgs
- }
- before := msgs[0].ID
- for range 5 {
- page, err := a.store.Chat().Messages(ctx, address, before, 200)
- if err != nil || len(page.Items) == 0 {
- return msgs
- }
- msgs = append(append([]wire.Message{}, page.Items...), msgs...)
- if has(page.Items) || page.Before == "" {
- return msgs
- }
- before = page.Before
- }
- return msgs
-}
-
// workUncombine is Undo on a task Equipo combined into another; it
// returns to the task page it came from (the folded or the surviving one).
func (a *application) workUncombine(w http.ResponseWriter, r *http.Request) {
diff --git a/internal/thintest/rollup_browser_test.go b/internal/thintest/rollup_browser_test.go
new file mode 100644
index 00000000..11824742
--- /dev/null
+++ b/internal/thintest/rollup_browser_test.go
@@ -0,0 +1,65 @@
+//go:build browser
+
+package thintest
+
+import (
+ "fmt"
+ "testing"
+)
+
+// TestBrowserRollup: the conversation opens with yesterday as one day box
+// above today, the merge card still asking at the top of today with its
+// buttons. Show the conversation opens the day in place, under its box,
+// without leaving the page, and keeps the box where the reader is
+// looking; the day stays open while the conversation goes on (the live
+// feed re-renders the page); Hide the conversation closes it. At 1280
+// and 390, light and dark; EQUIPO_BROWSER_ARTIFACTS keeps the shots
+// (rollup-<width>-<scheme>-collapsed.png, -open.png).
+func TestBrowserRollup(t *testing.T) {
+ r := newRollupRig(t)
+ y := r.key(r.yesterday)
+ for i, tc := range []struct {
+ width int64
+ scheme string
+ }{{1280, "light"}, {390, "dark"}} {
+ t.Run(fmt.Sprintf("%d-%s", tc.width, tc.scheme), func(t *testing.T) {
+ p := openInner(t, r.inst.URL, r.inst.Cookie(), tc.width, 844, tc.width == 390, tc.scheme, "no-preference")
+ defer p.stop()
+ p.open("/conversation")
+ p.wait(`document.querySelector('[data-chat-stream]') && document.querySelector('[equipo-offline]').hidden`, "the conversation")
+ box := `document.querySelector('[equipo-rollup][data-day="` + y + `"]')`
+ p.check(`document.querySelectorAll('[equipo-rollup]').length===1 && !!`+box+` && !document.querySelector('[equipo-day-feed]')`, "not one collapsed day box")
+ p.check(`!document.querySelector('[data-message="`+r.lastWord+`"]') && !!document.querySelector('[data-message="`+r.firstDay+`"]')`, "the boundary moved: yesterday shown or today rolled up")
+ p.check(`(()=>{const c=document.querySelector('[data-card="`+r.askCard.ID+`"]');const d=document.querySelector('[data-today]');return !!c && !!c.querySelector('[data-merge-choice="merge"]') && !!(d.compareDocumentPosition(c)&4) && !`+box+`.contains(c)})()`, "the open merge card is not at the top of today with its buttons")
+ p.check(`(()=>{const b=`+box+`.querySelector('[equipo-day-box]');const s=getComputedStyle(b);return s.borderLeftWidth===s.borderTopWidth && s.borderLeftColor===s.borderTopColor})()`, "a coloured left border on the day box")
+ p.fits("the day box")
+ // The shot starts at the top of the scrollback, where the box is.
+ p.check(`(()=>{const s=document.querySelector('[equipo-scroll]');s.scrollTop=0;s.dispatchEvent(new Event('scroll'));return true})()`, "scroll up")
+ p.wait(`document.querySelector('[equipo-scroll]').scrollTop===0`, "the top of the scrollback")
+ p.shot(fmt.Sprintf("rollup-%d-%s-collapsed", tc.width, tc.scheme))
+
+ // Open the day: in place, no navigation, the box in view.
+ p.click(`[data-day-toggle="` + y + `"]`)
+ p.wait(`document.querySelector('[equipo-day-feed] [data-message="`+r.lastWord+`"]')`, "yesterday's transcript")
+ p.stayed("Show the conversation")
+ p.check(`(()=>{const t=document.querySelector('[data-day-toggle="`+y+`"]');return t.getAttribute('aria-expanded')==='true' && document.activeElement===t && t.textContent.trim()==='Hide the conversation'})()`, "the toggle lost its state or focus")
+ p.check(`(()=>{const b=`+box+`.getBoundingClientRect(), s=document.querySelector('[equipo-scroll]').getBoundingClientRect();return b.top>=s.top-1 && b.top<s.bottom})()`, "the opened day is not in view")
+ p.fits("the open day")
+ p.shot(fmt.Sprintf("rollup-%d-%s-open", tc.width, tc.scheme))
+
+ // The conversation goes on: the feed re-renders, the day stays open.
+ replies := `[...document.querySelectorAll('[equipo-message="incoming"]')].filter(e=>!e.closest('[equipo-rollup]')&&e.textContent.includes('Ok.')).length`
+ before := eval[int](p, replies)
+ text := fmt.Sprintf("Anything else from yesterday? (%d)", i)
+ r.next(text)
+ p.wait(`[...document.querySelectorAll('[equipo-message="own"]')].some(e=>e.textContent.includes(`+jsString(text)+`))`, "today's new message")
+ p.wait(replies+`>`+fmt.Sprint(before), "the reply, rendered by the server")
+ p.check(`!!document.querySelector('[equipo-rollup][data-day="`+y+`"][data-expanded] [data-message="`+r.lastWord+`"]')`, "the live feed closed the day")
+
+ // Close it again.
+ p.click(`[data-day-toggle="` + y + `"]`)
+ p.wait(`!document.querySelector('[equipo-day-feed]') && document.querySelector('[data-day-toggle="`+y+`"]').getAttribute('aria-expanded')==='false'`, "the day closed")
+ p.stayed("Hide the conversation")
+ })
+ }
+}
diff --git a/internal/thintest/rollup_pages_test.go b/internal/thintest/rollup_pages_test.go
new file mode 100644
index 00000000..ee6d956f
--- /dev/null
+++ b/internal/thintest/rollup_pages_test.go
@@ -0,0 +1,237 @@
+package thintest
+
+import (
+ "html"
+ "regexp"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/equipo/chat"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// backdate moves everything the conversation has recorded so far back
+// by d, as though it had happened then: messages, turns, cards and tasks.
+func (r *toolRig) backdate(d time.Duration) {
+ r.t.Helper()
+ db := r.inst.DB.Writer()
+ for _, tc := range []struct{ table, col string }{
+ {"chat_messages", "created_at"}, {"chat_turns", "created_at"}, {"chat_turns", "updated_at"},
+ {"chat_cards", "created_at"}, {"chat_cards", "updated_at"}, {"chat_cards", "visible_at"},
+ {"chat_tasks", "created_at"}, {"chat_tasks", "updated_at"}, {"chat_tasks", "done_at"}, {"chat_tasks", "merged_at"},
+ } {
+ rows, err := db.Query("SELECT rowid, " + tc.col + " FROM " + tc.table + " WHERE " + tc.col + " IS NOT NULL")
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ at := map[int64]time.Time{}
+ for rows.Next() {
+ var id int64
+ var t time.Time
+ if err := rows.Scan(&id, &t); err != nil {
+ r.t.Fatal(err)
+ }
+ at[id] = t
+ }
+ rows.Close()
+ for id, t := range at {
+ r.setAt(tc.table, tc.col, "rowid = ?", id, t.Add(-d))
+ }
+ }
+}
+
+func (r *toolRig) setAt(table, col, where string, arg any, at time.Time) {
+ r.t.Helper()
+ if _, err := r.inst.DB.Writer().Exec("UPDATE "+table+" SET "+col+" = ? WHERE "+where, at.UTC(), arg); err != nil {
+ r.t.Fatal(err)
+ }
+}
+
+// messageID is the id of the person's message with text.
+func (r *toolRig) messageID(text string) string {
+ r.t.Helper()
+ var id string
+ if err := r.inst.DB.Writer().QueryRow("SELECT id FROM chat_messages WHERE text = ? AND role = ?", text, wire.RolePerson).Scan(&id); err != nil {
+ r.t.Fatal(text, err)
+ }
+ return id
+}
+
+// cutOut is the part of page from the first from to the next to.
+func cutOut(t *testing.T, page, from, to string) string {
+ t.Helper()
+ _, rest, ok := strings.Cut(page, from)
+ if !ok {
+ t.Fatalf("no %s in page", from)
+ }
+ part, _, _ := strings.Cut(rest, to)
+ return part
+}
+
+// rollupRig is a conversation with yesterday behind it: two tasks
+// recorded and started; one merged without checks on the person's word
+// (a decision); one waiting at Ready to merge with its merge card still
+// asking (open). Yesterday's last message was written a moment before
+// midnight, today's first at midnight exactly.
+type rollupRig struct {
+ *toolRig
+ today, yesterday time.Time
+ asked, merged string
+ askCard wire.Card
+ lastWord, firstDay string
+}
+
+func newRollupRig(t *testing.T) *rollupRig {
+ r := &rollupRig{toolRig: newToolRigAt(t, wire.ProtocolMergeFacts)}
+ ctx := r.ctx
+ base := strings.Repeat("1", 40)
+ r.asked = r.judgedTask("w", "Swipe back on iOS", base, strings.Repeat("2", 40), wire.ChecksCannotRun, "needs_macos")
+ r.askCard = r.mergeCardsWait(r.asked)
+ r.merged = r.judgedTask("x", "Edge swipe on iPad", base, strings.Repeat("4", 40), wire.ChecksCannotRun, "needs_macos")
+ card := r.mergeCardsWait(r.merged)
+ if _, err := r.client.Answer(ctx, card.ID, wire.ChoiceMerge, card.Revision); err != nil {
+ t.Fatal(err)
+ }
+ m := r.dispatched(wire.SpecialistMerge, base, strings.Repeat("4", 40), 0)
+ r.mergedStep("x-m", m, strings.Repeat("f", 40))
+ r.wait("done", func(c *Conversation) bool { return c.Tasks[r.merged].Stage == wire.StageDone })
+ r.expect(wire.FrameForgetTask)
+ r.next("Leave the iOS one until a Mac is free.")
+ // All of that was yesterday, around midday.
+ r.today = chat.DayStart(r.inst.Store.Chat().Now(), r.inst.Store.Chat().Zone(Owner))
+ r.yesterday = r.today.AddDate(0, 0, -1)
+ r.backdate(r.inst.Store.Chat().Now().Sub(r.yesterday.Add(12 * time.Hour)))
+ r.lastWord = r.messageID("Leave the iOS one until a Mac is free.")
+ r.setAt("chat_messages", "created_at", "id = ?", r.lastWord, r.today.Add(-time.Nanosecond))
+ r.next("Good morning. What is left?")
+ r.firstDay = r.messageID("Good morning. What is left?")
+ r.setAt("chat_messages", "created_at", "id = ?", r.firstDay, r.today)
+ return r
+}
+
+func (r *rollupRig) key(d time.Time) string { return d.Format("2006-01-02") }
+
+// TestRollupDayBox: once a day is over in the person's zone it is one
+// day box at its place in the scrollback: its date, what was started,
+// merged and decided, and what is still open, each task a link; none of
+// its messages. The day ends at midnight: a message a moment before is
+// yesterday's, one at midnight today's. Today is never rolled up. What
+// still asks the person (the open merge card, the task underway) stands
+// at the top of today with its buttons, never inside the box.
+func TestRollupDayBox(t *testing.T) {
+ r := newRollupRig(t)
+ page := r.get(r.inst.Cookie(), "/conversation", 200)
+ y, today := r.key(r.yesterday), r.key(r.today)
+ if !strings.Contains(page, `<li equipo-rollup id="day-`+y+`" data-day="`+y+`">`) || !strings.Contains(page, `<time datetime="`+y+`">`+r.yesterday.Format("Monday 2 January")+`</time>`) {
+ t.Fatalf("no box for yesterday: %s", page)
+ }
+ if strings.Contains(page, `id="day-`+today+`"`) || strings.Count(page, "<li equipo-rollup ") != 1 {
+ t.Fatalf("today rolled up, or a box too many: %s", page)
+ }
+ box := cutOut(t, page, `id="day-`+y+`"`, "</li>")
+ row := func(key string) string { return cutOut(t, box, `data-row="`+key+`"`, "</div>") }
+ for _, want := range []struct{ row, text string }{
+ {"started", `<a href="/tasks/` + r.asked + `">Swipe back on iOS</a>`},
+ {"started", `<a href="/tasks/` + r.merged + `">Edge swipe on iPad</a>`},
+ {"merged", `<a href="/tasks/` + r.merged + `">Edge swipe on iPad</a>`},
+ {"decided", `<a href="/tasks/` + r.merged + `">Edge swipe on iPad</a>: <span equipo-day-decision>Merging without checks.</span>`},
+ {"open", `<a href="/tasks/` + r.asked + `">Swipe back on iOS</a>`},
+ } {
+ if !strings.Contains(row(want.row), want.text) {
+ t.Fatalf("%s row lacks %q: %s", want.row, want.text, box)
+ }
+ }
+ if strings.Contains(row("merged"), r.asked) || strings.Contains(row("open"), r.merged) {
+ t.Fatalf("a task in the wrong row: %s", box)
+ }
+ if !strings.Contains(box, `href="/conversation?day=`+y+`#day-`+y+`"`) || !strings.Contains(box, "Show the conversation") || strings.Contains(box, "data-message") {
+ t.Fatalf("box not collapsed with its way in: %s", box)
+ }
+ // The day boundary: a moment before midnight is rolled up, midnight is
+ // today's.
+ if strings.Contains(page, `data-message="`+r.lastWord+`"`) || strings.Contains(page, "Leave the iOS one until a Mac is free.") {
+ t.Fatalf("yesterday's last message outside its box: %s", page)
+ }
+ if !strings.Contains(page, `data-message="`+r.firstDay+`"`) {
+ t.Fatalf("today's first message rolled up: %s", page)
+ }
+ // What still needs the person stands at the top of today, once, with
+ // its buttons.
+ todayPart := page[strings.Index(page, "data-today"):]
+ if !strings.Contains(todayPart, "data-still-open") || strings.Count(page, `data-card="`+r.askCard.ID+`"`) != 1 || !strings.Contains(cutOut(t, todayPart, `data-card="`+r.askCard.ID+`"`, "</li>"), `data-merge-choice="merge"`) {
+ t.Fatalf("the open merge card is not at the top of today: %s", page)
+ }
+ if !strings.Contains(todayPart, `<a href="/tasks/`+r.asked+`">Swipe back on iOS</a>`) {
+ t.Fatalf("the task underway is not at the top of today: %s", todayPart)
+ }
+ if strings.Index(todayPart, `data-card="`+r.askCard.ID+`"`) > strings.Index(todayPart, `data-message="`+r.firstDay+`"`) {
+ t.Fatal("open items after today's messages")
+ }
+ // The transcript itself is unchanged: the API's snapshot still has
+ // yesterday's messages.
+ snap, err := r.client.Snapshot(r.ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ found := false
+ for _, m := range snap.Messages {
+ found = found || m.ID == r.lastWord
+ }
+ if !found {
+ t.Fatal("yesterday's messages left the transcript")
+ }
+}
+
+// TestRollupExpand: Show the conversation (?day=) opens the day's
+// transcript in place, under its box: its messages and its receipts,
+// with Hide the conversation. A card still asking is shown once, at the
+// top of today. A task's "From your conversation" link to a message on
+// an earlier day opens that day at the message; Ask about this still
+// fills the composer; days that do not exist or are today open nothing.
+func TestRollupExpand(t *testing.T) {
+ r := newRollupRig(t)
+ y := r.key(r.yesterday)
+ page := r.get(r.inst.Cookie(), "/conversation?day="+y, 200)
+ if !strings.Contains(page, `<li equipo-rollup id="day-`+y+`" data-day="`+y+`" data-expanded>`) {
+ t.Fatalf("day not open: %s", page)
+ }
+ feed := cutOut(t, page, `id="day-feed-`+y+`"`, "data-today")
+ if !strings.Contains(feed, `data-message="`+r.lastWord+`"`) || !strings.Contains(feed, "Leave the iOS one until a Mac is free.") || !strings.Contains(feed, `<a href="/tasks/`+r.merged+`">Edge swipe on iPad</a>`) {
+ t.Fatalf("the day's transcript is not under its box: %s", feed)
+ }
+ if strings.Contains(feed, `data-message="`+r.firstDay+`"`) {
+ t.Fatal("today's message in yesterday's transcript")
+ }
+ if !strings.Contains(page, `href="/conversation#day-`+y+`" data-day-toggle="`+y+`" aria-expanded="true"`) || !strings.Contains(page, "Hide the conversation") {
+ t.Fatalf("no way to close the day: %s", page)
+ }
+ if n := strings.Count(page, `data-card="`+r.askCard.ID+`"`); n != 1 {
+ t.Fatalf("the open card shows %d times", n)
+ }
+ // Nonsense and today open nothing.
+ for _, q := range []string{"day=" + r.key(r.today), "day=yesterday", "day=" + r.key(r.today.AddDate(0, 0, 3))} {
+ if p := r.get(r.inst.Cookie(), "/conversation?"+q, 200); strings.Contains(p, "data-expanded") || strings.Count(p, "<li equipo-rollup ") != 1 {
+ t.Fatalf("?%s opened something: %s", q, p)
+ }
+ }
+ // The task page's link to the message it was noted from.
+ task := r.get(r.inst.Cookie(), "/tasks/"+r.asked, 200)
+ m := regexp.MustCompile(`href="(/conversation\?message=[^"#]+)#m-([^"]+)"`).FindStringSubmatch(task)
+ if m == nil {
+ t.Fatalf("no link to the conversation on the task page: %s", task)
+ }
+ linked := r.get(r.inst.Cookie(), html.UnescapeString(m[1]), 200)
+ if !strings.Contains(linked, `data-day="`+y+`" data-expanded`) || !strings.Contains(cutOut(t, linked, `id="day-feed-`+y+`"`, "data-today"), `data-message="`+m[2]+`"`) {
+ t.Fatalf("the link did not open its day at the message %s: %s", m[2], linked)
+ }
+ ask := r.get(r.inst.Cookie(), "/conversation?about="+r.merged, 200)
+ if !strings.Contains(ask, "Edge swipe on iPad") || !strings.Contains(ask, "autofocus>") {
+ t.Fatalf("Ask about this lost its draft: %s", ask)
+ }
+ // A teammate's day is their own: no box, no task of the owner's.
+ mate := r.memberCookie()
+ if p := r.get(mate, "/conversation?day="+y, 200); strings.Contains(p, "<li equipo-rollup ") || strings.Contains(p, "Leave the iOS one") {
+ t.Fatalf("a teammate sees the owner's day: %s", p)
+ }
+}