oficina / equipo Public

Merge thin-v1-ux1 f2602d3 into thin-v1-hk1

Staging's line: the final Connections fixes (568b51f), thinking-word
themes and the 4c_rebase test fix. No migration clash: UX1 stops at
0051, housekeeping keeps 0052. Conflicts: page data and the page list
take both; the conversation header keeps the thinking attributes and
gains the Housekeeping link; CSS and copy keep both; size records for
the chat store and the instance carry both reasons (chat measured 9801).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 2944ab00d0956c682feabbe9e34fc486bf79d242 parent fa96734parent f2602d3
39 files changed, +1,307 −320
  • .rastrillo/budgets.txt +3 −2
  • docs/mockups/built/2026-11-08/ux1-after-thinking-words-1280.png binary
  • docs/mockups/built/2026-11-08/ux1-after-thinking-words-390.png binary
  • docs/superpowers/plans/CONN1-PROGRESS.md +20 −0
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +55 −0
  • docs/superpowers/plans/HK1-PROGRESS.md +3 −1
  • docs/superpowers/plans/UX1-PROGRESS.md +87 −0
  • internal/equipo/app.go +2 −0
  • internal/equipo/chat/http.go +28 −0
  • internal/equipo/chat/thinking.go +87 −0
  • internal/equipo/chat/tools.go +76 −30
  • internal/equipo/chat_page.go +1 −0
  • internal/equipo/copy.go +268 −209
  • internal/equipo/handlers.go +31 −27
  • internal/equipo/render.go +1 −1
  • internal/equipo/static/chat-stream.js +52 −6
  • internal/equipo/static/equipo.css +15 −0
  • internal/equipo/static/thinking-preview.js +39 −0
  • internal/equipo/templates/chat.html +1 −1
  • internal/equipo/templates/chrome.html +2 −2
  • internal/equipo/templates/thinking_words.html +16 −0
  • internal/equipo/templates/work_task.html +1 −1
  • internal/equipo/thinking_words.go +76 −0
  • internal/equipo/work_pages.go +1 −0
  • internal/headless/connections_test.go +35 −0
  • internal/headless/merge_test.go +4 −1
  • internal/plan3test/person_api_contract_test.go +1 −1
  • internal/runner/thin/connector.go +58 −30
  • internal/runner/thin/connector_test.go +47 −0
  • internal/runner/thin/judge.go +18 −5
  • internal/runner/thin/state.go +8 −0
  • internal/thintest/connections_contract_test.go +41 −2
  • internal/thintest/thinking_browser_test.go +83 −0
  • internal/thintest/thinking_contract_test.go +90 −0
  • internal/wire/thinking.go +49 −0
  • internal/wire/wiretest/fixtures.go +5 −1
  • internal/wire/wiretest/testdata/api/event-thinking.json +1 −0
  • internal/wire/wiretest/testdata/api/thinking-request.json +1 −0
  • internal/wire/wiretest/testdata/api/thinking.json +1 −0

