| 1 | # Connections slice 1 progress: several accounts, Codex, in-app sign-in |
| 2 | |
| 3 | Branch `thin-v1-conn1` from `thin-v1-slice4c` (2d1edaf), with |
| 4 | `design-connections` merged (28f8455, eaf2f38, then the accepted rev 3 |
| 5 | at 87684fd), the slice 4c fixes (aaf04aa) and staging's line |
| 6 | `thin-v1-ux1` (f2eac36: inner screens, slice 4c final cfae4f8). Spec: |
| 7 | `docs/superpowers/specs/2026-11-08-equipo-connections.md` rev 3, §8 |
| 8 | slice 1 (gates 1a to 1d), with Astra's round-1 and round-2 findings |
| 9 | (`~/.cache/tmp/equipo/connrev-final.md`, `connrev2-final.md`) and Paul's |
| 10 | rulings: Claude on |
| 11 | a remote runner finishes signing in on the runner (no paste through |
| 12 | Equipo, no token importer); Pi with OpenCode in reserve is a later |
| 13 | slice. Conventions as in `SLICE1-PROGRESS.md` to `SLICE4C-PROGRESS.md`. |
| 14 | |
| 15 | ## Done |
| 16 | |
| 17 | 1. Contracts (`internal/wire/connections.go`, `frames.go`, fixtures): |
| 18 | `Connection`, `ConnectionList`, `Connect`; frames `connect`, |
| 19 | `cancel_connect`, `disconnect` (instance to runner, durable), |
| 20 | `connection` and `usage` (runner to instance, durable); |
| 21 | `hello.connections` and `sync.connections` replace `accounts`; |
| 22 | `Reply.usage`, `StepReport.usage`, `AnswerReport.usage` are usage |
| 23 | rows; `Reply.switched`, `Step.switched`, `Message.switched`, |
| 24 | `Turn.connection`, `Snapshot.connections`; turn state `waiting` |
| 25 | (nonterminal; `wire.InFlight`); reasons `no_connection`, `limited`, |
| 26 | `connection_removed`; `ToolResult.replayed`; `wire.WriteTools`. |
| 27 | Guard: no connection type, frame or fixture has a secret-shaped field |
| 28 | (`TestConnectionTypesCarryNoSecrets`, `...FixturesCarryNoSecrets`). |
| 29 | |
| 30 | 2. Gate 1a, usage (`internal/runner/connect/usage.go`): one row per |
| 31 | attempt and model with outcome (`replied | failed | cancelled | |
| 32 | superseded`), `complete`, and nullable figures. Claude: the result's |
| 33 | `modelUsage` per model (reasoning null). Codex: `CodexTally` takes the |
| 34 | attempt's last `total` less the total seen before it began (the first |
| 35 | total after `thread/resume` is the baseline), drops other threads' |
| 36 | notices, so several notices and a resent one count once. The base is |
| 37 | verified only for a fresh thread or after this process saw the |
| 38 | previous turn's last total; a resumed thread's first turn is counted |
| 39 | from its own notices and recorded `complete: false` (the pinned |
| 40 | app-server has no read of a thread's token usage). Rows of |
| 41 | attempts that did not reply go in a `usage` frame. The instance keys |
| 42 | rows `(turn, step, attempt, connection, model)` (`chat_usage`, |
| 43 | migration 0049), so a resent frame is a no-op; raw rows kept 90 days. |
| 44 | `fakecodex` (`internal/fakecodex`) reproduces the pinned app-server: |
| 45 | initialize, account/read (refresh, revoked), config/read echoing the |
| 46 | `-c` session flags, device-code sign-in, rate limits with and without |
| 47 | windows, thread start and resume with a rollout, turns with deltas, |
| 48 | items, several cumulative usage notices and the resume replay, MCP |
| 49 | approvals by elicitation, `usageLimitExceeded`, interrupt. |
| 50 | |
| 51 | 3. Gate 1b, protocol and auth. Connections from the app |
| 52 | (`internal/runner/thin/connector.go`, `connect/login.go`): |
| 53 | - Codex by device code: the pinned app-server in a new dedicated home |
| 54 | asks for a code (`account/login/start {chatgptDeviceCode}`); the card |
| 55 | shows OpenAI's page and code; `account/login/completed` then |
| 56 | `account/read` and `account/rateLimits/read`; healthy with email, |
| 57 | plan and windows. Refused (device login not enabled): |
| 58 | `provider_refused`. The same account twice: `already_connected`. |
| 59 | - Claude at the runner's machine (`same_machine`): the unmodified |
| 60 | `claude auth login --claudeai` on a pty, with BROWSER set to a |
| 61 | recorder in scratch, so the runner learns the loopback authorize URL |
| 62 | the CLI would open (checked: Anthropic's host, redirect to |
| 63 | localhost); the person's browser on that machine finishes it; nothing |
| 64 | is written to the CLI. Verified against the real 2.1.312 binary |
| 65 | that BROWSER receives the loopback URL (`redirect_uri=http:// |
| 66 | localhost:<port>/callback`), while the printed URL is the paste flow. |
| 67 | - Claude elsewhere: the "Finish signing in on <runner>" card with |
| 68 | `equipo-runner login claude` and "I am at this machine"; the runner |
| 69 | watches the bindings and turns the card healthy when the terminal |
| 70 | login finishes. |
| 71 | - Cancel: recorded before the attempt saves, so it wins; a cancel that |
| 72 | arrives after a success signs that connection out on the runner. |
| 73 | - Sign out: `DELETE /api/v1/connections/{id}`, durable `disconnect`, |
| 74 | the provider's own logout, binding dropped |
| 75 | (`setup.RemoveAccountBinding`), home deleted, `signed_out` reported. |
| 76 | - Health: `Conns` (`thin/conns.go`) keeps state per connection in |
| 77 | thin.db: refreshed on first use and hourly with the CLI under the |
| 78 | source lock (Claude and Codex: thin v1's Codex refresh debt), limits |
| 79 | the providers reported, cool-off 15 min doubling to an hour when no |
| 80 | reset is reported. Only `healthy` connections are chosen. |
| 81 | - Failure kinds: Claude `rate_limit_event {rejected}` is quota (reset |
| 82 | only when reported), `api_retry {error: rate_limit}` running out is |
| 83 | quota without a reset, an assistant error `authentication_failed`, |
| 84 | `oauth_org_not_allowed`, `account_on_hold` or `billing_error` is auth |
| 85 | (sign_in_again, never limited); Codex `usageLimitExceeded` is quota, |
| 86 | `unauthorized` auth, anything else transient (no move). |
| 87 | - Instance (`chat/connections.go`): records from hello and sync (only |
| 88 | the runner's own person's), attempts, the API (`GET/POST |
| 89 | /api/v1/connections`, `GET /connections/{id}`, `POST |
| 90 | /connections/{id}/cancel`, `DELETE /connections/{id}`), events, |
| 91 | attempts expiring after 15 minutes with no progress. |
| 92 | |
| 93 | 4. Gate 1c, failover and continuity: |
| 94 | - `connect.Choose` is the one choice: capable, healthy (or limited |
| 95 | with its reset passed), not avoided; the current binding kept while |
| 96 | eligible (across a restart too: the connection that answered last); |
| 97 | else the most reported headroom, unknown after any figure; reasons |
| 98 | `only_option | headroom | failover`. It replaces `pickReviewer` and |
| 99 | the coordinator's first-binding choice. |
| 100 | - Coordinator (`thin/failover.go`): a quota or auth failure, then the |
| 101 | old attempt's exit proven by the containment, then durably in one |
| 102 | transaction: the attempt's usage, `turn{waiting, limited | |
| 103 | sign_in_again}`, the run's attempt advanced and `turn{running, n+1}`; |
| 104 | the new session on the next connection is fresh (notebook, house |
| 105 | rule, tail) and told what the turn already did. No eligible |
| 106 | connection: `turn{waiting, no_connection}`, the card, and the turn |
| 107 | goes on its own when one returns. A reply from another connection |
| 108 | than the last carries the switched line. Returning to a connection |
| 109 | starts afresh rather than resuming a session that missed turns. |
| 110 | - Exactly-once writes, the turn's mutation ledger (rev 3, §3 step 4): |
| 111 | the instance records each designated mutation (`wire.MutationKinds`: |
| 112 | add_project, create_project, set_project_home, record_task, |
| 113 | start_task, cancel_task, add_finding, ask_person) by kind and target |
| 114 | when it completes, and holds a later attempt of the turn to it |
| 115 | whatever the wording: one question card, the n-th record_task is the |
| 116 | n-th task the turn recorded, start and cancel once per task, a |
| 117 | project once per name, the home once per person, a finding once per |
| 118 | task and normalised text; the stored result answers, `replayed: |
| 119 | true`. Reads (status, read_task, find, ...) and write_note always run |
| 120 | fresh. On the runner, every write is recorded before and after it |
| 121 | runs (`thin/effects.go`): an exact repeat is answered from the |
| 122 | record, an unseen answer is reconciled under its earlier call id, |
| 123 | and the record gives the new attempt its summary of what was done. |
| 124 | - Engineering and Review: a quota or auth failure, termination proof, |
| 125 | then the attempt runs again on another connection from a fresh tree |
| 126 | (Engineering) or the same tree (Review); the step shows "Engineering, |
| 127 | attempt 1: done (Claude was limited)". No eligible connection: the |
| 128 | step waits deferred in the queue and goes on when one returns. |
| 129 | - Ask stays pinned to the step's own kept session and connection; a |
| 130 | limited or signed-out connection fails it `account_unavailable`. |
| 131 | - Codex coordinator (`thin/codex.go`): the pinned 0.165.0 app-server in |
| 132 | the converse containment (bubblewrap, egress relay to the provider, |
| 133 | credential home denied to tools, runtime copy), validated as the |
| 134 | certified launcher does (`codex.ValidateThinPolicy`, initialize at |
| 135 | /home/runner, account, config/read against the policy, thread |
| 136 | policy), tools through the MCP proxy after an elicitation approval |
| 137 | correlated with the started tool call (anything else refused), |
| 138 | rollout kept for resume. `codex.PolicyInputs` now renders `converse` |
| 139 | (the coordinator surface: no shell, no patch, no search, MCP limited |
| 140 | to the conversation's own tools) and `answer` (read-only git tools); |
| 141 | `inspect` already passed; the deny profile is unchanged |
| 142 | (`TestThinActionPolicies`). |
| 143 | |
| 144 | 5. Gate 1d, UI: the Connections page under the conversation (header |
| 145 | plug icon, and linked from Settings): each connection with its state |
| 146 | in words ("Limited until Tue 10:00 UTC", "Limited, no reset time |
| 147 | reported", "Needs signing in again", "Signed out"), Add Codex, Add |
| 148 | Claude, the device-code card, the sign-in link, the finish-on-runner |
| 149 | card, Cancel; scriptless (the page reloads every 3 s while connecting). |
| 150 | The chat: the switched line under a reply, the no_connection card with |
| 151 | Add a connection, no "Send your message again". Reset times are shown |
| 152 | in UTC until a person's zone is known. |
| 153 | |
| 154 | 6. Merged `thin-v1-ux1` (f2eac36): step activity beside the switched |
| 155 | line and usage on steps; migration 0049 after ux1's 0048; fixtures |
| 156 | regenerated; ux1's tests moved from accounts to connections. |
| 157 | |
| 158 | ## Tests |
| 159 | |
| 160 | - Unit: `connect` (choice table, cool-off, Claude and Codex limits, |
| 161 | failure classes, usage over the recorded probe and the resume case, |
| 162 | Claude rows); `codex` thin policies; wire guards. |
| 163 | - Contract (`internal/thintest/connections_contract_test.go`): hello and |
| 164 | attempts, duplicates, late frames, cancel, sign-out, the held turn and |
| 165 | the switch, usage rows; writes replayed across attempts. |
| 166 | - Contract `TestContractWritesReplayAcrossAttempts`: a reworded |
| 167 | record_task, a paraphrased question, a reworded start and the same |
| 168 | add_project in attempt 2 are folded (one task, one card, one step); |
| 169 | status after add_project is fresh; a further record_task records. |
| 170 | - Headless (`TestHeadlessConnections`, fake CLIs in real bubblewrap): |
| 171 | U1/U2 usage rows (replied, failed before a failover, cancelled); C1 |
| 172 | Claude to Claude failover; C2 Codex coordinator with tools, a task, |
| 173 | usage and a cold resume; C3 device code (also refused, already |
| 174 | connected) then failover to Codex; C4 Claude at the machine (loopback |
| 175 | callback) and by the terminal card; A5 cancel and sign-out; A6/A7 no |
| 176 | reset and auth; F2 a limit straight after five writes, the new attempt rewording each |
| 177 | (three folded by the instance's ledger, two exact repeats answered by |
| 178 | the runner's record) and F2b its status fresh; C5 Engineering |
| 179 | and Review moving connection; C6/F5/F7 waiting, cancel while waiting, |
| 180 | answered once Codex is added. |
| 181 | - Browser (`-tags browser`): A1, A4, F1, F7. |
| 182 | - Mutations, each observed failing a test: a secret-shaped field on a |
| 183 | connection frame (guard); both write guards removed (F2: two question |
| 184 | cards); the runner ledger removed (F2: record_task reached the instance |
| 185 | twice); the instance replay removed (contract: a second task); the |
| 186 | stickiness rule removed (choice table); the Codex baseline removed |
| 187 | (tally: the resumed turn counted the old total); failover without a |
| 188 | proven exit (C1: failed `limited`); the switched line dropped on settle |
| 189 | (browser F1, a real bug the test found); `enabled_tools` back to the old |
| 190 | coordinator tools (thin policy test). |
| 191 | |
| 192 | ## Decisions |
| 193 | |
| 194 | - In-app sign-in runs the provider's CLI unconfined in the new home, as |
| 195 | `equipo-runner login` and the account refresh already do (not in the |
| 196 | converse namespace the spec sketches); egress for the login is the |
| 197 | CLI's own. |
| 198 | - The coordinator and steps hold a turn or step on the runner rather |
| 199 | than ending it; "messages sent while it waits join the waiting turn" |
| 200 | is not built: a later message queues as its own turn behind it. |
| 201 | - The ledger's per-kind rules hold a later attempt to what earlier |
| 202 | attempts made; within one attempt only an exact repeat replays. Rev 3 |
| 203 | says "any later call in the same turn": applied within one attempt it |
| 204 | folded a second task the person asked for in the same message into the |
| 205 | first (the review contract tests record two tasks in one turn), so the |
| 206 | rules are applied across attempts only. Controller to confirm. |
| 207 | - Stickiness: the coordinator leaves its connection only on failure. |
| 208 | The rev 3 exception (return to a recovered preferred connection at a |
| 209 | natural boundary, the start of a new turn after the session's turn |
| 210 | ended with nothing queued, never mid-turn) has nothing to return to in |
| 211 | slice 1: preferences are slice 3. A reply from another connection than |
| 212 | the last always carries the switched line. |
| 213 | - The runner's own durable ledger gives the new attempt its summary of |
| 214 | done effects; there is no `tool_calls{turn}` request to the instance. |
| 215 | - Stickiness survives a restart through the last connection that |
| 216 | answered; returning to a connection starts a fresh session (the spec |
| 217 | says resume with a fresh notebook injection: fresh is simpler and the |
| 218 | notebook and tail carry the context). |
| 219 | - Staging: in-app connections live in the staging root's own |
| 220 | `accounts/` and survive a restage (`scripts/staging-thin.py`); the |
| 221 | suite person runs on the owner's in-app Codex account the way it runs |
| 222 | on claude-a. |
| 223 | |
| 224 | ## Staging |
| 225 | |
| 226 | Restaged b555d46 (CI green; built by `scripts/staging-thin.py build`, |
| 227 | deployed with `--swap hold` at 12:53:48, serving b555d46, both runner |
| 228 | units installed by 12:54:44; about a minute of skew, in which the old |
| 229 | runners' streams were refused the new frames). ux1's iOS fixes |
| 230 | (06c0217) are merged on the branch after it, not deployed. |
| 231 | |
| 232 | Live, the suite person, one message ("Reply with one short sentence: |
| 233 | which model family are you?") on claude-a (paul@tito.io), whose weekly |
| 234 | limit Paul hit today: the unmodified CLI refused with a rejected |
| 235 | rate_limit_event, reset 2026-11-10T21:00Z, window seven_day, no |
| 236 | utilization reported; the runner proved the attempt's exit, marked |
| 237 | claude-a limited until then, advanced the turn to attempt 2 and, with |
| 238 | no other connection, held it waiting no_connection (6.6 s after the |
| 239 | send). The chat page showed "Nothing can answer right now. Claude |
| 240 | resets Tue 21:00 UTC." with Add a connection, and no "Send your message |
| 241 | again". Cancelled while waiting: cancelled at attempt 2. |
| 242 | |
| 243 | Next, needing Paul: |
| 244 | 1. Paul enables device code login for Codex in ChatGPT's security |
| 245 | settings, opens the staging Connections page, taps Add Codex, and |
| 246 | enters the code at OpenAI's page. |
| 247 | 2. `scripts/staging-thin.py runner` again so the suite runner gets the |
| 248 | owner's in-app Codex binding. |
| 249 | 3. `EQUIPO_STAGING_CONN_WITNESS` (messages separated by `---`) with |
| 250 | `scripts/staging-thin.py suite conn1_witness`: with claude-a still |
| 251 | limited the first turn meets the real limit and moves to Codex. |
| 252 | |
| 253 | ## Live runs (budget: 6 coordinator turns, paul@tito.io homes only) |
| 254 | |
| 255 | Used: 1 coordinator turn (refused by the provider on quota before any |
| 256 | model output; the waiting turn was cancelled). |
| 257 | |
| 258 | ## Open issues |
| 259 | |
| 260 | - Version skew at deploy, as before: an old runner refuses the new |
| 261 | frames; install runners right after the instance. |
| 262 | - Preferences (spec F8, "switch back to the preferred connection") are |
| 263 | slice 3; without them stickiness keeps the session where it moved. |
| 264 | - A step waiting for a connection shows as queued, without the |
| 265 | no_connection reason on the task yet. |
| 266 | - The ask card does not yet show the reset time of its limited |
| 267 | connection. |
| 268 | - Reset times render in UTC. |
| 269 | - Codex `account/updated` to signed out is not read as an auth failure |
| 270 | during a turn (the hourly refresh catches it). |
| 271 | - A connection not yet checked is reported "healthy" in hello until its |
| 272 | first check (20 s after start, or on first use); a weekly limit shows |
| 273 | only once a turn meets it (the CLI's refresh does not report quota). |
| 274 | - CI flake seen once: `TestContractNoRetroactiveMerge` (4c) got a 401 on |
| 275 | an Answer; a rerun of the same commit was green. |
| 276 | |
| 277 | ## Round: Astra round 2 (on fa3860a), the final round (2026-11-08) |
| 278 | |
| 279 | Eight of nine resolved; the three open items, each with a test that |
| 280 | fails first and a mutation shown to fail it: |
| 281 | - Durable sign-out: the cleanup record keeps the home and provider from |
| 282 | before the binding goes until the home is deleted; logout is tried |
| 283 | twice; signed_out is reported only once the home is gone; a replay |
| 284 | after a stop between the binding and the home deletes the home |
| 285 | (TestConnectorSignOutFinishesTheHomeAfterACrash, |
| 286 | TestConnectorNeverReportsSignedOutWhileTheHomeExists). A late cancel |
| 287 | now owes its cleanup before it runs. |
| 288 | - record_task never maps by order: a later attempt's call is the earlier |
| 289 | task in the same project whose title or brief reads like it; like none, |
| 290 | it is new and made; like several, it is refused (code ambiguous) with |
| 291 | the earlier tasks listed, so the model names one or says separate |
| 292 | (TestContractRecordTaskNeverByOrder). separate: true skips matching. |
| 293 | - Review filters by family first: another family's healthy connection |
| 294 | is chosen before preference or headroom; the engineer's family, then |
| 295 | its own account, only when none can (C5_review_other_family_first). |
| 296 | |
| 297 | ## Round: Astra round 1 (on 7946111), the Connections page (2026-11-08) |
| 298 | |
| 299 | Astra's nine findings, each with a test that fails first or a mutation |
| 300 | shown to fail it: |
| 301 | 1. Ledger within an attempt: one question card per turn, the home and a |
| 302 | finding once per target, in any attempt; start, cancel and project |
| 303 | against earlier attempts (the tools refuse a second within one). |
| 304 | record_task within an attempt keeps its similar-task answer; across |
| 305 | attempts a call maps to the task it reads like (same arguments, then |
| 306 | title or brief, then order). Tests: TestContractWritesOncePerTurn |
| 307 | WithinAnAttempt, TestContractRecordTaskMapsBackAcrossAttempts. |
| 308 | 2. One ledger: the runner no longer answers exact repeats; every write |
| 309 | goes to the instance. F2 now counts five folded writes. |
| 310 | 3. Late cancel: the attempt lets go of the home lock before signing out |
| 311 | (TestConnectorLateCancelLetsGoOfTheLock, lock probe). |
| 312 | 4. Sign-out and a cancel that finds the connection saved are recorded in |
| 313 | the frame's transaction (connect_cleanups) and done at startup; an |
| 314 | attempt saved then cancelled is owed at startup; a done cleanup marks |
| 315 | the attempt removed so a reused local id is never signed out |
| 316 | (TestConnectorSignOutSurvivesACrash, TestConnectorCancelSurvivesACrash). |
| 317 | 5. Codex runs Engineering and Review (codexstep.go, by a delegated |
| 318 | agent, merged): C5_engineering_to_codex, C5_review_on_codex. |
| 319 | 6. A refused step attempt advances durably (advanceStep: usage for the |
| 320 | refused attempt, the instance takes attempt n+1); cancels and sync |
| 321 | follow the step to its later attempt. |
| 322 | 7. With nothing left the step waits (deferred) and resumes; Review fails |
| 323 | over on a refused credential and marks it sign_in_again |
| 324 | (C5_engineering_waits, C5_review_auth). |
| 325 | 8. Codex usage: never subtract an unverified base; a resumed thread sums |
| 326 | the turn's last figures, complete: false; complete only with a |
| 327 | verified base and the turn's completion seen; resent notices dropped. |
| 328 | 9. Cancelled and timed-out Codex turns keep their usage; answers carry |
| 329 | theirs (recorded for failed and cancelled answers too). |
| 330 | |
| 331 | Preference (the mockup's Prefer control): one per person, by provider |
| 332 | (Automatic, Claude, Codex), PUT/GET /api/v1/connections/preference |
| 333 | (/api/v1/preferences is the person's notes), a durable preference frame |
| 334 | to the runner, resent on hello; the choice moves the coordinator to it |
| 335 | at a turn's start, never over health (P1_preference). Per-role rows wait |
| 336 | for routing (slice 3). Kept in chat_settings: no migration (UX1 took |
| 337 | 0050 and 0051). |
| 338 | |
| 339 | The page to Paul's approved mockup: what is answering with Prefer, rows |
| 340 | (monogram, state in words with a dot, headroom only when reported, roles |
| 341 | with the live mark, tokens today, quiet actions on hover or behind ⋯), |
| 342 | Add a connection with its chooser (Claude and Codex; local models, |
| 343 | Mistral and TensorX greyed), the loading card, the three-step cards with |
| 344 | Copy, the success card and the row sliding in, Forget for a signed-out |
| 345 | record. Paul's row feedback: a row that needs the person gets one |
| 346 | secondary button (Sign in again, Connect again) at the end of the action |
| 347 | column, the usage under it, a tint and a hairline, full width under the |
| 348 | state line at 390. Stardust is shared (stardust.js, the calm look from |
| 349 | UX1); chat-stream.js reads it from there. "Healthy" reads "Ready". |
| 350 | Browser test: chooser, card at once, code once, Copy, approval with the |
| 351 | success card and no reload, Prefer, the Claude card, sign out and the |
| 352 | recovery button's place, at 390 and 1280; screenshots in |
| 353 | docs/mockups/built/2026-11-08/conn-*.png. |
| 354 | |
| 355 | ## Round: waiting turns, live Connections page (2026-11-08) |
| 356 | |
| 357 | - Waiting turns: a turn waiting with no_connection, and every turn queued |
| 358 | behind it, render no thinking line, sparkle or timer, live or after a |
| 359 | reload; each person's message gets a quiet "Waiting for a connection" |
| 360 | under it and one no_connection card stands after the last of them. |
| 361 | The thinking line comes back only when an attempt starts. |
| 362 | - Messages sent while waiting queue behind the waiting turn (no joining): |
| 363 | they keep their own turn, reply and receipt, and run in order once a |
| 364 | connection is usable. Chosen because joining would merge two person |
| 365 | turns into one reply and break exactly-once per turn. |
| 366 | - Waiting turns start on their own when a connection is added or a limit |
| 367 | resets; Recover no longer restarts a run whose last report was waiting |
| 368 | no_connection at the same attempt (test `TestRecoverKeepsWaitingTurns`, |
| 369 | mutation shown). |
| 370 | - No page refreshes: the meta refresh and every location.reload are gone |
| 371 | from the chat and Connections pages; both re-read the page in place |
| 372 | from their event stream. Without scripts, an open attempt shows a |
| 373 | "Check again" link only. |
| 374 | - Connections page: Add shows a loading card at once (rotating phrases, |
| 375 | still under reduced motion), then the three-step card. Codex: Open |
| 376 | OpenAI (new tab), the code once with Copy, approve then come back, a |
| 377 | living "Waiting for you to approve…" line, the device sign-in small |
| 378 | print, Cancel. Claude terminal: open a terminal on the runner, the |
| 379 | command with Copy, sign in in the browser it opens. Approval lands in |
| 380 | place with a short flourish and "Codex connected". Rows: provider mark, |
| 381 | account, state with a dot, usage today, Sign out under ⋯ (visual layout |
| 382 | waits for Fable's mockup). |
| 383 | - Logging: "kept sessions" logs only on change, or hourly. |
| 384 | - Browser tests: `TestBrowserWaitingTurns` (1280 and 390, after a reload: |
| 385 | zero thinking lines, one card, both turns answer in order once Codex is |
| 386 | added; mutation shown), `TestBrowserConnectionsAdd` (390 and 1280: card |
| 387 | at once, code once, Copy shows "Copied", approval with no reload or |
| 388 | navigation; mutation shown; Claude terminal card). Screenshots in |
| 389 | `docs/mockups/built/2026-11-08/conn-*.png` (EQUIPO_CONN_SHOTS=1). |
| 390 | - Fixed on the way: the Claude terminal card returned a 500 (template |
| 391 | read a field the line did not carry). |
| 392 | |
| 393 | ## Copy for review |
| 394 | |
| 395 | Accepted for now with the existing marker in `copy.go`: |
| 396 | - `chat.connections.title` "Connections", `.empty` "Nothing is |
| 397 | connected yet.", `.add_codex` "Add Codex", `.add_claude` "Add Claude", |
| 398 | `.same_machine` "I am at this machine", `.cancel` "Cancel", `.healthy` |
| 399 | "Healthy", `.limited` "Limited, no reset time reported", |
| 400 | `.limited_until` "Limited until %s", `.signed_out` "Signed out", |
| 401 | `.sign_in_again` "Needs signing in again", `.error` "Not working", |
| 402 | `.offline` "Your runner is offline. Start it to add a connection." |
| 403 | - Connect cards: `.title_codex` "Connect Codex", `.title_claude` "Connect |
| 404 | Claude", `.open_openai` "Open OpenAI", `.enter_code` "Enter this code:", |
| 405 | `.approve_back` "Approve, then come back. Equipo connects on its own.", |
| 406 | `.waiting_approve` "Waiting for you to approve…", `.device_off` "OpenAI |
| 407 | says device sign-in is off? Turn it on in ChatGPT, Settings, |
| 408 | Security.", `.copy` "Copy", `.copied` "Copied", `.open_terminal` "Open |
| 409 | a terminal on %s.", `.run` "Run:", `.browser_back` "Sign in in the |
| 410 | browser it opens, then come back.", `.waiting_sign_in` "Waiting for you |
| 411 | to sign in…", `.open_claude` "Open Claude", `.claude_back` "Sign in, |
| 412 | then come back. Equipo connects on its own.", `.connected` "%s |
| 413 | connected", `.check_again` "Check again" |
| 414 | - Loading phrases: `.loading_codex_1` "Knocking on OpenAI's door…", |
| 415 | `_2` "Asking for a pairing code…", `_3` "Warming up a fresh desk for |
| 416 | Codex…"; `.loading_claude_1` "Finding your runner…", `_2` "Warming up a |
| 417 | fresh desk for Claude…", `_3` "Starting Claude's own sign-in…" |
| 418 | - The page to the approved mockup: `.lede`, `.your_runner`, |
| 419 | `.answering.*` (on, while, rests, rests_until, too, back, connecting, |
| 420 | none, no_reset, needs_sign_in, kept, see), `.and`, `.prefer`, |
| 421 | `.prefer_auto`, `.prefer_hint_auto`, `.prefer_hint`, `.preferred`, |
| 422 | `.make_preferred`, `.group`, `.usage_resets`, `.serving`, `.roles.*` |
| 423 | (none, resting_moved, resting_none, sign_in_first), `.tokens_before`, |
| 424 | `.sign_in_again_action`, `.connect_again`, `.forget`, `.window_hours`, |
| 425 | `.window_week`, `.window_used`, `.resets`, `.add`, `.add_hint`, |
| 426 | `.chooser_lede`, `.claude_desc`, `.codex_desc`, `.soon`, `.local`, |
| 427 | `.local_desc`, `.mistral`, `.mistral_desc`, `.tensorx`, |
| 428 | `.tensorx_desc`, `.loading_sub`, `.codex_sub`, `.claude_sub`, |
| 429 | `.code_once`, `.codex_fine`, `.claude_fine`, `.same_machine_hint`, |
| 430 | `.waiting_runner`, `.connected_big`, `.connected_next`, `.empty_title`, |
| 431 | `.empty_body`, `.empty_fine`; `.healthy` now "Ready". All words as in |
| 432 | the mockup Paul approved. |
| 433 | - Rows: `.usage_today` "%s tokens today", `.sign_out` "Sign out", |
| 434 | `.more` "More"; conversation: `chat.waiting_connection` "Waiting for a |
| 435 | connection" |
| 436 | - Removed: `.device` "Go to %s and enter %s", `.sign_in_claude`, |
| 437 | `.finish_on`, `.finish_how`. `.connecting` "Connecting %s" stays in |
| 438 | copy but is no longer shown. |
| 439 | - `chat.connections.reason.timed_out` "The sign-in was not finished in |
| 440 | time.", `.cancelled` "Cancelled.", `.provider_refused` "The provider |
| 441 | did not complete the sign-in.", `.runner_offline` "Your runner went |
| 442 | offline during the sign-in.", `.identity_mismatch` "The sign-in did not |
| 443 | match an account.", `.already_connected` "That account is already |
| 444 | connected." |
| 445 | - `chat.switched` "Switched to %s", `chat.switched_reset` "Switched to |
| 446 | %s; %s resets %s", `chat.no_connection` "Nothing can answer right now. |
| 447 | %s", `.resets` "%s resets %s", `.limited` "%s is limited", |
| 448 | `.signed_out` "%s is signed out", `.none` "Nothing is connected.", |
| 449 | `.add` "Add a connection" |
| 450 | - `work.reason.limited` "its model account reached its limit", |
| 451 | `work.reason.no_connection` "nothing connected can run it", |
| 452 | `work.switched` "%s was limited" |
| 453 | - Changed: `chat.failed` "The coordinator could not answer this message." |
| 454 | (was "... Send your message again to retry.") |
| 455 | |
| 456 | ## Blockers |
| 457 | |
| 458 | None. |
| 459 | |