CI failed — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index c8c59530..cc56585b 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 14700 - Housekeeping slice 1 adds the Housekeeping view beside the Notebook, the digest line and their copy (housekeeping_page.go, about 170 lines); measured 14513. 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 14900 - 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.
@@ -46,9 +46,10 @@ perf GET /api/v1/messages skip Thin v1 person API: bearer-only JSON for devices;
perf GET /api/v1/snapshot skip Thin v1 person API: bearer-only JSON for devices; the browser reads it through /conversation.
perf GET /api/v1/projects skip Thin v1 person API: bearer-only JSON for devices; the browser reads projects through /conversation.
perf GET /api/v1/notebook skip Thin v1 person API: bearer-only JSON for devices; the browser reads the notebook through /conversation/notebook.
+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 9800 - 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 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 10000 - 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.
diff --git a/docs/mockups/built/2026-11-08/ux1-after-thinking-words-1280.png b/docs/mockups/built/2026-11-08/ux1-after-thinking-words-1280.png
new file mode 100644
index 00000000..28f0bf1c
Binary files /dev/null and b/docs/mockups/built/2026-11-08/ux1-after-thinking-words-1280.png differ
diff --git a/docs/mockups/built/2026-11-08/ux1-after-thinking-words-390.png b/docs/mockups/built/2026-11-08/ux1-after-thinking-words-390.png
new file mode 100644
index 00000000..dc6ec610
Binary files /dev/null and b/docs/mockups/built/2026-11-08/ux1-after-thinking-words-390.png differ
diff --git a/docs/superpowers/plans/CONN1-PROGRESS.md b/docs/superpowers/plans/CONN1-PROGRESS.md
index a10f3bf3..382bd3cc 100644
--- a/docs/superpowers/plans/CONN1-PROGRESS.md
+++ b/docs/superpowers/plans/CONN1-PROGRESS.md
@@ -274,6 +274,26 @@ model output; the waiting turn was cancelled).
- CI flake seen once: `TestContractNoRetroactiveMerge` (4c) got a 401 on
an Answer; a rerun of the same commit was green.
+## Round: Astra round 2 (on fa3860a), the final round (2026-11-08)
+
+Eight of nine resolved; the three open items, each with a test that
+fails first and a mutation shown to fail it:
+- Durable sign-out: the cleanup record keeps the home and provider from
+ before the binding goes until the home is deleted; logout is tried
+ twice; signed_out is reported only once the home is gone; a replay
+ after a stop between the binding and the home deletes the home
+ (TestConnectorSignOutFinishesTheHomeAfterACrash,
+ TestConnectorNeverReportsSignedOutWhileTheHomeExists). A late cancel
+ now owes its cleanup before it runs.
+- record_task never maps by order: a later attempt's call is the earlier
+ task in the same project whose title or brief reads like it; like none,
+ it is new and made; like several, it is refused (code ambiguous) with
+ the earlier tasks listed, so the model names one or says separate
+ (TestContractRecordTaskNeverByOrder). separate: true skips matching.
+- Review filters by family first: another family's healthy connection
+ is chosen before preference or headroom; the engineer's family, then
+ its own account, only when none can (C5_review_other_family_first).
+
## Round: Astra round 1 (on 7946111), the Connections page (2026-11-08)
Astra's nine findings, each with a test that fails first or a mutation
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 8b5f2f4c..59f6c6de 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -4871,6 +4871,61 @@ records remain unchanged.
| `chat.merged` | Merged [%s](%s) into %s. | Thin v1 slice 4c the coordinator merges (conversation) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `chat.merged_without_checks` | Merged [%s](%s) into %s without checks. | Thin v1 slice 4c the coordinator merges (conversation) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `chat.activity.add_report` | Adding to the task… | Thin v1 slice 4c the coordinator merges (conversation activity line) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.professional` | Professional | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.professional` | Calm and plain: says what Equipo is doing. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.professional.think` | Thinking… &#124; Considering it… &#124; Working it out… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.professional.read` | Reading the code… &#124; Looking through the files… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.professional.search` | Searching the code… &#124; Looking for it… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.professional.note` | Taking notes… &#124; Writing it down… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.professional.handoff` | Handing it to Engineering… &#124; Briefing Engineering… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.professional.tool` | Working… &#124; Checking the task… &#124; Getting things ready… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.playful` | Playful | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.playful` | Whimsical made-up words while it works. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.playful.think` | Delcambring… &#124; Percolating… &#124; Noodling… &#124; Cogitating… &#124; Mulling it over… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.playful.read` | Perusing… &#124; Rummaging through the files… &#124; Skimming with intent… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.playful.search` | Sleuthing… &#124; Ferreting about… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.playful.note` | Scribbling… &#124; Jotting… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.playful.handoff` | Passing the baton… &#124; Rallying Engineering… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.playful.tool` | Tinkering… &#124; Fiddling with knobs… &#124; Wrangling… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.galaxy` | Galaxy far away | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.galaxy` | Space opera: deflectors, hyperdrives and ancient archives. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.galaxy.think` | Meditating on it… &#124; Trusting my instincts… &#124; Plotting a course past the asteroids… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.galaxy.read` | Consulting the archives… &#124; Decoding the transmission… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.galaxy.search` | Searching the star charts… &#124; Scanning the far systems… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.galaxy.note` | Encoding the plans… &#124; Recording a message for the council… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.galaxy.handoff` | Sending it to the hangar crew… &#124; Briefing the squadron… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.galaxy.tool` | Recalibrating the deflectors… &#124; Patching the hyperdrive… &#124; Bypassing the compressor… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.bridge` | Starship bridge | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.bridge` | On the bridge: scans, logs and the engine room. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.bridge.think` | Running a level-one diagnostic… &#124; Consulting the ship's computer… &#124; Considering all options… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.bridge.read` | Reviewing the ship's logs… &#124; Accessing the library computer… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.bridge.search` | Running a long-range scan… &#124; Sweeping the sector… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.bridge.note` | Making a log entry… &#124; Noting it in the duty log… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.bridge.handoff` | Paging the engine room… &#124; Sending it down to engineering… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.bridge.tool` | Rerouting auxiliary power… &#124; Realigning the sensor array… &#124; Reversing the polarity… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.pirate` | Pirate adventure | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.pirate` | Treasure maps, swordplay and a talkative parrot. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.pirate.think` | Practising insult swordfighting… &#124; Consulting the parrot… &#124; Pondering the map… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.pirate.read` | Studying an old treasure map… &#124; Reading the captain's log… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.pirate.search` | Digging where the X is… &#124; Searching the hold… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.pirate.note` | Scrawling in the logbook… &#124; Adding to the ship's manifest… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.pirate.handoff` | Rousing the crew… &#124; Sending it below decks… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.pirate.tool` | Hoisting the mainsail… &#124; Swabbing the deck… &#124; Bribing the grog machine… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.terminal` | Terminal | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.terminal` | A coding agent at the prompt. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.terminal.think` | Delcambring… &#124; Thinking… &#124; Pondering… &#124; Ruminating… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.terminal.read` | Reading files… &#124; Loading context… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.terminal.search` | Grepping… &#124; Globbing… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.terminal.note` | Appending notes… &#124; Writing to scratch… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.terminal.handoff` | Dispatching to Engineering… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.terminal.tool` | Running tools… &#124; Compiling… &#124; Spinning up… | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.set.random` | Random | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.about.random` | A different set for each turn. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.title` | Thinking words | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.lede` | The words on the line while Equipo works. What it is really doing stays in the tooltip and for screen readers. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.preview` | Preview | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.use` | Use these words | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
+| `thinking.saved` | Saved. Your next message uses them. | Thin v1 UX1 thinking words (settings, thinking line) | Runtime; Paul tweaks the sets; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `nav.checks` | Checks | Thin v1 UX1 inner screens (Tasks, task, Projects, project, Needs you, sidebar) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `nav.attempt` | attempt %d | Thin v1 UX1 inner screens (Tasks, task, Projects, project, Needs you, sidebar) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| `nav.now` | now | Thin v1 UX1 inner screens (Tasks, task, Projects, project, Needs you, sidebar) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
diff --git a/docs/superpowers/plans/HK1-PROGRESS.md b/docs/superpowers/plans/HK1-PROGRESS.md
index 697cce94..21d2ae32 100644
--- a/docs/superpowers/plans/HK1-PROGRESS.md
+++ b/docs/superpowers/plans/HK1-PROGRESS.md
@@ -1,6 +1,8 @@
# Housekeeping slice 1 progress: the smallest useful loop
-Branch `thin-v1-hk1` from `thin-v1-conn1` (fa3860a, what staging runs,
+Branch `thin-v1-hk1` from `thin-v1-conn1` (fa3860a, then staging's line
+`thin-v1-ux1` at f2602d3 merged: final Connections fixes, thinking-word
+themes; no migration clash, housekeeping stays 0052;
with UX1's reversible combine cceab55), with `design-housekeeping`
merged (3aa3fb4, rev 3 accepted). Spec:
`docs/superpowers/specs/2026-11-08-equipo-housekeeping.md` §7 slice 1,
diff --git a/docs/superpowers/plans/UX1-PROGRESS.md b/docs/superpowers/plans/UX1-PROGRESS.md
index 0eec805f..6b735c4c 100644
--- a/docs/superpowers/plans/UX1-PROGRESS.md
+++ b/docs/superpowers/plans/UX1-PROGRESS.md
@@ -256,6 +256,93 @@ pass". Conventions as in `SLICE1-PROGRESS.md` to `SLICE4C-PROGRESS.md`.
browser: closed by default, Details by keyboard and by click, shots
`ux1-task-details-open-{1280,390}`.
+13. Thinking words (Paul: "fun 'Thinking' variants that can be tweaked
+ in the settings... start with a more professional one... 'Random'...
+ 'Delcambring' should be one"). Started from `thin-v1-conn1` at fa3860a
+ (a fast-forward of this branch).
+ - Registry: set ids and situations in `wire/thinking.go` (think, read,
+ search, note, handoff, tool); names, lines and phrases in one block
+ of `copy.go` ("thinking.*"), one line per set and situation, phrases
+ separated by " | ", so Paul edits them in one place.
+ - API v1: `GET /api/v1/thinking` (the person's set, its revision, every
+ set with its phrases) and `PUT /api/v1/thinking {set, revision}` (409
+ on a moved revision), a `thinking` event to the person; stored per
+ person in `chat_settings`. Fixtures `api/thinking.json`,
+ `api/thinking-request.json`, `api/event-thinking.json`.
+ - The line: `chat-stream.js` draws a phrase from the person's set for
+ the situation (the activity's tool), one at a time, the next after
+ six seconds; Random takes one set per turn (from the turn id). The
+ plain activity stays the line's accessible label and its tooltip;
+ moving in and exploring keep their plain lines. A set changed
+ elsewhere applies from the next phrase, with no reload.
+ - Settings: `/settings/thinking` (linked from the profile menu): the
+ sets with a line and three samples, a live preview on the Stardust
+ line cycling the chosen set through every situation, and Use these
+ words. Professional is the default, so there is nothing to set up.
+ - Tests: `TestContractThinkingWords` (default, every situation filled,
+ 12 to 20 phrases a set, Delcambring in Playful and Terminal, no em
+ dashes, 409, the event), `TestBrowserThinkingWords` (the preview at
+ 1280 and 390; a choice reaching an open conversation with no
+ reload, label and tooltip plain; Random). Mutation killed: the
+ page ignoring the thinking event. Shots
+ `ux1-after-thinking-words-{1280,390}.png`.
+ - Seen, not caused here: `TestBrowserTaskThread` (headless, browser
+ tag) fails at fa3860a too, waiting for the answered question to
+ settle in the thread.
+ - CI: `4c_rebase` (headless) failed three times on this branch under
+ load. Cause: its wait ended on any Needs you, and Ready to merge says
+ Needs you "merge" for a moment before Equipo's merge step starts, so
+ the test sometimes read the task mid-merge. It now waits for Done or
+ a real decision, as the scenario's other wait already did.
+ `tryequipo`'s Review expired-account tests also flake on CI with
+ `provider_account_busy` (their home lock is released for the check
+ and taken again without waiting); not touched here.
+ - The sets, for Paul (all copy for review, original wording; no
+ quoted lines, names or catchphrases):
+ - **Professional** (Calm and plain: says what Equipo is doing.):
+ - Thinking: Thinking… | Considering it… | Working it out…
+ - Reading: Reading the code… | Looking through the files…
+ - Searching: Searching the code… | Looking for it…
+ - A note: Taking notes… | Writing it down…
+ - Handing to Engineering: Handing it to Engineering… | Briefing Engineering…
+ - Any other tool: Working… | Checking the task… | Getting things ready…
+ - **Playful** (Whimsical made-up words while it works.):
+ - Thinking: Delcambring… | Percolating… | Noodling… | Cogitating… | Mulling it over…
+ - Reading: Perusing… | Rummaging through the files… | Skimming with intent…
+ - Searching: Sleuthing… | Ferreting about…
+ - A note: Scribbling… | Jotting…
+ - Handing to Engineering: Passing the baton… | Rallying Engineering…
+ - Any other tool: Tinkering… | Fiddling with knobs… | Wrangling…
+ - **Galaxy far away** (Space opera: deflectors, hyperdrives and ancient archives.):
+ - Thinking: Meditating on it… | Trusting my instincts… | Plotting a course past the asteroids…
+ - Reading: Consulting the archives… | Decoding the transmission…
+ - Searching: Searching the star charts… | Scanning the far systems…
+ - A note: Encoding the plans… | Recording a message for the council…
+ - Handing to Engineering: Sending it to the hangar crew… | Briefing the squadron…
+ - Any other tool: Recalibrating the deflectors… | Patching the hyperdrive… | Bypassing the compressor…
+ - **Starship bridge** (On the bridge: scans, logs and the engine room.):
+ - Thinking: Running a level-one diagnostic… | Consulting the ship's computer… | Considering all options…
+ - Reading: Reviewing the ship's logs… | Accessing the library computer…
+ - Searching: Running a long-range scan… | Sweeping the sector…
+ - A note: Making a log entry… | Noting it in the duty log…
+ - Handing to Engineering: Paging the engine room… | Sending it down to engineering…
+ - Any other tool: Rerouting auxiliary power… | Realigning the sensor array… | Reversing the polarity…
+ - **Pirate adventure** (Treasure maps, swordplay and a talkative parrot.):
+ - Thinking: Practising insult swordfighting… | Consulting the parrot… | Pondering the map…
+ - Reading: Studying an old treasure map… | Reading the captain's log…
+ - Searching: Digging where the X is… | Searching the hold…
+ - A note: Scrawling in the logbook… | Adding to the ship's manifest…
+ - Handing to Engineering: Rousing the crew… | Sending it below decks…
+ - Any other tool: Hoisting the mainsail… | Swabbing the deck… | Bribing the grog machine…
+ - **Terminal** (A coding agent at the prompt.):
+ - Thinking: Delcambring… | Thinking… | Pondering… | Ruminating…
+ - Reading: Reading files… | Loading context…
+ - Searching: Grepping… | Globbing…
+ - A note: Appending notes… | Writing to scratch…
+ - Handing to Engineering: Dispatching to Engineering…
+ - Any other tool: Running tools… | Compiling… | Spinning up…
+ - **Random**: A different set for each turn.
+
## Staging
Release c14b833 (built by `scripts/staging-thin.py build`, deployed with
diff --git a/internal/equipo/app.go b/internal/equipo/app.go
index bcfff1e7..accde362 100644
--- a/internal/equipo/app.go
+++ b/internal/equipo/app.go
@@ -266,6 +266,8 @@ func RouterWithStore(d *db.DB, cfg Config, mailer mail.Sender, logger *slog.Logg
r.Post("/runners/enrol", a.approveEnrolment)
r.Post("/runners/{id}/revoke", a.revokeRunner)
r.Post("/projects/{id}/connections", a.saveConnectionChoice)
+ r.Get("/settings/thinking", a.thinkingPage)
+ r.Post("/settings/thinking", a.thinkingSave)
r.Get("/settings", a.settings)
r.Get("/settings/devices", a.deviceBrowser().Devices)
r.Post("/settings/devices/{id}/revoke", a.deviceBrowser().RevokeForm)
diff --git a/internal/equipo/chat/http.go b/internal/equipo/chat/http.go
index 27f34a34..8d9da67b 100644
--- a/internal/equipo/chat/http.go
+++ b/internal/equipo/chat/http.go
@@ -90,6 +90,8 @@ func (h *HTTP) Mount(r chi.Router) {
r.Post("/connections/{id}/cancel", h.bearer(h.cancelConnection))
r.Delete("/connections/{id}", h.thinOr("DELETE /connections/{id}", thinConnection, h.bearer(h.signOut)))
r.Post("/connections/{id}/forget", h.bearer(h.forget))
+ r.Get("/thinking", h.bearer(h.thinking))
+ r.Put("/thinking", h.bearer(h.setThinking))
r.Get("/connections/preference", h.bearer(h.preferences))
r.Put("/connections/preference", h.bearer(h.setPreferences))
h.mountHousekeeping(r)
@@ -153,6 +155,32 @@ func (h *HTTP) forget(w http.ResponseWriter, r *http.Request, p personapi.Person
w.WriteHeader(http.StatusNoContent)
}
+// thinking is GET /api/v1/thinking: the person's thinking words.
+func (h *HTTP) thinking(w http.ResponseWriter, r *http.Request, p personapi.PersonPrincipal) {
+ out, err := h.Store.Thinking(r.Context(), p.Address)
+ if err != nil {
+ h.fail(w, r, err)
+ return
+ }
+ writeJSON(w, 200, out)
+}
+
+// setThinking is PUT /api/v1/thinking {set, revision}: 409 when the
+// revision moved.
+func (h *HTTP) setThinking(w http.ResponseWriter, r *http.Request, p personapi.PersonPrincipal) {
+ var in wire.ThinkingChoice
+ if err := readJSON(r, &in); err != nil {
+ h.fail(w, r, err)
+ return
+ }
+ out, err := h.Store.SetThinking(r.Context(), p.Address, in)
+ if err != nil {
+ h.fail(w, r, err)
+ return
+ }
+ writeJSON(w, 200, out)
+}
+
func (h *HTTP) preferences(w http.ResponseWriter, r *http.Request, p personapi.PersonPrincipal) {
out, err := h.Store.Preference(r.Context(), p.Address)
if err != nil {
diff --git a/internal/equipo/chat/thinking.go b/internal/equipo/chat/thinking.go
new file mode 100644
index 00000000..0d99fbaa
--- /dev/null
+++ b/internal/equipo/chat/thinking.go
@@ -0,0 +1,87 @@
+package chat
+
+import (
+ "context"
+ "slices"
+ "strings"
+
+ "gorm.io/gorm"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// thinkingKey is the person's thinking words setting.
+func thinkingKey(person string) string { return "thinking:" + person }
+
+// ThinkingSets are the sets with their names and phrases, from the copy.
+func (s *Store) ThinkingSets() []wire.ThinkingSet {
+ words := func(key string) string {
+ if s.authority.Copy == nil {
+ return ""
+ }
+ return s.authority.Copy(key)
+ }
+ out := make([]wire.ThinkingSet, 0, len(wire.ThinkingSets))
+ for _, id := range wire.ThinkingSets {
+ set := wire.ThinkingSet{ID: id, Name: words("thinking.set." + id), Description: words("thinking.about." + id), Phrases: map[string][]string{}}
+ if id != wire.ThinkingRandom {
+ for _, sit := range wire.ThinkingSituations {
+ for _, p := range strings.Split(words("thinking."+id+"."+sit), "|") {
+ if p = strings.TrimSpace(p); p != "" {
+ set.Phrases[sit] = append(set.Phrases[sit], p)
+ }
+ }
+ }
+ }
+ out = append(out, set)
+ }
+ return out
+}
+
+// Thinking is the person's thinking words: their set (the default until
+// they pick one) and every set.
+func (s *Store) Thinking(ctx context.Context, person string) (out wire.ThinkingWords, err error) {
+ err = s.read(ctx, func(tx *gorm.DB) error {
+ if err := s.authority.CurrentPerson(ctx, tx); err != nil {
+ return err
+ }
+ value, _, revision, err := (&txn{s: s, db: tx}).settingRevision(thinkingKey(person))
+ if value == "" {
+ value = wire.DefaultThinking
+ }
+ out = wire.ThinkingWords{Set: value, Revision: revision, Sets: s.ThinkingSets()}
+ return err
+ })
+ return out, err
+}
+
+// SetThinking records the person's set against the revision they saw
+// (ErrConflict when it moved) and tells their open pages.
+func (s *Store) SetThinking(ctx context.Context, person string, in wire.ThinkingChoice) (out wire.ThinkingWords, err error) {
+ if !slices.Contains(wire.ThinkingSets, in.Set) {
+ return out, ErrInvalid
+ }
+ err = s.tx(ctx, func(t *txn) error {
+ if err := s.authority.CurrentPerson(ctx, t.db); err != nil {
+ return err
+ }
+ value, _, revision, err := t.settingRevision(thinkingKey(person))
+ if err != nil {
+ return err
+ }
+ if in.Revision != revision {
+ return ErrConflict
+ }
+ if value != in.Set || revision == 0 {
+ if revision, err = t.setSetting(thinkingKey(person), in.Set, person); err != nil {
+ return err
+ }
+ if err := t.event(person, wire.EventThinking, "thinking", person, revision, "", "", 0, wire.ThinkingChoice{Set: in.Set, Revision: revision}); err != nil {
+ return err
+ }
+ }
+ out = wire.ThinkingWords{Set: in.Set, Revision: revision, Sets: s.ThinkingSets()}
+ return nil
+ })
+ return out, err
+}
diff --git a/internal/equipo/chat/tools.go b/internal/equipo/chat/tools.go
index 0279fdcf..1fecf012 100644
--- a/internal/equipo/chat/tools.go
+++ b/internal/equipo/chat/tools.go
@@ -28,6 +28,7 @@ const (
toolMovingIn = "While moving in or exploring you only look around and take notes: status, find, search_code, read_file, read_notes and write_note."
toolAskedOwner = "Nothing changed yet: the person sees a card asking whether to make this change, and one tap applies it. Do not ask again in your reply."
toolNoHome = "New projects have no home now, so there is nothing to clear."
+ toolAmbiguous = "Nothing was recorded: this reads like more than one task this turn already recorded. If it is one of them, use its task id. If it is a new problem, call record_task again with separate: true."
)
// newRepo is the hub's rule for a new repository under the forge host.
@@ -63,6 +64,16 @@ func (t *txn) toolCall(l Lease, v *wire.ToolCall) error {
}
if op != "" {
earlier, err := t.earlierOp(person, v, op)
+ var amb ambiguousOps
+ if errors.As(err, &amb) {
+ res := t.reconcile(amb)
+ res.CallID, res.Person = v.CallID, person
+ raw, _ := json.Marshal(res)
+ if err := t.db.Create(&toolCallRecord{CallID: v.CallID, Person: person, TurnID: v.TurnID, Attempt: v.Attempt, ArgsHash: args, Name: v.Name, Result: string(raw), CreatedAt: t.now()}).Error; err != nil {
+ return err
+ }
+ return t.command(person, wire.FrameToolResult, res)
+ }
if err == nil {
r, err := t.ownTurn(l, v.TurnID)
if err != nil && !errors.Is(err, ErrNotFound) && !errors.Is(err, ErrForbidden) {
@@ -141,11 +152,12 @@ func (t *txn) mutationOp(person string, v *wire.ToolCall) (string, error) {
// earlierOp is the call of the turn that already made this mutation, in
// any attempt. For record_task it is the task the turn recorded with the
-// same arguments; else, from an earlier attempt, the best title or brief
-// match by the rule similar open tasks use, else the first an earlier
-// attempt recorded that this attempt has not matched yet. Within one
-// attempt record_task's own similar-task answer keeps one thing one task,
-// and separate: true makes another on purpose.
+// same arguments; else, from an earlier attempt, the one task in the same
+// project whose title or brief reads like it by the rule similar open
+// tasks use, never by order alone; like none, it is new and runs; like
+// several, it is ambiguous and refused with the list (ambiguousOps).
+// Within one attempt record_task's own similar-task answer keeps one
+// thing one task, and separate: true makes another on purpose.
func (t *txn) earlierOp(person string, v *wire.ToolCall, op string) (toolCallRecord, error) {
var earlier toolCallRecord
if op != "task_record" {
@@ -163,24 +175,27 @@ func (t *txn) earlierOp(person string, v *wire.ToolCall, op string) (toolCallRec
return earlier, err
}
var in struct {
- Title string `json:"title"`
- Brief string `json:"brief"`
+ Title string `json:"title"`
+ Brief string `json:"brief"`
+ Repo string `json:"repo"`
+ Separate bool `json:"separate"`
}
_ = json.Unmarshal(v.Args, &in)
args := argsHash(v.Args)
nt, nb := significant(in.Title), significant(in.Title+" "+in.Brief)
- best := -1.0
+ var like []toolCallRecord
+ seen := map[string]bool{}
for _, r := range rows {
if r.ArgsHash == args {
return r, nil
}
- if r.Attempt >= v.Attempt {
+ if r.Attempt >= v.Attempt || in.Separate {
// Within an attempt, a task like an open one is answered by
- // record_task itself (similar tasks, or separate on purpose).
+ // record_task itself (similar tasks); separate is on purpose.
continue
}
task := madeTask(r)
- if task == "" {
+ if task == "" || seen[task] {
continue
}
k, err := t.loadTask(task)
@@ -190,32 +205,63 @@ func (t *txn) earlierOp(person string, v *wire.ToolCall, op string) (toolCallRec
if err != nil {
return earlier, err
}
+ // The same kind of operation on the same subject: the project,
+ // and a title or brief that reads like it.
+ if in.Repo != "" && k.ProjectID != "" && !t.sameProject(k.ProjectID, in.Repo) {
+ continue
+ }
ts, tn := overlap(nt, significant(k.Title))
bs, bn := overlap(nb, significant(k.Title+" "+k.Brief))
- if score := max(ts, bs*0.9); (ts >= 0.6 && tn >= 2 || bs >= 0.5 && bn >= 3) && score > best {
- earlier, best = r, score
+ if ts >= 0.6 && tn >= 2 || bs >= 0.5 && bn >= 3 {
+ seen[task] = true
+ like = append(like, r)
}
}
- if best >= 0 {
- return earlier, nil
+ switch len(like) {
+ case 0:
+ // Like nothing the turn recorded: a new task, made.
+ return earlier, gorm.ErrRecordNotFound
+ case 1:
+ return like[0], nil
}
- // A later attempt records again what the turn already recorded, in
- // its own words, in order: the first task earlier attempts recorded
- // that no call of this attempt has matched yet.
- if v.Attempt > 1 {
- claimed := map[string]bool{}
- for _, r := range rows {
- if task := madeTask(r); r.Attempt == v.Attempt && task != "" {
- claimed[task] = true
- }
- }
- for _, r := range rows {
- if task := madeTask(r); r.Attempt < v.Attempt && task != "" && !claimed[task] {
- return r, nil
- }
+ return earlier, ambiguousOps{like}
+}
+
+// ambiguousOps: a call reads like more than one operation the turn
+// already made. It is refused with the list, so the model names the one
+// it means.
+type ambiguousOps struct{ ops []toolCallRecord }
+
+func (ambiguousOps) Error() string { return "the call reads like more than one earlier operation" }
+
+// reconcile is the refusal for an ambiguous call: the earlier operations
+// it reads like, by task, title and link.
+func (t *txn) reconcile(a ambiguousOps) wire.ToolResult {
+ type earlier struct {
+ Task string `json:"task"`
+ Title string `json:"title"`
+ Link string `json:"link"`
+ }
+ var out []earlier
+ for _, r := range a.ops {
+ task := madeTask(r)
+ k, err := t.loadTask(task)
+ if err != nil {
+ continue
}
+ out = append(out, earlier{Task: k.ID, Title: k.Title, Link: TaskLink(k.ID)})
+ }
+ raw, _ := json.Marshal(map[string]any{"earlier": out, "note": toolAmbiguous})
+ return wire.ToolResult{IsError: true, Code: "ambiguous", Text: string(raw)}
+}
+
+// sameProject reports whether a task's project is the repository named.
+func (t *txn) sameProject(projectID, repo string) bool {
+ var p projectRecord
+ if t.db.Where("id = ?", projectID).First(&p).Error != nil {
+ return true
}
- return earlier, gorm.ErrRecordNotFound
+ return ProjectName(p.Repo) == ProjectName(repo)
}
// onceInAttempt: kinds the ledger also holds to once within an attempt
diff --git a/internal/equipo/chat_page.go b/internal/equipo/chat_page.go
index 0ea71bd1..2b0ebdb6 100644
--- a/internal/equipo/chat_page.go
+++ b/internal/equipo/chat_page.go
@@ -260,6 +260,7 @@ func (a *application) chatPage(w http.ResponseWriter, r *http.Request) {
view.Ended = &chatEnded{ID: latest.ID, Key: "chat." + latest.State}
}
data.Chat, data.ChatStream, data.RequestID = view, true, rand.Text()
+ data.ThinkingSet, data.ThinkingWords = a.thinkingFor(ctx, address)
render(w, "chat", data)
}
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index d3a40a70..aab6409c 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -764,215 +764,274 @@ var pageCopy = map[string]string{
"chat.merged": "Merged [%s](%s) into %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"chat.merged_without_checks": "Merged [%s](%s) into %s without checks.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"chat.activity.add_report": "Adding to the task…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "nav.checks": "Checks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "nav.attempt": "attempt %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "nav.now": "now", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "nav.queue": "%d waiting:", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.you": "You", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.read": "Reading %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.search": "Searching for %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.edit": "Editing %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.run": "Running %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.other": "Working", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.working": "Working", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.activity.you": "You", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.ago.now": "just now", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.ago.minutes": "%d min ago", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.ago.hours": "%d h ago", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.ago.yesterday": "yesterday", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.ago.days": "%d days ago", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.span.seconds": "%d s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.span.minutes": "%d min", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.span.hours": "%d h %d min", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.changed": "Changed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.source.yours": "From your conversation, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.source.theirs": "From %s's conversation, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tasks_count": "%d tasks across %d projects", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.filter.all_projects": "All projects", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.filter.anyone": "Anyone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.filter.by": "Filed by %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.filter.by_you": "Filed by you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.needs": "Needs you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.needs_hint": "Your decisions, in one tap.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.progress": "In progress", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.ready": "Ready to merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.ready_hint": "Equipo merges these. It asks only when checks could not run.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.done": "Done", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.others": "Waiting on others", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.group.others_hint": "Only the person who filed a task decides for it.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.track.stopped": "Stopped", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.checks": "Checks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.checks_passed": "Checks passed", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.checks_failed": "Checks failed", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.cannot_run": "Checks can't run here", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.cannot.needs_macos": "Checks: needs macOS", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.cannot.needs_network": "Checks: need the network", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.cannot.checks_timeout": "Checks: timed out", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.cannot.checks_unavailable": "Checks can't run here", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.no_checks": "No checks found", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.review": "Review", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.approved": "Approved", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.changes": "Changes requested", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.merged": "Merged", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.by.other_family": "Reviewed by another model family", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.by.same_family": "Reviewed by the same model family as Engineering, on another account", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.badge.by.same_account": "Reviewed by the same model family and account as Engineering, in a fresh session", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.chip.working": "%s working", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.chip.merging": "Merging into the default branch", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.chip.coordinator_looking": "Coordinator looking into it", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.chip.coordinator_merging": "Merging into the default branch", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.chip.waiting_for": "Waiting for %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.chip.waiting_you": "Waiting for you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.dup": "Possible duplicate of", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.dup_decides": "(%s decides)", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.menu.more": "More actions", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.menu.fold": "Fold into \"%s\"", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.menu.fold_note": "Keeps that task; this one closes as a duplicate", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.needs.one": "One decision, in one tap.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.needs.many": "%d decisions, each in one tap.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.unchecked_why": "Review approved the change. Checks could not run here: %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.no_gate": "no checks were found", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.reason.needs_macos": "they need macOS", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.reason.needs_network": "they need the network", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.reason.checks_timeout": "they did not finish in time", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.reason.checks_unavailable": "this runner cannot run them", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.checks_cannot": "Nothing ran, so Review judged the change on its own.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.tasks": "%d tasks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.unchecked_ask": "Merge without checks?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.unchecked_hint": "Waiting leaves it ready until checks can run.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.adopt_why": "Checks passed and Review approved the change before Equipo started merging on its own.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.adopt_ask": "Merge it now?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.stopped_why": "%s stopped: %s, on attempt %d.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.retry_ask": "Try again?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.fold_ask": "Fold it into the other task?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.fold": "Fold into that task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.fix_rounds_why": "Review still asks for changes after two fix rounds.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.branch_moved_why": "The branch moved on Amadan after it was checked, so nothing judged applies to it now.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.conflict_why": "It still conflicts with the default branch after a rebase.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.talk_ask": "Tell the coordinator what to do, or cancel it.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.talk": "Tell the coordinator", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.decide.cancel": "Cancel this task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.you": "you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.merged": "Merged into %s. Checks and review passed before it went in.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.merged_unchecked": "Merged into %s without checks: Review approved it, and checks could not run here.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.done": "Done.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.folded": "Folded into %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.cancelled": "Cancelled.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.merging": "Approved and checked. Equipo is merging it now.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.stopped": "%s stopped: %s. It waits on %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.running": "%s is on it now: %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.unchecked": "Approved, but checks could not run here, so it waits on %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.ready": "Fixed, checked and approved. Equipo merges it next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.ready_waiting": "Approved and waiting at Ready to merge.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.needs": "%s. It waits on %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.looking": "The coordinator is looking into it.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.queued": "Looked into. %s picks it up next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.investigated": "Looked into. Nobody is working on it yet.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.summary.noted": "Noted. The coordinator looks into it next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.heading": "What happened", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.noted_you": "Noted by you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.noted_by": "Noted by %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.looked": "Coordinator looked into it", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.attempt": "%s, attempt %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.stopped": "%s stopped", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.cancelled": "%s cancelled", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.pushed": "Pushed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.on": "%s on %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.checks_passed": "%s passed in %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.no_findings": "No findings.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.ready_next": "Equipo merges it next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.ready_waits_you": "Waiting for your decision.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.ready_waits": "Waiting for %s's decision.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.merged": "Merged into %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.checks_passed": "Checks passed.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.checks_failed": "Checks failed.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.checks_none": "No checks found, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.checks_needs_macos": "Checks need macOS, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.checks_needs_network": "Checks need the network, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.checks_cannot": "Checks couldn't run here, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.approved": "Approved.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.approved_notes": "Approved, with %d notes.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.headline.changes": "Asked for changes.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.on_sha": "On commit %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.merged_told": "The coordinator told %s in the conversation.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.merged_as": "Merged as commit %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.merged_detail": "%s. The coordinator told %s in the conversation.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.tl.folded": "Folded into %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details": "Details", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.brief": "The brief", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.where": "Where it lives", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.branch": "Branch", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.commit": "Commit", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.on": "on", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.merged": "Merged", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.details.task": "Task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.projects_lede": "What Equipo knows about each one. The coordinator adds projects as you mention them.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.one_repo": "1 repository", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.repos": "%d repositories", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.one_task": "1 task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.checks_here": "Checks run here (%s)", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.checks_none": "No checks found", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.checks_needs_macos": "Checks need a Mac", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.checks_elsewhere": "Checks can't run here", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.attachments": "Attachments", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.recently": "Recently", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.notes": "Coordinator's notes", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.project.notes_empty": "No notes about this project yet.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.spread.needs": "%d waiting on someone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.spread.progress": "%d in progress", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.spread.ready": "%d ready", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.spread.done": "%d done", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.legend.needs": "waiting on someone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.legend.progress": "in progress", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.legend.ready": "ready to merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.legend.done": "done", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.noted": "noted", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.pushed": "pushed a change for", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.approved": "approved", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.changes": "asked for changes to", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.stopped": "stopped on", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.merged": "Merged", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.recent.into": "into %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.note.person": "From your conversation, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.note.repo": "From %s, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.note.own": "Noted %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.activity.read_change": "Looking at the change…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "work.task_count": "Tasks: %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.moving_in": "Moving in…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.exploring": "Looking at new access…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.added": "Added %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.working": "Working in %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.created": "Created %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.removed": "Removed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.changed": "Moved to %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.change": "Change", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.move": "Move", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.remove": "Remove", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.use": "Use this", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.answer": "Answer", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.answered": "You answered: %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.access": "Equipo can't reach %s yet. Its agent reaches %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.grant": "Grant access", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.grant_how": "The namespace owner runs this once:", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.home": "New projects go to %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.home_cleared": "New projects go to the best-fitting existing repository", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.undo": "Undo", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.undone": "Undone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.home_ask": "Use %s for new projects?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.home_ask_clear": "Stop using %s for new projects?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.confirm": "Yes", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.card.more": "More", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.link": "Notebook", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.title": "Notebook", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.lede": "What your coordinator keeps in mind, and where each note came from. Notes are reference for it, never instructions.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.empty": "Your coordinator has no notes yet.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.person": "You said", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.repo": "From %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.own": "Coordinator's note", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.reset": "Reset", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.notebook.reset_help": "Reset clears these notes and starts your coordinator afresh. It moves in again and introduces itself.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "chat.elapsed": "{n}s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
- "conversation.title": "Conversation",
+ // Thinking words: the sets a person picks for the thinking line
+ // (Settings, Thinking words). One line per set and situation, phrases
+ // separated by " | ". Edit them here; ids and situations are in
+ // wire.ThinkingSets and wire.ThinkingSituations.
+ "thinking.set.professional": "Professional", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.professional": "Calm and plain: says what Equipo is doing.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.professional.think": "Thinking… | Considering it… | Working it out…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.professional.read": "Reading the code… | Looking through the files…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.professional.search": "Searching the code… | Looking for it…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.professional.note": "Taking notes… | Writing it down…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.professional.handoff": "Handing it to Engineering… | Briefing Engineering…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.professional.tool": "Working… | Checking the task… | Getting things ready…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.set.playful": "Playful", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.playful": "Whimsical made-up words while it works.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.playful.think": "Delcambring… | Percolating… | Noodling… | Cogitating… | Mulling it over…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.playful.read": "Perusing… | Rummaging through the files… | Skimming with intent…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.playful.search": "Sleuthing… | Ferreting about…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.playful.note": "Scribbling… | Jotting…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.playful.handoff": "Passing the baton… | Rallying Engineering…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.playful.tool": "Tinkering… | Fiddling with knobs… | Wrangling…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.set.galaxy": "Galaxy far away", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.galaxy": "Space opera: deflectors, hyperdrives and ancient archives.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.galaxy.think": "Meditating on it… | Trusting my instincts… | Plotting a course past the asteroids…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.galaxy.read": "Consulting the archives… | Decoding the transmission…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.galaxy.search": "Searching the star charts… | Scanning the far systems…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.galaxy.note": "Encoding the plans… | Recording a message for the council…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.galaxy.handoff": "Sending it to the hangar crew… | Briefing the squadron…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.galaxy.tool": "Recalibrating the deflectors… | Patching the hyperdrive… | Bypassing the compressor…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.set.bridge": "Starship bridge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.bridge": "On the bridge: scans, logs and the engine room.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.bridge.think": "Running a level-one diagnostic… | Consulting the ship's computer… | Considering all options…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.bridge.read": "Reviewing the ship's logs… | Accessing the library computer…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.bridge.search": "Running a long-range scan… | Sweeping the sector…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.bridge.note": "Making a log entry… | Noting it in the duty log…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.bridge.handoff": "Paging the engine room… | Sending it down to engineering…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.bridge.tool": "Rerouting auxiliary power… | Realigning the sensor array… | Reversing the polarity…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.set.pirate": "Pirate adventure", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.pirate": "Treasure maps, swordplay and a talkative parrot.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.pirate.think": "Practising insult swordfighting… | Consulting the parrot… | Pondering the map…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.pirate.read": "Studying an old treasure map… | Reading the captain's log…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.pirate.search": "Digging where the X is… | Searching the hold…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.pirate.note": "Scrawling in the logbook… | Adding to the ship's manifest…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.pirate.handoff": "Rousing the crew… | Sending it below decks…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.pirate.tool": "Hoisting the mainsail… | Swabbing the deck… | Bribing the grog machine…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.set.terminal": "Terminal", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.terminal": "A coding agent at the prompt.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.terminal.think": "Delcambring… | Thinking… | Pondering… | Ruminating…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.terminal.read": "Reading files… | Loading context…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.terminal.search": "Grepping… | Globbing…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.terminal.note": "Appending notes… | Writing to scratch…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.terminal.handoff": "Dispatching to Engineering…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.terminal.tool": "Running tools… | Compiling… | Spinning up…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.set.random": "Random", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.about.random": "A different set for each turn.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.title": "Thinking words", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.lede": "The words on the line while Equipo works. What it is really doing stays in the tooltip and for screen readers.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.preview": "Preview", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.use": "Use these words", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "thinking.saved": "Saved. Your next message uses them.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "nav.checks": "Checks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "nav.attempt": "attempt %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "nav.now": "now", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "nav.queue": "%d waiting:", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.you": "You", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.read": "Reading %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.search": "Searching for %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.edit": "Editing %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.run": "Running %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.other": "Working", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.working": "Working", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.activity.you": "You", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.ago.now": "just now", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.ago.minutes": "%d min ago", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.ago.hours": "%d h ago", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.ago.yesterday": "yesterday", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.ago.days": "%d days ago", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.span.seconds": "%d s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.span.minutes": "%d min", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.span.hours": "%d h %d min", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.changed": "Changed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.source.yours": "From your conversation, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.source.theirs": "From %s's conversation, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tasks_count": "%d tasks across %d projects", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.filter.all_projects": "All projects", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.filter.anyone": "Anyone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.filter.by": "Filed by %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.filter.by_you": "Filed by you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.needs": "Needs you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.needs_hint": "Your decisions, in one tap.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.progress": "In progress", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.ready": "Ready to merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.ready_hint": "Equipo merges these. It asks only when checks could not run.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.done": "Done", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.others": "Waiting on others", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.group.others_hint": "Only the person who filed a task decides for it.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.track.stopped": "Stopped", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.checks": "Checks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.checks_passed": "Checks passed", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.checks_failed": "Checks failed", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.cannot_run": "Checks can't run here", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.cannot.needs_macos": "Checks: needs macOS", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.cannot.needs_network": "Checks: need the network", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.cannot.checks_timeout": "Checks: timed out", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.cannot.checks_unavailable": "Checks can't run here", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.no_checks": "No checks found", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.review": "Review", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.approved": "Approved", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.changes": "Changes requested", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.merged": "Merged", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.by.other_family": "Reviewed by another model family", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.by.same_family": "Reviewed by the same model family as Engineering, on another account", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.badge.by.same_account": "Reviewed by the same model family and account as Engineering, in a fresh session", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.chip.working": "%s working", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.chip.merging": "Merging into the default branch", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.chip.coordinator_looking": "Coordinator looking into it", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.chip.coordinator_merging": "Merging into the default branch", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.chip.waiting_for": "Waiting for %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.chip.waiting_you": "Waiting for you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.dup": "Possible duplicate of", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.dup_decides": "(%s decides)", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.menu.more": "More actions", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.menu.fold": "Fold into \"%s\"", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.menu.fold_note": "Keeps that task; this one closes as a duplicate", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.needs.one": "One decision, in one tap.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.needs.many": "%d decisions, each in one tap.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.unchecked_why": "Review approved the change. Checks could not run here: %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.no_gate": "no checks were found", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.reason.needs_macos": "they need macOS", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.reason.needs_network": "they need the network", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.reason.checks_timeout": "they did not finish in time", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.reason.checks_unavailable": "this runner cannot run them", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.checks_cannot": "Nothing ran, so Review judged the change on its own.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.tasks": "%d tasks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.unchecked_ask": "Merge without checks?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.unchecked_hint": "Waiting leaves it ready until checks can run.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.adopt_why": "Checks passed and Review approved the change before Equipo started merging on its own.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.adopt_ask": "Merge it now?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.stopped_why": "%s stopped: %s, on attempt %d.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.retry_ask": "Try again?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.fold_ask": "Fold it into the other task?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.fold": "Fold into that task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.fix_rounds_why": "Review still asks for changes after two fix rounds.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.branch_moved_why": "The branch moved on Amadan after it was checked, so nothing judged applies to it now.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.conflict_why": "It still conflicts with the default branch after a rebase.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.talk_ask": "Tell the coordinator what to do, or cancel it.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.talk": "Tell the coordinator", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.decide.cancel": "Cancel this task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.you": "you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.merged": "Merged into %s. Checks and review passed before it went in.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.merged_unchecked": "Merged into %s without checks: Review approved it, and checks could not run here.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.done": "Done.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.folded": "Folded into %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.cancelled": "Cancelled.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.merging": "Approved and checked. Equipo is merging it now.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.stopped": "%s stopped: %s. It waits on %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.running": "%s is on it now: %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.unchecked": "Approved, but checks could not run here, so it waits on %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.ready": "Fixed, checked and approved. Equipo merges it next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.ready_waiting": "Approved and waiting at Ready to merge.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.needs": "%s. It waits on %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.looking": "The coordinator is looking into it.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.queued": "Looked into. %s picks it up next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.investigated": "Looked into. Nobody is working on it yet.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.summary.noted": "Noted. The coordinator looks into it next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.heading": "What happened", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.noted_you": "Noted by you", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.noted_by": "Noted by %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.looked": "Coordinator looked into it", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.attempt": "%s, attempt %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.stopped": "%s stopped", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.cancelled": "%s cancelled", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.pushed": "Pushed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.on": "%s on %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.checks_passed": "%s passed in %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.no_findings": "No findings.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.ready_next": "Equipo merges it next.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.ready_waits_you": "Waiting for your decision.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.ready_waits": "Waiting for %s's decision.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.merged": "Merged into %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.checks_passed": "Checks passed.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.checks_failed": "Checks failed.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.checks_none": "No checks found, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.checks_needs_macos": "Checks need macOS, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.checks_needs_network": "Checks need the network, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.checks_cannot": "Checks couldn't run here, so Review judged it alone.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.approved": "Approved.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.approved_notes": "Approved, with %d notes.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.headline.changes": "Asked for changes.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.on_sha": "On commit %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.merged_told": "The coordinator told %s in the conversation.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.merged_as": "Merged as commit %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.merged_detail": "%s. The coordinator told %s in the conversation.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.folded": "Folded into %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details": "Details", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.brief": "The brief", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.where": "Where it lives", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.branch": "Branch", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.commit": "Commit", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.on": "on", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.merged": "Merged", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.details.task": "Task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.projects_lede": "What Equipo knows about each one. The coordinator adds projects as you mention them.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.one_repo": "1 repository", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.repos": "%d repositories", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.one_task": "1 task", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.checks_here": "Checks run here (%s)", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.checks_none": "No checks found", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.checks_needs_macos": "Checks need a Mac", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.checks_elsewhere": "Checks can't run here", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.attachments": "Attachments", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.recently": "Recently", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.notes": "Coordinator's notes", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.project.notes_empty": "No notes about this project yet.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.spread.needs": "%d waiting on someone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.spread.progress": "%d in progress", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.spread.ready": "%d ready", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.spread.done": "%d done", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.legend.needs": "waiting on someone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.legend.progress": "in progress", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.legend.ready": "ready to merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.legend.done": "done", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.noted": "noted", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.pushed": "pushed a change for", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.approved": "approved", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.changes": "asked for changes to", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.stopped": "stopped on", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.merged": "Merged", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.recent.into": "into %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.note.person": "From your conversation, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.note.repo": "From %s, %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.note.own": "Noted %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.activity.read_change": "Looking at the change…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.task_count": "Tasks: %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.moving_in": "Moving in…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.exploring": "Looking at new access…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.added": "Added %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.working": "Working in %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.created": "Created %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.removed": "Removed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.changed": "Moved to %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.change": "Change", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.move": "Move", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.remove": "Remove", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.use": "Use this", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.answer": "Answer", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.answered": "You answered: %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.access": "Equipo can't reach %s yet. Its agent reaches %s.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.grant": "Grant access", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.grant_how": "The namespace owner runs this once:", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.home": "New projects go to %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.home_cleared": "New projects go to the best-fitting existing repository", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.undo": "Undo", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.undone": "Undone", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.home_ask": "Use %s for new projects?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.home_ask_clear": "Stop using %s for new projects?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.confirm": "Yes", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.card.more": "More", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.link": "Notebook", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.title": "Notebook", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.lede": "What your coordinator keeps in mind, and where each note came from. Notes are reference for it, never instructions.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.empty": "Your coordinator has no notes yet.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.person": "You said", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.repo": "From %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.own": "Coordinator's note", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.reset": "Reset", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.notebook.reset_help": "Reset clears these notes and starts your coordinator afresh. It moves in again and introduces itself.", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "chat.elapsed": "{n}s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "conversation.title": "Conversation",
// COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context): conversation.empty
"conversation.empty": "Say what you want done. Your coordinator picks the project and tells you, and you can change it.",
"conversation.age_minutes": "%d min", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
diff --git a/internal/equipo/handlers.go b/internal/equipo/handlers.go
index 9687257c..ac4e83ef 100644
--- a/internal/equipo/handlers.go
+++ b/internal/equipo/handlers.go
@@ -26,33 +26,37 @@ type budgetForm struct {
Fields []budgetField
}
type pageData struct {
- Repositories []string
- PersonDevices []personapi.Device
- PersonDevice personapi.Device
- PersonDeviceRequest string
- Teams setup.TeamLinkView
- Onboarding setup.OnboardingView
- Invite setup.InviteView
- Invitations []Invitation
- Specialists []Specialist
- Library library.View
- SpecialistNames map[string]string
- Conversation conversation.Page
- Chat chatView
- Thin workView
- Notebook []notebookLine
- Housekeeping housekeepingView
- Models modelsView
- ConnectionsStream bool
- ChatStream bool
- Coordinator conversation.CoordinatorPage
- Plan planning.Page
- Rendered RenderedChangeView
- Live live.View
- Topic, CollectionTopic string
- Tasks []TaskViewData
- TaskView TaskViewData
- Work SpecialistWorkView
+ Repositories []string
+ PersonDevices []personapi.Device
+ PersonDevice personapi.Device
+ PersonDeviceRequest string
+ Teams setup.TeamLinkView
+ Onboarding setup.OnboardingView
+ Invite setup.InviteView
+ Invitations []Invitation
+ Specialists []Specialist
+ Library library.View
+ SpecialistNames map[string]string
+ Conversation conversation.Page
+ Chat chatView
+ Thin workView
+ Notebook []notebookLine
+ Housekeeping housekeepingView
+ Models modelsView
+ ConnectionsStream bool
+ ChatStream bool
+ // ThinkingSet and ThinkingWords are the person's thinking words for
+ // the thinking line (thinking_words.go).
+ ThinkingSet, ThinkingWords string
+ Thinking thinkingView
+ Coordinator conversation.CoordinatorPage
+ Plan planning.Page
+ Rendered RenderedChangeView
+ Live live.View
+ Topic, CollectionTopic string
+ Tasks []TaskViewData
+ TaskView TaskViewData
+ Work SpecialistWorkView
library.NavigationView
Rail railView
Connections []ConnectionView
diff --git a/internal/equipo/render.go b/internal/equipo/render.go
index 8cd40a5f..9ca3b945 100644
--- a/internal/equipo/render.go
+++ b/internal/equipo/render.go
@@ -33,7 +33,7 @@ var assets = rastrillo.NewAssets(appFS)
var pages = map[string]*template.Template{}
func init() {
- for _, name := range []string{"person_devices", "person_device", "teams", "onboarding", "invite", "playbooks", "playbook_form", "playbook_diff", "specialist_form", "template_library", "template_diff", "conversation", "chat", "thread", "plan", "coordinator", "preferences", "index", "empty", "projects", "project", "project_form", "people", "settings", "specialist", "errors", "signin_page", "form_error", "runners", "tasks", "task", "task_form", "question", "merge", "connections", "recovery", "recovery_form", "rendered_approval", "notebook", "housekeeping", "work_tasks", "work_task", "work_projects", "work_project", "models", "work_needs"} {
+ for _, name := range []string{"person_devices", "person_device", "teams", "onboarding", "invite", "playbooks", "playbook_form", "playbook_diff", "specialist_form", "template_library", "template_diff", "conversation", "chat", "thread", "plan", "coordinator", "preferences", "index", "empty", "projects", "project", "project_form", "people", "settings", "specialist", "errors", "signin_page", "form_error", "runners", "tasks", "task", "task_form", "question", "merge", "connections", "recovery", "recovery_form", "rendered_approval", "notebook", "housekeeping", "work_tasks", "work_task", "work_projects", "work_project", "models", "work_needs", "thinking_words"} {
page := template.Must(template.New("layout").
Funcs(ui.Funcs(ui.WithIcons(icons.Icon, icons.Assets))).
Funcs(template.FuncMap{"chatMarkdown": chatmarkdown.Render, "loadingLine": loadingLine, "split": strings.Split, "since": sinceMillis, "elapsed": elapsedText, "short": short, "agoData": agoData, "agoFormats": agoFormats, "projectAllows": library.ProjectAllowed, "asset": assets.Path, "copy": copyText, "taskGroups": func() []string { return []string{"needs-person", "running", "queued", "finished"} },
diff --git a/internal/equipo/static/chat-stream.js b/internal/equipo/static/chat-stream.js
index 57f8b9ec..2e671281 100644
--- a/internal/equipo/static/chat-stream.js
+++ b/internal/equipo/static/chat-stream.js
@@ -74,6 +74,36 @@
});
return out;
}
+ // Thinking words (Settings): the person's set flavours the phrase the
+ // line draws, by situation; the real activity stays the label (for
+ // screen readers) and the tooltip. Random picks a set per turn. A set
+ // changed elsewhere arrives as a thinking event and applies from the
+ // next phrase.
+ var WORDS = {};
+ try { WORDS = JSON.parse(root.dataset.thinkingWords || "{}"); } catch (_) { WORDS = {}; }
+ var SITUATION = { read_file: "read", read_notes: "read", read_task: "read", read_change: "read", search_code: "search", find: "search", status: "search", write_note: "note", record_task: "note", add_finding: "note", add_report: "note", start_task: "handoff" };
+ function situationOf(v) {
+ if (!v || v.kind === "thinking") return "think";
+ return SITUATION[v.tool] || "tool";
+ }
+ function setFor(li) {
+ var set = root.dataset.thinkingSet || "professional";
+ if (set !== "random") return set;
+ var ids = Object.keys(WORDS).filter(function (k) { return k !== "random" && Object.keys(WORDS[k] || {}).length; }).sort();
+ var turn = li.dataset.turn || "", h = 0;
+ for (var i = 0; i < turn.length; i++) h = (h * 31 + turn.charCodeAt(i)) >>> 0;
+ return ids.length ? ids[h % ids.length] : "professional";
+ }
+ function phrases(li) {
+ if (li.dataset.kind) return [];
+ return (WORDS[setFor(li)] || {})[li.situation || "think"] || [];
+ }
+ function themed(li, label) {
+ var list = phrases(li);
+ li.wordAt = Date.now();
+ li.dataset.thinkingWords = setFor(li);
+ return list.length ? list[(li.wordIndex || 0) % list.length] : label;
+ }
// The thinking line comes alive: the sparkle, and the drawn phrase
// beside the label, which stays for screen readers.
function enliven(li) {
@@ -105,7 +135,8 @@
label.before(phrase);
label.setAttribute("equipo-visually-hidden", "");
li.flourished = Date.now();
- draw(li, label.textContent, true);
+ line.title = label.textContent;
+ draw(li, themed(li, label.textContent), true);
}
// Draw a phrase: the window eases to its width, shared letters stay,
// the rest of the old phrase fades as the new one comes in.
@@ -152,11 +183,16 @@
clearTimeout(spark.flourishing);
spark.flourishing = setTimeout(function () { spark.removeAttribute("data-flourish"); }, 1800);
}
- function setActivity(li, label) {
+ function setActivity(li, label, situation) {
var span = li.querySelector("[equipo-activity]");
- if (!span || !label || span.textContent === label) return;
+ situation = situation || "think";
+ if (!span || !label || span.textContent === label && li.situation === situation) return;
+ if (li.situation !== situation) li.wordIndex = 0;
+ li.situation = situation;
span.textContent = label;
- draw(li, label, false);
+ var line = li.querySelector("[equipo-activity-line]");
+ if (line) line.title = label;
+ draw(li, themed(li, label), false);
}
// The line gives way (the first words arrived) or comes back (a tool
// after text).
@@ -268,6 +304,12 @@
var out = el.querySelector("[equipo-elapsed]");
var started = Number(el.dataset.started) || Date.now();
if (out) out.textContent = format.replace("{n}", String(Math.max(0, Math.floor((Date.now() - started) / 1000))));
+ // The set's phrases take turns, slowly, while the activity holds.
+ if (el.wordAt && !el.hasAttribute("data-streaming") && Date.now() - el.wordAt > 6000 && phrases(el).length > 1) {
+ el.wordIndex = (el.wordIndex || 0) + 1;
+ var span = el.querySelector("[equipo-activity]");
+ draw(el, themed(el, span ? span.textContent : ""), false);
+ }
if (LOOK.star.every && !el.hasAttribute("data-streaming") && Date.now() - (el.flourished || 0) > LOOK.star.every) flourish(el);
});
}
@@ -301,7 +343,7 @@
delete el.dataset.streaming;
leave(el, false);
}
- setActivity(el, v.label);
+ setActivity(el, v.label, situationOf(v));
scroll();
}
// A committed reply is rendered by the server (markdown), then running
@@ -375,6 +417,10 @@
if (e.cursor <= cursor) return;
cursor = e.cursor;
var v = e.data;
+ if (type === "thinking") {
+ root.dataset.thinkingSet = v.set;
+ return;
+ }
var question = e.resource === "question";
if (thread) {
// The thread: its own questions' streams; everything else about
@@ -562,7 +608,7 @@
function open() {
source = new EventSource("/api/v1/events?after=" + cursor);
- ["message", "turn", "delta", "runner", "activity", "card", "task", "step", "question"].forEach(function (type) {
+ ["message", "turn", "delta", "runner", "activity", "card", "task", "step", "question", "thinking"].forEach(function (type) {
source.addEventListener(type, function (event) { failures = 0; apply(type, event.data); });
});
source.addEventListener("ping", function () { failures = 0; });
diff --git a/internal/equipo/static/equipo.css b/internal/equipo/static/equipo.css
index 538e409a..f4518930 100644
--- a/internal/equipo/static/equipo.css
+++ b/internal/equipo/static/equipo.css
@@ -906,6 +906,21 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex
[equipo-tl-body] pre { max-block-size: 14rem; overflow: auto; font-size: var(--rst-fs-xs); }
[equipo-tl-note] { margin: 0; font-size: var(--rst-fs-xs); color: var(--rst-text-faint); }
@media (prefers-reduced-motion: reduce) { [equipo-tl-more] > summary .icon { transition: none; } }
+/* Thinking words: the sets as rows to pick from, and the live preview. */
+[equipo-lede] { margin: 0 0 var(--rst-sp-4); color: var(--rst-text-muted); max-inline-size: 64ch; }
+[equipo-saved] { margin: 0 0 var(--rst-sp-3); color: var(--rst-tone-positive-fg); font-size: var(--rst-fs-sm); }
+[equipo-thinking-preview] { margin: 0 0 var(--rst-sp-4); 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); }
+[equipo-thinking-preview] [equipo-quiet] { margin: 0 0 var(--rst-sp-1); }
+[equipo-thinking-preview] [data-preview-phrase] { color: var(--rst-text); font-weight: 500; }
+[equipo-thinking-form] fieldset { border: 0; margin: 0 0 var(--rst-sp-4); padding: 0; min-inline-size: 0; }
+[equipo-set-row] { display: block; padding: 0; }
+[equipo-set-row] > label { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--rst-sp-3); row-gap: .15rem; padding: var(--rst-sp-3) var(--rst-sp-4); cursor: pointer; }
+[equipo-set-row] input { grid-row: 1 / span 3; margin-block-start: .2rem; accent-color: var(--rst-accent); cursor: pointer; }
+[equipo-set-name] { font-weight: 500; }
+[equipo-set-row] [equipo-desc] { color: var(--rst-text-muted); font-size: var(--rst-fs-sm); }
+[equipo-set-sample] { color: var(--rst-text-faint); font-size: var(--rst-fs-xs); }
+[equipo-set-row]:has(input:checked) { background: var(--rst-tint-hover); }
+[equipo-set-row]:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--rst-focus-edge); }
/* Housekeeping: the view beside the Notebook. What Equipo tidied, quiet
lines with Undo while it can; today's budgets as quiet meters. */
diff --git a/internal/equipo/static/thinking-preview.js b/internal/equipo/static/thinking-preview.js
new file mode 100644
index 00000000..603cb3ff
--- /dev/null
+++ b/internal/equipo/static/thinking-preview.js
@@ -0,0 +1,39 @@
+// The Thinking words page: a live preview of the chosen set on the
+// Stardust line, cycling its phrases situation by situation (thinking,
+// reading, searching, a note, a handoff, a tool). Words are content, so
+// they keep changing under reduced motion; only the sparkle is still.
+(function () {
+ "use strict";
+ var root = document.querySelector("[data-thinking-words]");
+ var line = root && root.querySelector("[data-preview-line]");
+ if (!line || !window.EquipoStardust) return;
+ var words = {};
+ try { words = JSON.parse(root.dataset.thinkingWords || "{}"); } catch (e) {}
+ var situations = ["think", "read", "search", "note", "handoff", "tool"];
+ var out = line.querySelector("[data-preview-phrase]");
+ line.prepend(window.EquipoStardust.spark(window.EquipoStardust.look));
+ var step = 0, randomSet = "";
+ function chosen() {
+ var c = root.querySelector('input[name="set"]:checked');
+ return c ? c.value : "professional";
+ }
+ function show() {
+ var set = chosen();
+ if (set === "random") {
+ // Random: another set each "turn" (each round of situations).
+ var ids = Object.keys(words).filter(function (k) { return k !== "random"; });
+ if (!randomSet || step % situations.length === 0) randomSet = ids[Math.floor(Math.random() * ids.length)];
+ set = randomSet;
+ }
+ var phrases = (words[set] || {})[situations[step % situations.length]] || [];
+ var round = Math.floor(step / situations.length);
+ out.textContent = phrases.length ? phrases[round % phrases.length] : "";
+ line.dataset.set = set;
+ step++;
+ }
+ root.addEventListener("change", function (e) {
+ if (e.target.name === "set") { step = 0; randomSet = ""; show(); }
+ });
+ show();
+ setInterval(show, 2200);
+})();
diff --git a/internal/equipo/templates/chat.html b/internal/equipo/templates/chat.html
index 784ee361..25acd1e7 100644
--- a/internal/equipo/templates/chat.html
+++ b/internal/equipo/templates/chat.html
@@ -11,7 +11,7 @@
{{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}}{{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 "content"}}
-<div equipo-conversation data-chat-stream data-cursor="{{.Chat.Cursor}}" data-person="{{.Address}}" data-elapsed="{{copy "chat.elapsed"}}" data-moving-in="{{copy "chat.moving_in"}}" data-exploring="{{copy "chat.exploring"}}">
+<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"}}">
<header equipo-chat-header><h1>{{copy "conversation.title"}}</h1><a href="/conversation/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/connections" equipo-header-button aria-label="{{copy "chat.connections.title"}}" title="{{copy "chat.connections.title"}}" data-connections-link>{{icon "plug"}}</a></header>
<p equipo-offline role="status"{{if not .Chat.Offline}} hidden{{end}}>{{copy "chat.offline"}}</p>
<div equipo-scroll tabindex="0" role="region" aria-label="{{copy "conversation.title"}}">
diff --git a/internal/equipo/templates/chrome.html b/internal/equipo/templates/chrome.html
index fd3d1fce..210f7236 100644
--- a/internal/equipo/templates/chrome.html
+++ b/internal/equipo/templates/chrome.html
@@ -1,6 +1,6 @@
{{define "rail-brand"}}<span hidden></span>{{end}}
{{define "title"}}{{copy .Title}} · {{copy "brand"}}{{end}}
-{{define "head"}}{{.Live.Head (T "rastrillo.ui.live.paused") (T "rastrillo.ui.live.unconfirmed")}}<link rel="stylesheet" href="{{asset "static/equipo.css"}}"><script defer src="{{asset "static/nav-stream.js"}}"></script><script defer src="{{asset "static/work-stream.js"}}"></script>{{if or .ConnectionsStream .ChatStream}}<script defer src="{{asset "static/stardust.js"}}"></script>{{end}}{{if .ConnectionsStream}}<script defer src="{{asset "static/connections.js"}}"></script>{{end}}{{if .ChatStream}}<script defer src="{{asset "static/chat-stream.js"}}"></script><script defer src="{{asset "static/chat-compose.js"}}"></script><script defer src="{{asset "static/ask-target.js"}}"></script>{{if eq .Key "conversation"}}<script defer src="{{asset "static/chat-anchor.js"}}"></script>{{end}}{{else if eq .Key "conversation"}}<script defer blocking="render" src="{{asset "static/chat-navigation.js"}}"></script><script defer src="{{asset "static/chat.js"}}"></script><script defer src="{{asset "static/chat-send.js"}}"></script>{{end}}{{end}}
+{{define "head"}}{{.Live.Head (T "rastrillo.ui.live.paused") (T "rastrillo.ui.live.unconfirmed")}}<link rel="stylesheet" href="{{asset "static/equipo.css"}}"><script defer src="{{asset "static/nav-stream.js"}}"></script><script defer src="{{asset "static/work-stream.js"}}"></script>{{if eq .Key "thinking"}}<script defer src="{{asset "static/stardust.js"}}"></script><script defer src="{{asset "static/thinking-preview.js"}}"></script>{{end}}{{if or .ConnectionsStream .ChatStream}}<script defer src="{{asset "static/stardust.js"}}"></script>{{end}}{{if .ConnectionsStream}}<script defer src="{{asset "static/connections.js"}}"></script>{{end}}{{if .ChatStream}}<script defer src="{{asset "static/chat-stream.js"}}"></script><script defer src="{{asset "static/chat-compose.js"}}"></script><script defer src="{{asset "static/ask-target.js"}}"></script>{{if eq .Key "conversation"}}<script defer src="{{asset "static/chat-anchor.js"}}"></script>{{end}}{{else if eq .Key "conversation"}}<script defer blocking="render" src="{{asset "static/chat-navigation.js"}}"></script><script defer src="{{asset "static/chat.js"}}"></script><script defer src="{{asset "static/chat-send.js"}}"></script>{{end}}{{end}}
{{define "up"}}/work{{if .Key}}#nav-{{.Key}}{{end}}{{end}}
{{define "up-label"}}{{.TeamName}}{{end}}
{{define "brand"}}<a rst-shell-brand href="/work">{{icon "users"}}{{.TeamName}}</a>{{end}}
@@ -22,4 +22,4 @@
</div>{{end}}</details>{{end}}{{end}}
{{define "region:notice"}}<div id="notice" role="status"></div>{{end}}
{{define "profile"}}{{if .Address}}<span rst-person-av aria-hidden="true">{{icon "users"}}</span><span rst-person-name>{{.Address}}</span>{{else}}<span rst-person-av="empty placeholder" aria-hidden="true"></span><span rst-person-name>{{copy "nav.account"}}</span>{{end}}{{end}}
-{{define "account"}}{{if .Address}}<form method="post" action="/signout"><button rst-btn type="submit">{{copy "nav.signout"}}</button></form>{{end}}{{end}}
+{{define "account"}}{{if .Address}}<a href="/settings/thinking" data-thinking-link>{{copy "thinking.title"}}</a><form method="post" action="/signout"><button rst-btn type="submit">{{copy "nav.signout"}}</button></form>{{end}}{{end}}
diff --git a/internal/equipo/templates/thinking_words.html b/internal/equipo/templates/thinking_words.html
new file mode 100644
index 00000000..6d2d2454
--- /dev/null
+++ b/internal/equipo/templates/thinking_words.html
@@ -0,0 +1,16 @@
+{{define "title"}}{{copy "thinking.title"}}{{end}}
+{{define "content"}}
+{{with .Thinking}}<section equipo-inner equipo-thinking-words data-thinking-words="{{.JSON}}">
+<div equipo-page-head><h1>{{copy "thinking.title"}}</h1></div>
+<p equipo-lede>{{copy "thinking.lede"}}</p>
+{{if .Saved}}<p equipo-saved role="status">{{copy "thinking.saved"}}</p>{{end}}
+<div equipo-thinking-preview aria-hidden="true"><p equipo-quiet>{{copy "thinking.preview"}}</p><p equipo-activity-line data-preview-line><span data-preview-phrase></span></p></div>
+<form method="post" action="/settings/thinking" equipo-thinking-form>
+<input type="hidden" name="revision" value="{{.Revision}}">
+<fieldset><legend equipo-visually-hidden>{{copy "thinking.title"}}</legend>
+<ol equipo-rows>{{$cur := .Set}}{{range .Sets}}<li equipo-row equipo-set-row data-set="{{.ID}}"><label><input type="radio" name="set" value="{{.ID}}"{{if eq .ID $cur}} checked{{end}}><span equipo-set-name>{{.Name}}</span><span equipo-desc>{{.Description}}</span>{{with index .Phrases "think"}}<span equipo-set-sample>{{range $i, $p := .}}{{if lt $i 3}}{{if $i}} · {{end}}{{$p}}{{end}}{{end}}</span>{{end}}</label></li>{{end}}</ol>
+</fieldset>
+<button equipo-btn data-primary type="submit">{{copy "thinking.use"}}</button>
+</form>
+</section>{{end}}
+{{end}}
diff --git a/internal/equipo/templates/work_task.html b/internal/equipo/templates/work_task.html
index b0e8c3ad..8cfb242f 100644
--- a/internal/equipo/templates/work_task.html
+++ b/internal/equipo/templates/work_task.html
@@ -37,7 +37,7 @@
</div>
</details>
</section>
-{{$thread := $.Thin.Thread}}<section equipo-thread equipo-t-thread data-chat-stream data-task="{{.ID}}" data-cursor="{{$thread.Cursor}}" data-elapsed="{{copy "chat.elapsed"}}" data-thinking="{{copy "chat.activity.thinking"}}" data-ask-format="{{copy "work.ask.target"}}" data-ask-placeholder="{{copy "work.ask.placeholder"}}" data-name-engineering="{{copy "work.specialist.engineering"}}" data-name-review="{{copy "work.specialist.review"}}">
+{{$thread := $.Thin.Thread}}<section equipo-thread equipo-t-thread data-chat-stream data-task="{{.ID}}" data-thinking-set="{{$.ThinkingSet}}" data-thinking-words="{{$.ThinkingWords}}" data-cursor="{{$thread.Cursor}}" data-elapsed="{{copy "chat.elapsed"}}" data-thinking="{{copy "chat.activity.thinking"}}" data-ask-format="{{copy "work.ask.target"}}" data-ask-placeholder="{{copy "work.ask.placeholder"}}" data-name-engineering="{{copy "work.specialist.engineering"}}" data-name-review="{{copy "work.specialist.review"}}">
<h2>{{copy "work.thread"}}</h2>
<template equipo-own-template><li equipo-message="own" data-message=""><div equipo-message-meta><strong equipo-visually-hidden>{{$.Address}}</strong><time></time></div><div equipo-bubble><p equipo-message-body></p></div></li></template>
<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"}}<span data-who></span></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>
diff --git a/internal/equipo/thinking_words.go b/internal/equipo/thinking_words.go
new file mode 100644
index 00000000..cf40b6bf
--- /dev/null
+++ b/internal/equipo/thinking_words.go
@@ -0,0 +1,76 @@
+package equipo
+
+import (
+ "context"
+ "encoding/json"
+ "net/http"
+ "strconv"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Thinking words: the person picks the words the thinking line shows
+// (Paul: "fun 'Thinking' variants... start with a more professional
+// one... and 'Random'"). The phrases are copy (copy.go, "thinking.*");
+// the line keeps the real activity as its label and tooltip.
+
+// thinkingFor is the person's set and every set's phrases as JSON, for
+// chat-stream.js: {"set": {"situation": ["phrase", ...]}}.
+func (a *application) thinkingFor(ctx context.Context, address string) (string, string) {
+ words, err := a.store.Chat().Thinking(ctx, address)
+ if err != nil {
+ return wire.DefaultThinking, "{}"
+ }
+ return words.Set, thinkingJSON(words.Sets)
+}
+
+func thinkingJSON(sets []wire.ThinkingSet) string {
+ out := map[string]map[string][]string{}
+ for _, s := range sets {
+ out[s.ID] = s.Phrases
+ }
+ raw, _ := json.Marshal(out)
+ return string(raw)
+}
+
+// thinkingView is the Thinking words page.
+type thinkingView struct {
+ wire.ThinkingWords
+ JSON string
+ Saved bool
+}
+
+// thinkingPage is GET /settings/thinking: the sets, a live preview, and
+// the person's choice.
+func (a *application) thinkingPage(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Cache-Control", "no-store")
+ ctx, address, ok := sessionContext(r)
+ if !ok {
+ a.failure(w, r, ErrForbidden)
+ return
+ }
+ words, err := a.store.Chat().Thinking(ctx, address)
+ if err != nil {
+ a.failure(w, r, chatError(err))
+ return
+ }
+ data, err := a.page(r, "thinking")
+ if err != nil {
+ a.failure(w, r, err)
+ return
+ }
+ data.Title = "thinking.title"
+ data.Thinking = thinkingView{ThinkingWords: words, JSON: thinkingJSON(words.Sets), Saved: r.URL.Query().Get("saved") == "1"}
+ render(w, "thinking_words", data)
+}
+
+// thinkingSave is POST /settings/thinking: the same SetThinking a device
+// makes, as the session's person.
+func (a *application) thinkingSave(w http.ResponseWriter, r *http.Request) {
+ revision, _ := strconv.ParseInt(r.PostFormValue("revision"), 10, 64)
+ set := r.PostFormValue("set")
+ a.chatActionTo(w, r, "/settings/thinking?saved=1", func(ctx context.Context, address string) error {
+ _, err := a.store.Chat().SetThinking(ctx, address, wire.ThinkingChoice{Set: set, Revision: revision})
+ return err
+ })
+}
diff --git a/internal/equipo/work_pages.go b/internal/equipo/work_pages.go
index e0833d91..5cb909ba 100644
--- a/internal/equipo/work_pages.go
+++ b/internal/equipo/work_pages.go
@@ -459,6 +459,7 @@ func (a *application) workTask(w http.ResponseWriter, r *http.Request) bool {
v.Summary, v.Timeline = summaryOf(t, v), timelineOf(t, v)
data.Thin.Task, data.Title, data.RequestID = v, "nav.tasks", rand.Text()
data.Thin.Thread, data.ChatStream = threadOf(t, address, cursor), true
+ data.ThinkingSet, data.ThinkingWords = a.thinkingFor(ctx, address)
render(w, "work_task", data)
return true
}
diff --git a/internal/headless/connections_test.go b/internal/headless/connections_test.go
index e0bbabcd..ca38d769 100644
--- a/internal/headless/connections_test.go
+++ b/internal/headless/connections_test.go
@@ -116,6 +116,7 @@ func TestHeadlessConnections(t *testing.T) {
{"C5_engineering_waits", connEngineeringWaits},
{"C5_review_auth", connReviewAuth},
{"P1_preference", connPreference},
+ {"C5_review_other_family_first", connReviewOtherFamilyFirst},
{"C6_no_connection", connNoConnection},
} {
t.Run(sc.name, func(t *testing.T) {
@@ -425,6 +426,40 @@ func connReviewOnCodex(t *testing.T, env *Env, inst *thintest.Instance, r *local
}
}
+// Astra round 2: Engineering on Claude-A, with Claude-B and Codex-C
+// healthy and Claude preferred: Review goes to Codex-C, the other family,
+// before preference and headroom are looked at.
+func connReviewOtherFamilyFirst(t *testing.T, env *Env, inst *thintest.Instance, r *localRunner) {
+ r.addAccount(t, "claude", "claude-2", "claude-b@example.com")
+ r.addAccount(t, "codex", "codex-1", second)
+ r.start(t)
+ s := open(t, env)
+ s.keep()
+ if _, err := env.Client.SetPreferences(s.ctx, wire.Preferences{Provider: "claude"}); err != nil {
+ t.Fatal(err)
+ }
+ time.Sleep(2 * time.Second)
+ text := "tool:record_task:oficina/sample|Fix the README typo|teh\ntool:start_task:$task|Fix it. edit:README.md|teh panes|the panes"
+ sent := s.send(t, text)
+ id := s.taskOf(t, sent.Turn.ID)
+ var eng, review wire.Step
+ s.wait(t, "review done", 5*time.Minute, func(c *thintest.Conversation) bool {
+ for _, st := range c.Tasks[id].Steps {
+ switch {
+ case st.Specialist == wire.SpecialistEngineering:
+ eng = c.Steps[st.ID]
+ case st.Specialist == wire.SpecialistReview && wire.StepTerminal(c.Steps[st.ID].State):
+ review = c.Steps[st.ID]
+ return true
+ }
+ }
+ return false
+ })
+ if eng.Account != "claude-1" || review.State != wire.StepDone || review.Account != "codex-1" || review.ReviewLabel != wire.ReviewOtherFamily {
+ t.Fatalf("engineering on %s, review %+v", eng.Account, review)
+ }
+}
+
// stepUsage is a step's usage rows as attempt/outcome/connection.
func stepUsage(t *testing.T, inst *thintest.Instance, step string) string {
t.Helper()
diff --git a/internal/headless/merge_test.go b/internal/headless/merge_test.go
index 83757688..0ea87596 100644
--- a/internal/headless/merge_test.go
+++ b/internal/headless/merge_test.go
@@ -193,8 +193,11 @@ func scenarioRebase(t *testing.T, env *Env) {
gitRun(t, work+"/w", "commit", "-q", "-m", "main moves")
gitRun(t, work+"/w", "push", "-q", "origin", "main")
moved := forgeHead(t, bare, "main")
+ // Ready to merge says Needs you "merge" for a moment before Equipo's
+ // merge step starts: only Done or a real decision ends the wait.
s.wait(t, "merged after the rebase", 3*time.Minute, func(c *thintest.Conversation) bool {
- return c.Tasks[id].Stage == wire.StageDone || c.Tasks[id].NeedsYou != ""
+ k := c.Tasks[id]
+ return k.Stage == wire.StageDone || k.NeedsYou != "" && k.NeedsYou != wire.NeedsMerge
})
k, _ := env.Client.Task(s.ctx, id)
var kinds []string
diff --git a/internal/plan3test/person_api_contract_test.go b/internal/plan3test/person_api_contract_test.go
index 95069a0f..dba69e4f 100644
--- a/internal/plan3test/person_api_contract_test.go
+++ b/internal/plan3test/person_api_contract_test.go
@@ -56,7 +56,7 @@ func personAPIContractCoverage(t *testing.T) {
f := newFixture(t)
registered := map[string]bool{}
// Thin v1 conversation routes are contracted by internal/wire fixtures.
- thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/uncombine": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true, "POST /connections": true, "POST /connections/{id}/cancel": true, "POST /connections/{id}/forget": true, "GET /connections/preference": true, "PUT /connections/preference": true}
+ thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/uncombine": true, "GET /thinking": true, "PUT /thinking": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true, "POST /connections": true, "POST /connections/{id}/cancel": true, "POST /connections/{id}/forget": true, "GET /connections/preference": true, "PUT /connections/preference": true}
must(t, chi.Walk(f.Store.PersonAPIHandler().(chi.Routes), func(method, path string, _ http.Handler, _ ...func(http.Handler) http.Handler) error {
if thin[method+" "+path] {
return nil
diff --git a/internal/runner/thin/connector.go b/internal/runner/thin/connector.go
index 499f4fca..1c6ef8f7 100644
--- a/internal/runner/thin/connector.go
+++ b/internal/runner/thin/connector.go
@@ -64,6 +64,9 @@ type Connector struct {
type cleanup struct {
connection, person, local string
report bool
+ // home and provider: the signed-in home the sign-out deletes, kept in
+ // the record from before the binding goes until the home is gone.
+ home, provider string
}
func (c *Connector) background(f func()) {
@@ -88,7 +91,7 @@ func owe(t *sql.Tx, k cleanup) error {
// signed out is marked removed so its local id, reused later, is never
// signed out again.
func (c *Connector) settle(k cleanup) {
- if !c.remove(k.connection, k.person, k.local, k.report) {
+ if !c.remove(k) {
return
}
_, err := c.State.db.Exec("DELETE FROM connect_cleanups WHERE connection=?", k.connection)
@@ -133,14 +136,14 @@ func (c *Connector) Start(ctx context.Context) error {
if _, err = c.State.db.ExecContext(ctx, "INSERT INTO connect_cleanups(connection, person, local_id, report, created_at) SELECT id, person, local_id, 0, ? FROM connect_attempts WHERE state='done' AND cancelled=1 AND local_id<>'' ON CONFLICT(connection) DO NOTHING", now()); err != nil {
return err
}
- rows, err = c.State.db.QueryContext(ctx, "SELECT connection, person, local_id, report FROM connect_cleanups ORDER BY created_at")
+ rows, err = c.State.db.QueryContext(ctx, "SELECT connection, person, local_id, report, home, provider FROM connect_cleanups ORDER BY created_at")
if err != nil {
return err
}
var owed []cleanup
for rows.Next() {
var k cleanup
- if err = rows.Scan(&k.connection, &k.person, &k.local, &k.report); err != nil {
+ if err = rows.Scan(&k.connection, &k.person, &k.local, &k.report, &k.home, &k.provider); err != nil {
rows.Close()
return err
}
@@ -248,48 +251,70 @@ func (c *Connector) Disconnect(ctx context.Context, frameID string, cmd wire.Dis
return nil
}
-// remove signs one of the person's connections out: the harness's own
-// logout in its home (best effort), the binding dropped, the home
-// deleted, its state forgotten; then signed_out is reported. false: the
-// binding could not be dropped, and the cleanup is owed still.
-func (c *Connector) remove(connection, person, local string, report bool) bool {
+// remove signs one of the person's connections out: the home is recorded
+// in the cleanup first; then the harness's own logout in it (tried
+// twice), the binding dropped, the home deleted, its state forgotten;
+// then signed_out is reported. A cleanup replayed after a stop finds the
+// home in its record when the binding has gone already. false: something
+// is left (the binding, or the home), and the cleanup is owed still;
+// success is never reported while the home exists.
+func (c *Connector) remove(k cleanup) bool {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
- b, ok := c.Conns.Binding(local)
- if !ok || b.PersonID != person {
- if report {
- c.report(wire.ConnectionReport{Connection: connection, Person: person, LocalID: local, State: wire.ConnSignedOut})
+ b, bound := c.Conns.Binding(k.local)
+ bound = bound && b.PersonID == k.person
+ if bound {
+ k.home, k.provider = b.ProviderHome, b.Provider
+ if _, err := c.State.db.ExecContext(ctx, "UPDATE connect_cleanups SET home=?, provider=? WHERE connection=?", k.home, k.provider, k.connection); err != nil {
+ c.log("disconnect record", err)
+ return false
}
- return true
}
- if lock, err := os.Open(b.ProviderHome); err == nil {
- if unix.Flock(int(lock.Fd()), unix.LOCK_EX) == nil {
- c.logout(ctx, b)
+ if k.home != "" && exists(k.home) {
+ if lock, err := os.Open(k.home); err == nil {
+ if unix.Flock(int(lock.Fd()), unix.LOCK_EX) == nil {
+ if err := c.logout(ctx, k.provider, k.home); err != nil {
+ c.log("disconnect logout", c.logout(ctx, k.provider, k.home))
+ }
+ }
+ lock.Close()
+ }
+ }
+ if bound {
+ if _, err := runnersetup.RemoveAccountBinding(ctx, c.Runner.AccountBindingsPath, b.ID); err != nil {
+ c.log("disconnect binding", err)
+ return false
}
- lock.Close()
+ c.Conns.Forget(b.ID)
+ c.Conns.changed()
}
- if _, err := runnersetup.RemoveAccountBinding(ctx, c.Runner.AccountBindingsPath, b.ID); err != nil {
- c.log("disconnect binding", err)
- return false
+ if k.home != "" {
+ c.removeHome(k.home)
+ if exists(k.home) {
+ c.log("disconnect home", errors.New("the home is still there"))
+ return false
+ }
}
- c.removeHome(b.ProviderHome)
- c.Conns.Forget(b.ID)
- c.Conns.changed()
- if report {
- c.report(wire.ConnectionReport{Connection: connection, Person: person, LocalID: local, Provider: b.Provider, State: wire.ConnSignedOut})
+ if k.report {
+ c.report(wire.ConnectionReport{Connection: k.connection, Person: k.person, LocalID: k.local, Provider: k.provider, State: wire.ConnSignedOut})
}
return true
}
+func exists(path string) bool {
+ _, err := os.Lstat(path)
+ return err == nil
+}
+
// logout runs the provider's own sign-out in the home.
-func (c *Connector) logout(ctx context.Context, b runner.AccountBinding) {
+func (c *Connector) logout(ctx context.Context, provider_, home string) error {
binary, args := c.Runner.ClaudePath, []string{"auth", "logout"}
- if b.Provider == wire.ProviderCodex {
+ if provider_ == wire.ProviderCodex {
binary, args = c.Runner.CodexPath, []string{"logout"}
}
cmd := exec.CommandContext(ctx, binary, args...)
- cmd.Dir, cmd.Env = b.ProviderHome, provider.LoginEnvironment(b.Provider, b.ProviderHome)
- c.log("disconnect logout", cmd.Run())
+ cmd.Dir, cmd.Env = home, provider.LoginEnvironment(provider_, home)
+ return cmd.Run()
}
// report sends progress on an attempt (durable).
@@ -447,7 +472,10 @@ func (c *Connector) standOrGo(cmd wire.ConnectCommand, id string, lock *os.File)
var cancelled int
_ = c.State.db.QueryRow("SELECT cancelled FROM connect_attempts WHERE id=?", cmd.Connection).Scan(&cancelled)
if cancelled == 1 {
- c.settle(cleanup{connection: cmd.Connection, person: cmd.Person, local: id})
+ k := cleanup{connection: cmd.Connection, person: cmd.Person, local: id}
+ err := c.State.tx(context.Background(), func(t *sql.Tx) error { return owe(t, k) })
+ c.log("disconnect record", err)
+ c.settle(k)
}
}
diff --git a/internal/runner/thin/connector_test.go b/internal/runner/thin/connector_test.go
index 9cc65b0e..768ccff2 100644
--- a/internal/runner/thin/connector_test.go
+++ b/internal/runner/thin/connector_test.go
@@ -2,6 +2,7 @@ package thin
import (
"context"
+ "database/sql"
"encoding/json"
"os"
"path/filepath"
@@ -191,3 +192,49 @@ func TestConnectorLateCancelLetsGoOfTheLock(t *testing.T) {
t.Fatal("the cancelled connection stood")
}
}
+
+// Astra round 2: a stop after the binding went and before the home did
+// leaves the home in the cleanup's record; the restarted connector
+// deletes it and only then reports signed_out.
+func TestConnectorSignOutFinishesTheHomeAfterACrash(t *testing.T) {
+ r := newConnectorRig(t)
+ if err := r.state.tx(context.Background(), func(tx *sql.Tx) error {
+ return owe(tx, cleanup{connection: "cn_5", person: connPerson, local: "codex-1", report: true})
+ }); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := r.state.db.Exec("UPDATE connect_cleanups SET home=?, provider='codex' WHERE connection='cn_5'", r.home); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(r.bindings, []byte("[]"), 0600); err != nil {
+ t.Fatal(err)
+ }
+ r.connector(false)
+ if _, err := os.Stat(r.home); !os.IsNotExist(err) || r.signedOut() != 1 {
+ t.Fatalf("home left %v, %d signed_out reports", err, r.signedOut())
+ }
+}
+
+// Round 2: a home that cannot be deleted is never reported signed out;
+// the cleanup stays owed and finishes once it can.
+func TestConnectorNeverReportsSignedOutWhileTheHomeExists(t *testing.T) {
+ r := newConnectorRig(t)
+ c := r.connector(true)
+ if err := c.Disconnect(context.Background(), "f6", wire.DisconnectCommand{Connection: "cn_6", Person: connPerson, LocalID: "codex-1"}); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.Chmod(r.root, 0500); err != nil {
+ t.Fatal(err)
+ }
+ r.connector(false)
+ if err := os.Chmod(r.root, 0700); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := os.Stat(r.home); err != nil || r.signedOut() != 0 {
+ t.Fatalf("home %v, %d signed_out reports while it exists", err, r.signedOut())
+ }
+ r.connector(false)
+ if _, err := os.Stat(r.home); !os.IsNotExist(err) || r.signedOut() != 1 || r.bound() {
+ t.Fatalf("home %v, %d reports, bound %v", err, r.signedOut(), r.bound())
+ }
+}
diff --git a/internal/runner/thin/judge.go b/internal/runner/thin/judge.go
index 0466e514..46e64994 100644
--- a/internal/runner/thin/judge.go
+++ b/internal/runner/thin/judge.go
@@ -649,14 +649,27 @@ func (e *Engineer) reviewOn(ctx context.Context, person, avoid string) (runner.A
engineer = b
}
}
- b, _, err := e.Conns.Choose(ctx, person, connect.RoleReview, "", []string{engineer.ID})
- if err != nil {
- if b, _, err = e.Conns.Choose(ctx, person, connect.RoleReview, "", nil); err != nil {
- return b, "", err
+ // The family first: only when no connection of another family can
+ // review does the choice (preference, headroom, order) look at the
+ // engineer's family, then at its own account.
+ var same []string
+ for _, c := range e.Conns.Mine(person) {
+ if c.Family == engineer.Family {
+ same = append(same, c.ID)
}
}
+ b, _, err := e.Conns.Choose(ctx, person, connect.RoleReview, "", same)
+ if errors.Is(err, ErrNoConnection) {
+ b, _, err = e.Conns.Choose(ctx, person, connect.RoleReview, "", []string{engineer.ID})
+ }
+ if errors.Is(err, ErrNoConnection) {
+ b, _, err = e.Conns.Choose(ctx, person, connect.RoleReview, "", nil)
+ }
+ if err != nil {
+ return b, "", err
+ }
switch {
- case b.Provider != engineer.Provider:
+ case b.Family != engineer.Family:
return b, wire.ReviewOtherFamily, nil
case b.AccountID != engineer.AccountID:
return b, wire.ReviewSameFamily, nil
diff --git a/internal/runner/thin/state.go b/internal/runner/thin/state.go
index b978e92a..93b749c9 100644
--- a/internal/runner/thin/state.go
+++ b/internal/runner/thin/state.go
@@ -93,6 +93,14 @@ func OpenState(ctx context.Context, dir string) (*State, error) {
d.Close()
return nil, err
}
+ // Added in Connections slice 1 review round 2: the home a sign-out
+ // still has to delete, and its provider, kept until it is gone.
+ for _, col := range []string{"home", "provider"} {
+ if _, err = d.ExecContext(ctx, "ALTER TABLE connect_cleanups ADD COLUMN "+col+" TEXT NOT NULL DEFAULT ''"); err != nil && !strings.Contains(err.Error(), "duplicate column") {
+ d.Close()
+ return nil, err
+ }
+ }
s := &State{db: d}
if s.prefix, err = s.meta(ctx, "frame_prefix"); err != nil {
d.Close()
diff --git a/internal/thintest/connections_contract_test.go b/internal/thintest/connections_contract_test.go
index 65463d34..0ee3baec 100644
--- a/internal/thintest/connections_contract_test.go
+++ b/internal/thintest/connections_contract_test.go
@@ -222,7 +222,7 @@ func TestContractWritesReplayAcrossAttempts(t *testing.T) {
r := newToolRig(t)
before := r.call("s1", wire.ToolStatus, map[string]string{})
added := r.call("a1", wire.ToolAddProject, map[string]string{"repo": "oficina/sample"})
- recorded := r.call("r1", wire.ToolRecordTask, map[string]string{"repo": "oficina/sample", "title": "Fix the typo", "brief": "teh"})
+ recorded := r.call("r1", wire.ToolRecordTask, map[string]string{"repo": "oficina/sample", "title": "Fix the README typo", "brief": "The README has teh"})
var rec struct{ Task string }
json.Unmarshal([]byte(recorded.Text), &rec)
asked := r.call("q1", wire.ToolAskPerson, map[string]any{"question": "Which colour?", "options": []string{"Red", "Blue"}})
@@ -252,7 +252,7 @@ func TestContractWritesReplayAcrossAttempts(t *testing.T) {
}
for name, call := range map[string]func() wire.ToolResult{
"record_task reworded": func() wire.ToolResult {
- return r.call("r2", wire.ToolRecordTask, map[string]string{"repo": "oficina/sample", "title": "Correct the README misspelling", "brief": "The README says teh."})
+ return r.call("r2", wire.ToolRecordTask, map[string]string{"repo": "oficina/sample", "title": "Fix the README typo", "brief": "The README says teh."})
},
"ask_person paraphrased": func() wire.ToolResult {
return r.call("q2", wire.ToolAskPerson, map[string]any{"question": "What colour would you like?", "options": []string{"Blue", "Red", "Green"}})
@@ -357,3 +357,42 @@ func TestContractRecordTaskMapsBackAcrossAttempts(t *testing.T) {
t.Fatalf("attempt 2 mapped B to %s and A to %s (want %s, %s)", b2.Text, a2.Text, b.Text, a.Text)
}
}
+
+// Astra round 2: never by order alone. Attempt 1 records A; attempt 2
+// asks for an unrelated B before repeating A: B is made, A's repeat maps
+// to A. A call that reads like two earlier tasks is refused with both,
+// so the model names the one it means.
+func TestContractRecordTaskNeverByOrder(t *testing.T) {
+ r := newToolRig(t)
+ r.call("a1", wire.ToolAddProject, map[string]string{"repo": "oficina/sample"})
+ aArgs := map[string]string{"repo": "oficina/sample", "title": "Fix the README typo", "brief": "The README says teh panes."}
+ a := r.call("r1", wire.ToolRecordTask, aArgs)
+ a2 := r.call("r2", wire.ToolRecordTask, map[string]any{"repo": "oficina/sample", "title": "Fix the README typo in the install section", "brief": "The install section of the README says teh too.", "separate": true})
+ if a.IsError || a2.IsError || a2.Replayed {
+ t.Fatalf("attempt 1 %+v %+v", a, a2)
+ }
+ r.runner.Send(r.ctx, "r-wait", wire.FrameTurn, wire.TurnReport{TurnID: r.turn, Attempt: 1, State: wire.TurnWaiting, Reason: "limited"})
+ r.runner.Send(r.ctx, "r-run2", wire.FrameTurn, wire.TurnReport{TurnID: r.turn, Attempt: 2, State: wire.TurnRunning})
+ r.wait("attempt 2", func(c *Conversation) bool { return c.Turns[r.turn].Attempt == 2 })
+ r.attempt = 2
+ b := r.call("r3", wire.ToolRecordTask, map[string]string{"repo": "oficina/sample", "title": "Add a dark theme toggle", "brief": "Settings needs a switch for the dark theme."})
+ if b.IsError || b.Replayed || b.Code != "recorded" {
+ t.Fatalf("the unrelated task was not made: %+v", b)
+ }
+ again := r.call("r4", wire.ToolRecordTask, aArgs)
+ if !again.Replayed || again.Text != a.Text {
+ t.Fatalf("A's repeat mapped to %s, want %s", again.Text, a.Text)
+ }
+ both := r.call("r5", wire.ToolRecordTask, map[string]string{"repo": "oficina/sample", "title": "Fix the README typo (teh)", "brief": "The README says teh in two places."})
+ var listed struct {
+ Earlier []struct{ Task string }
+ }
+ json.Unmarshal([]byte(both.Text), &listed)
+ if !both.IsError || both.Code != "ambiguous" || len(listed.Earlier) != 2 {
+ t.Fatalf("an ambiguous call was not refused with both: %+v", both)
+ }
+ tasks, _ := r.client.Tasks(r.ctx)
+ if len(tasks.Items) != 3 {
+ t.Fatalf("%d tasks, want A, A2 and B", len(tasks.Items))
+ }
+}
diff --git a/internal/thintest/thinking_browser_test.go b/internal/thintest/thinking_browser_test.go
new file mode 100644
index 00000000..4ad2f348
--- /dev/null
+++ b/internal/thintest/thinking_browser_test.go
@@ -0,0 +1,83 @@
+//go:build browser
+
+package thintest
+
+import (
+ "encoding/json"
+ "fmt"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// TestBrowserThinkingWords: the Thinking words page previews the chosen
+// set on the Stardust line, at 1280 and 390; a set chosen elsewhere
+// reaches an open conversation's thinking line with no reload, while the
+// line's label and tooltip stay the plain activity; Random takes one of
+// the sets for the turn.
+func TestBrowserThinkingWords(t *testing.T) {
+ r := newToolRig(t)
+ words, err := r.client.Thinking(r.ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ phrases := map[string]map[string][]string{}
+ for _, s := range words.Sets {
+ phrases[s.ID] = s.Phrases
+ }
+ in := func(set, sit string) string {
+ raw, _ := json.Marshal(phrases[set][sit])
+ return string(raw)
+ }
+ anyOf := func(set string) string {
+ var all []string
+ for _, l := range phrases[set] {
+ all = append(all, l...)
+ }
+ raw, _ := json.Marshal(all)
+ return string(raw)
+ }
+ for _, size := range []struct {
+ w, h int64
+ touch bool
+ }{{1280, 900, false}, {390, 844, true}} {
+ p := openInner(t, r.inst.URL, r.inst.Cookie(), size.w, size.h, size.touch, "light", "no-preference")
+ p.open("/settings/thinking")
+ preview := `document.querySelector('[data-preview-phrase]').textContent`
+ p.wait(anyOf("professional")+`.includes(`+preview+`)`, "the preview shows Professional")
+ p.check(`(()=>{document.querySelector('[data-set="pirate"] label').click();return document.querySelector('input[value="pirate"]').checked})()`, "pick Pirate adventure")
+ p.wait(anyOf("pirate")+`.includes(`+preview+`)`, "the preview shows Pirate adventure at once")
+ p.check(`document.querySelector('[data-preview-line]').dataset.set==='pirate'`, "preview set")
+ p.shot(fmt.Sprintf("ux1-thinking-words-%d", size.w))
+ p.stayed("preview")
+ p.stop()
+ }
+
+ // The conversation follows a choice made elsewhere, from the next phrase.
+ p := openInner(t, r.inst.URL, r.inst.Cookie(), 1280, 900, false, "light", "no-preference")
+ defer p.stop()
+ p.open("/conversation")
+ line := `document.querySelector('[equipo-thinking][data-turn="` + r.turn + `"]')`
+ phrase := line + `?.querySelector('[equipo-phrase] [data-in]')?.textContent`
+ p.wait(in("professional", "think")+`.includes(`+phrase+`)`, "Professional while thinking")
+ cur, _ := r.client.Thinking(r.ctx)
+ if _, err := r.client.SetThinking(r.ctx, "galaxy", cur.Revision); err != nil {
+ t.Fatal(err)
+ }
+ p.wait(`document.querySelector('[data-chat-stream]').dataset.thinkingSet==='galaxy'`, "the choice reached the page")
+ if err := r.runner.Send(r.ctx, "act-read", wire.FrameActivity, wire.ActivityReport{TurnID: r.turn, Attempt: 1, Kind: wire.ActivityTool, Tool: wire.ToolReadFile}); err != nil {
+ t.Fatal(err)
+ }
+ p.wait(in("galaxy", "read")+`.includes(`+phrase+`)`, "Galaxy far away while reading")
+ p.check(line+`.querySelector('[equipo-activity]').textContent==='Reading the code…' && `+line+`.querySelector('[equipo-activity-line]').title==='Reading the code…'`, "the plain activity is not the label and tooltip")
+ cur, _ = r.client.Thinking(r.ctx)
+ if _, err := r.client.SetThinking(r.ctx, "random", cur.Revision); err != nil {
+ t.Fatal(err)
+ }
+ p.wait(`document.querySelector('[data-chat-stream]').dataset.thinkingSet==='random'`, "Random reached the page")
+ if err := r.runner.Send(r.ctx, "act-search", wire.FrameActivity, wire.ActivityReport{TurnID: r.turn, Attempt: 1, Kind: wire.ActivityTool, Tool: wire.ToolSearchCode}); err != nil {
+ t.Fatal(err)
+ }
+ p.wait(`(()=>{const l=`+line+`;const s=l?.dataset.thinkingWords;const all={professional:`+in("professional", "search")+`,playful:`+in("playful", "search")+`,galaxy:`+in("galaxy", "search")+`,bridge:`+in("bridge", "search")+`,pirate:`+in("pirate", "search")+`,terminal:`+in("terminal", "search")+`};return !!s && s!=='random' && (all[s]||[]).includes(`+phrase+`)})()`, "Random took one set for the turn")
+ p.stayed("conversation")
+}
diff --git a/internal/thintest/thinking_contract_test.go b/internal/thintest/thinking_contract_test.go
new file mode 100644
index 00000000..6527a97d
--- /dev/null
+++ b/internal/thintest/thinking_contract_test.go
@@ -0,0 +1,90 @@
+package thintest
+
+import (
+ "context"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Thinking is GET /api/v1/thinking.
+func (c *Client) Thinking(ctx context.Context) (out wire.ThinkingWords, err error) {
+ return out, c.do(ctx, "GET", "/api/v1/thinking", nil, &out)
+}
+
+// SetThinking is PUT /api/v1/thinking.
+func (c *Client) SetThinking(ctx context.Context, set string, revision int64) (out wire.ThinkingWords, err error) {
+ return out, c.do(ctx, "PUT", "/api/v1/thinking", wire.ThinkingChoice{Set: set, Revision: revision}, &out)
+}
+
+// TestContractThinkingWords: each person picks the words the thinking line
+// shows (Paul: "fun 'Thinking' variants... start with a more professional
+// one... and 'Random'... 'Delcambring' should be one"). Professional
+// until they pick; every set but Random has phrases for every situation;
+// a change against an old revision is refused; the person's open pages
+// hear of it; another person's choice is their own.
+func TestContractThinkingWords(t *testing.T) {
+ r := newToolRig(t)
+ ctx := r.ctx
+ got, err := r.client.Thinking(ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ shape(t, "api/thinking.json", got)
+ if got.Set != wire.DefaultThinking || got.Revision != 0 || len(got.Sets) != len(wire.ThinkingSets) {
+ t.Fatalf("default: %s r%d, %d sets", got.Set, got.Revision, len(got.Sets))
+ }
+ all := ""
+ for _, s := range got.Sets {
+ if s.Name == "" || s.Description == "" {
+ t.Fatalf("set %s has no name or description", s.ID)
+ }
+ if s.ID == wire.ThinkingRandom {
+ continue
+ }
+ n := 0
+ for _, sit := range wire.ThinkingSituations {
+ if len(s.Phrases[sit]) == 0 {
+ t.Fatalf("set %s has nothing for %s", s.ID, sit)
+ }
+ n += len(s.Phrases[sit])
+ for _, p := range s.Phrases[sit] {
+ all += p + "\n"
+ if strings.ContainsRune(p, '—') || strings.Contains(p, "!") {
+ t.Fatalf("%s: %q", s.ID, p)
+ }
+ }
+ }
+ if n < 12 || n > 20 {
+ t.Fatalf("set %s has %d phrases", s.ID, n)
+ }
+ }
+ if strings.Count(all, "Delcambring…") < 2 {
+ t.Fatal("Delcambring is missing from Playful or Terminal")
+ }
+ set, err := r.client.SetThinking(ctx, "pirate", 0)
+ if err != nil || set.Set != "pirate" || set.Revision == 0 {
+ t.Fatalf("set: %+v %v", set, err)
+ }
+ if _, err := r.client.SetThinking(ctx, "galaxy", 0); Status(err) != 409 {
+ t.Fatalf("stale revision: %v", err)
+ }
+ if _, err := r.client.SetThinking(ctx, "jedi", set.Revision); err == nil {
+ t.Fatal("an unknown set was accepted")
+ }
+ events, err := r.inst.Store.Chat().Events(ctx, Owner, 0, 1000)
+ if err != nil {
+ t.Fatal(err)
+ }
+ heard := false
+ for _, e := range events {
+ heard = heard || e.Type == wire.EventThinking && e.ID == Owner
+ }
+ if !heard {
+ t.Fatal("no thinking event for the person")
+ }
+ if again, _ := r.client.Thinking(ctx); again.Set != "pirate" {
+ t.Fatalf("read back %s", again.Set)
+ }
+}
diff --git a/internal/wire/thinking.go b/internal/wire/thinking.go
new file mode 100644
index 00000000..90bb13c3
--- /dev/null
+++ b/internal/wire/thinking.go
@@ -0,0 +1,49 @@
+package wire
+
+// Thinking words: the phrases the thinking line shows while a turn runs,
+// in a set each person picks (GET and PUT /api/v1/thinking). The words
+// only flavour what is happening; the line's accessible label and its
+// tooltip stay the plain activity. Sets and situations are fixed here;
+// their names and phrases are the instance's copy.
+
+// ThinkingSets are the sets, the default first; ThinkingRandom picks one
+// of the others for each turn.
+var ThinkingSets = []string{"professional", "playful", "galaxy", "bridge", "pirate", "terminal", ThinkingRandom}
+
+// DefaultThinking and ThinkingRandom are set ids.
+const (
+ DefaultThinking = "professional"
+ ThinkingRandom = "random"
+)
+
+// ThinkingSituations are what a turn can be doing: thinking, reading,
+// searching, writing a note, handing work to Engineering, or any other
+// tool.
+var ThinkingSituations = []string{"think", "read", "search", "note", "handoff", "tool"}
+
+// ThinkingSet is one set: its name, a line about it, and its phrases by
+// situation (empty for Random).
+type ThinkingSet struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Phrases map[string][]string `json:"phrases"`
+}
+
+// ThinkingWords is GET /api/v1/thinking: the person's set and every set.
+type ThinkingWords struct {
+ Set string `json:"set"`
+ Revision int64 `json:"revision"`
+ Sets []ThinkingSet `json:"sets"`
+}
+
+// ThinkingChoice is the body of PUT /api/v1/thinking, and the data of
+// the thinking event: the set, against the revision the person saw.
+type ThinkingChoice struct {
+ Set string `json:"set"`
+ Revision int64 `json:"revision"`
+}
+
+// EventThinking fires to the person when their set changes, so an open
+// conversation uses it from the next turn.
+const EventThinking = "thinking"
diff --git a/internal/wire/wiretest/fixtures.go b/internal/wire/wiretest/fixtures.go
index 12d84182..5e63c2a2 100644
--- a/internal/wire/wiretest/fixtures.go
+++ b/internal/wire/wiretest/fixtures.go
@@ -55,8 +55,12 @@ func APIType(name string) any {
return &wire.CancelAccepted{}
case "error-conflict.json":
return &wire.Error{}
- case "event-delta.json", "event-turn.json", "event-runner.json", "event-card.json", "event-project.json", "event-activity.json", "event-coordinator.json", "event-task.json", "event-step.json", "event-question.json", "event-connection.json", "event-step-activity.json", "event-preference.json":
+ case "event-thinking.json", "event-delta.json", "event-turn.json", "event-runner.json", "event-card.json", "event-project.json", "event-activity.json", "event-coordinator.json", "event-task.json", "event-step.json", "event-question.json", "event-connection.json", "event-step-activity.json", "event-preference.json":
return &wire.Event{}
+ case "thinking.json":
+ return &wire.ThinkingWords{}
+ case "thinking-request.json":
+ return &wire.ThinkingChoice{}
case "project.json":
return &wire.Project{}
case "projects.json":
diff --git a/internal/wire/wiretest/testdata/api/event-thinking.json b/internal/wire/wiretest/testdata/api/event-thinking.json
new file mode 100644
index 00000000..cb128af5
--- /dev/null
+++ b/internal/wire/wiretest/testdata/api/event-thinking.json
@@ -0,0 +1 @@
+{"cursor":51,"type":"thinking","resource":"thinking","id":"owner@example.com","revision":3,"data":{"set":"pirate","revision":3}}
diff --git a/internal/wire/wiretest/testdata/api/thinking-request.json b/internal/wire/wiretest/testdata/api/thinking-request.json
new file mode 100644
index 00000000..ad29f377
--- /dev/null
+++ b/internal/wire/wiretest/testdata/api/thinking-request.json
@@ -0,0 +1 @@
+{"set":"pirate","revision":2}
diff --git a/internal/wire/wiretest/testdata/api/thinking.json b/internal/wire/wiretest/testdata/api/thinking.json
new file mode 100644
index 00000000..6a1a5ac1
--- /dev/null
+++ b/internal/wire/wiretest/testdata/api/thinking.json
@@ -0,0 +1 @@
+{"set":"playful","revision":2,"sets":[{"id":"professional","name":"Professional","description":"Calm and plain: says what Equipo is doing.","phrases":{"handoff":["Handing it to Engineering…","Briefing Engineering…"],"note":["Taking notes…","Writing it down…"],"read":["Reading the code…","Looking through the files…"],"search":["Searching the code…","Looking for it…"],"think":["Thinking…","Considering it…","Working it out…"],"tool":["Working…","Checking the task…","Getting things ready…"]}},{"id":"playful","name":"Playful","description":"Whimsical made-up words while it works.","phrases":{"handoff":["Passing the baton…","Rallying Engineering…"],"note":["Scribbling…","Jotting…"],"read":["Perusing…","Rummaging through the files…","Skimming with intent…"],"search":["Sleuthing…","Ferreting about…"],"think":["Delcambring…","Percolating…","Noodling…","Cogitating…","Mulling it over…"],"tool":["Tinkering…","Fiddling with knobs…","Wrangling…"]}},{"id":"galaxy","name":"Galaxy far away","description":"Space opera: deflectors, hyperdrives and ancient archives.","phrases":{"handoff":["Sending it to the hangar crew…","Briefing the squadron…"],"note":["Encoding the plans…","Recording a message for the council…"],"read":["Consulting the archives…","Decoding the transmission…"],"search":["Searching the star charts…","Scanning the far systems…"],"think":["Meditating on it…","Trusting my instincts…","Plotting a course past the asteroids…"],"tool":["Recalibrating the deflectors…","Patching the hyperdrive…","Bypassing the compressor…"]}},{"id":"bridge","name":"Starship bridge","description":"On the bridge: scans, logs and the engine room.","phrases":{"handoff":["Paging the engine room…","Sending it down to engineering…"],"note":["Making a log entry…","Noting it in the duty log…"],"read":["Reviewing the ship's logs…","Accessing the library computer…"],"search":["Running a long-range scan…","Sweeping the sector…"],"think":["Running a level-one diagnostic…","Consulting the ship's computer…","Considering all options…"],"tool":["Rerouting auxiliary power…","Realigning the sensor array…","Reversing the polarity…"]}},{"id":"pirate","name":"Pirate adventure","description":"Treasure maps, swordplay and a talkative parrot.","phrases":{"handoff":["Rousing the crew…","Sending it below decks…"],"note":["Scrawling in the logbook…","Adding to the ship's manifest…"],"read":["Studying an old treasure map…","Reading the captain's log…"],"search":["Digging where the X is…","Searching the hold…"],"think":["Practising insult swordfighting…","Consulting the parrot…","Pondering the map…"],"tool":["Hoisting the mainsail…","Swabbing the deck…","Bribing the grog machine…"]}},{"id":"terminal","name":"Terminal","description":"A coding agent at the prompt.","phrases":{"handoff":["Dispatching to Engineering…"],"note":["Appending notes…","Writing to scratch…"],"read":["Reading files…","Loading context…"],"search":["Grepping…","Globbing…"],"think":["Delcambring…","Thinking…","Pondering…","Ruminating…"],"tool":["Running tools…","Compiling…","Spinning up…"]}},{"id":"random","name":"Random","description":"A different set for each turn.","phrases":{}}]}