Conversation
Settings becomes a focused page like Workspaces' SettingsFrame: "← Inbox", a section nav (General, Agents, Devices, Archived, Storage, About) and one section per page at #settings/<section>. The Inbox sidebar slides away while Settings is open and comes back on leaving, without writing its cookie. On a phone, #settings is a list of the sections and a section opens with "‹ Settings". Pair a phone always starts at step 1, "How will your phone reach this computer?", with This Wi-Fi and Tailscale side by side: live checks of this computer (advisory only), what the phone needs, and each way's switch. The only gate on the code is a way switched on (the owner's no-loop rule): with a way on and every check failing, Continue still shows the code. Step 2 shows what reached the door while the code showed, and a troubleshooting list when it expires with nothing seen; step 3 says Paired. Server: GET /api/inbox/pairing/checks (read only, probes as seams) and GET /api/inbox/pairing (the last offer's state and attempts, never its secret or code), both phones-only, local-only, refused to other sites; POST /api/inbox/pairing adds `reachable`. Design of record: .product/approved/inbox-settings-tabs/ (approved 2026-10-12).
…ew fixes - Step 1's checks run every probe as a child process through Bun.spawn with its own time limit, side by side, so a slow tailscale never holds the Inbox's event loop. One read in flight is shared and kept 3 s; ?fresh=1 (Check again, after a switch) skips the kept answer; a switch drops it. - tailscale status runs with --peers=false: no other device is read. - A missing tailscale command reads "isn't on PATH" with the install line (cli_missing), a timeout "didn't answer in time" (no_answer). - The firewall line names the macOS application firewall; elsewhere nothing. - Continue to the code and New code make one code per press (a ref guard). - A code another window replaced reads as replaced, not as this tab's expiry or attempts (the GET's expires_at compared with the tab's own). - "Over Wi-Fi the phone pairs by scanning only" only when the code carries a Wi-Fi address. - Phone: back on the list of sections, focus is on the row just left. - About's MCP command is shell-quoted (shellLine). - Tests assert data and state instead of explanatory text; the two action labels are pinned on purpose, with a comment.
…ections # Conflicts: # AGENTS.md # tests/e2e/playwright.config.ts
|
Review fixes in 8c53833 (then 2224ab6 merges origin/main: AGENTS.md and playwright.config.ts conflicted with #1880; both sides kept).
Tests on 2224ab6:
|
… deadline runQuietly starts each probe in a process group of its own; at its limit it kills the whole group, lets the pipes go and settles at once. The Mac app's /usr/local/bin/tailscale is a shell wrapper that runs the app binary without exec, so its child kept the pipes open and the read never settled. The whole read of the checks also has a deadline (15 s; a probe past it reads as not answering), and a read in flight is never joined past it, so a hung read can never stay the shared one. cli_missing names the Tailscale app's Install CLI.
|
094e09b fixes the re-review: runQuietly now starts each probe in a process group of its own. At the time limit it kills the whole group, destroys the pipes and settles at once; it no longer awaits the pipes or the exit. readPairingChecks has a 15 s deadline over the whole read (a probe past it reads as no_answer, or null / unknown for the Wi-Fi name and firewall), and a read in flight is never joined past that deadline. New tests: a shell wrapper whose backgrounded child keeps the pipes open, with a 500 ms limit, returns ETIMEDOUT in under 2 s and leaves no child process behind. With the process-group kill disabled, that test fails. A second test shows a runner that never answers ends at the deadline, and Check again starts a new read instead of joining the hung one. The cli_missing fix now names the Tailscale app's Settings → Install CLI. Tests on 094e09b: bun test packages/inbox packages/server plus the real-Inbox scan, 1493 pass with one failure: an auto-update.test.ts SIGINT test timed out at 30 s under the full run, and that file passes 42/42 on its own (this PR does not touch it). DOM_TESTS packages/inbox/: 226 pass. Typecheck clean. Playwright inbox-settings + inbox-phones on a fresh binary: 7 pass. No force push. Not merged. |
# Conflicts: # tests/e2e/playwright.config.ts
…ain when the section opens
…ttings → Agents (#1889) * Inbox: plannotator inbox connects the agents on this computer; uninstall removes what it added A person's plannotator inbox (never --background, the shim or a connection's start) adds a plannotator-inbox MCP server to every terminal agent it finds that has no record yet: through the agent's own mcp add (Codex, Gemini CLI, Windsurf/Devin, Amp, Cline, Pi without the extension), else one key in a strictly parsed plain-JSON file (Cursor, Kiro, the Claude desktop app). Pi and OpenCode with Plannotator's extension or plugin get inboxTool on. Claude Code gets nothing. An Inbox an agent started is asked over the new token-guarded /api/inbox/control/connect. Later runs connect agents installed since and say so once; a recorded agent (turned off, removed outside, a foreign entry) is never added back; another plannotator-inbox entry is never replaced. PLANNOTATOR_INBOX_CONNECT=0 skips it. plannotator uninstall (plain and --purge) removes the entries it added, by record then by scanning the known files; --dry-run lists them. Tests use fake agent CLIs on a scratch PATH and HOME; the preload and every CLI test sandbox set PLANNOTATOR_INBOX_CONNECT=0, and the guard test now fails on a path from the real home to an agent folder or a connect without an agent environment. * Inbox: a one-line reminder at session start, and Claude Code's Inbox tool before the first run - inboxReminder (config.json, a boolean or one per host; on by default wherever the session has plannotator_inbox): resolveInboxReminder / configuredInboxReminder in packages/shared/config.ts, mirrored by the mod's resolveInboxReminderEnabled. No env var of its own: the tool switch gates it. - INBOX_REMINDER_TEXT (and INBOX_REMINDER_TEXT_NO_WAKE for OpenCode 1) in the connection contract. - Claude Code mod: a prompt.context block (plannotatorInbox) once per conversation, only with the tool and the switch on. - Claude Code mod: plannotator_inbox is registered before the Inbox ever ran, from a bundled tool list (inbox-default-tools.ts, generated by scripts/sync-mod-inbox-tools.ts and pinned to a real Inbox's /mcp). The link stays silent (no HTTP, no files) until a call starts the Inbox. - Pi: a hidden before_agent_start message (plannotator-inbox-reminder) on the session's first prompt, not repeated after /reload or /resume, re-delivered only after a compaction that summarized it away; the Ask-this-session bridge never reads it as a take-over. - OpenCode 2: a composed system line on requests that offer the tool (primary agents, not title requests); OpenCode 1: the no-wake line in experimental.chat.system.transform. * wip: notes and agents settings model * Inbox: agent notes, Settings → Agents routes, plannotator inbox --notes * Inbox: install prompt and --help offer the note; scratch home in the help test * Inbox: the first-open agents card (what plannotator inbox connected, the one-time note question) * Inbox: Settings → Agents block (reach, reminder, note per agent) * Inbox: e2e for the agents card on the compiled binary * Docs: the note, the card and Settings → Agents * Inbox: Settings → Agents classes of their own (ib-arow and ib-dot were taken) * e2e: the theme wait has its own short limit * Tests: the uninstall lines name the path with the platform's separator * Tests: the note line names the path with the platform's separator * Inbox reminder on OpenCode 2: gate on the Inbox connection, not on the lazy tool transform registerInboxOpenCode2 reports whether the host's tool draft took the tool, but OpenCode 2 applies a tool transform per request, so at plugin setup the answer is still false and the context hook was never registered. Gate on the connection being found; addInboxReminder already checks each request's own tool list, so the line still never names a tool the agent lacks. Proved on the real opencode2 2.0.19 (inbox-v2.test.ts, 5/5). * Inbox: Settings → Agents in the Agents section (after #1883); read again when the section opens * Inbox: drop the unused agents lock style; name the agents spec in the e2e config * Inbox reminder: review follow-ups - The reminder speaks only for an Inbox that has run here: the Claude Code mod still registers plannotator_inbox before the first run (bundled list), but adds the prompt.context block only when inbox/inbox.json existed at the first session.start. Pi and OpenCode already need the registry for the tool. - Claude Code names the tool by the full name $.tool.register returned (inboxReminderText), so tool search finds the deferred tool. Fixed per process. - OpenCode 2 without session.prompt (tool registered wakes:false) gets the wait_for_reply wording (openCode2InboxReminder). - OpenCode 1: the line is its own system part (never merged into the host's parts), and only for an agent that has the tool: not a subagent, not an agent whose tools switch plannotator_inbox off (wildcards too). - Docs: no "Settings writes inboxReminder" claim yet; OpenCode's line is on every request; Claude Code's tool needs no first run. - Tests: engine harness for no registry (tool, no reminder), -p (none), a refused tool.register (none), the full name; OpenCode 1 agent gating and part layout; OpenCode 2 no-wake wording. * Inbox agents: review fixes (version checks, TOML, lossless JSON, exact ownership, said-once failures) - Pi before 0.99 (no pi mcp) and any CLI whose --version line is not its own (cln's pi, amp.rs, another codex) are left to the person; Cline is not run. - Codex's config.toml is read with Bun.TOML.parse (every form); GEMINI_CLI_HOME and a relative CODEX_HOME are honored; an entry Plannotator did not write is never replaced. - JSON edits are lossless (json-edit.ts): only the one member's text changes, BOM, dominant line ending, numbers and escapes stay; duplicate keys refused. - Ours = this CLI's command or the recorded one; the plannotator heuristic is exact-name only. Uninstall removes only entries recorded as added (or, with no record, ones running exactly the binary being removed). - Copy no longer promises Settings; a lasting failure is said once. - OpenCode 2 plugins in { package } form are found. - Agent CLIs run in their own process group, killed on timeout; a grandchild holding stdout does not hold the run. Docs and the Devin snippet path. * Inbox notes, card and Settings → Agents: review fixes - Records hold the resolved path (a symlinked ~/.claude), so off and uninstall delete the file the note created; the uninstall scan resolves stale records too. - Notes edit the file's own text: dominant line ending for new lines, BOM kept, no rewrite when unchanged; one file shared by two agents holds one section owned by both. - Uninstall names a damaged section it left; with agent-notes.json lost it still deletes Claude Code's own rules file. - Card ticks follow the model until touched, defaulting per DESIGN Q2; Try again clears the failure (setInboxAgentReach) or shows the server's error; Not now is ignored during Add. - Settings keeps the Inbox tool switch for Claude Code, Pi and OpenCode in reach when not found; second clicks while saving are ignored; OpenCode says no file yet. - --notes and the card refuse agents not found here and leave the question open when every add failed. PLANNOTATOR_INBOX_NOTES=0 implemented. - The agents model runs no agent CLI (version probe only before a write); a test Inbox without its own agent environment gets an empty scratch one; the tailnet refuses every agents route (tested). * OpenCode 1 Inbox reminder: end of the last system part (#1114), a failed lookup keeps the session's answer * OpenCode 2 Inbox wake: a stop signal for the wakes; test the draft without add and stop the wake after each test * AGENTS.md: the reminder switch is in Settings → Agents * Inbox connect: the terminal says once why an agent needs connecting by hand * Inbox connect: say a time limit as it was (1.5 s, not 2 s) * Inbox uninstall: with no record, an entry that runs this binary is named, never removed; docs say what the terminal prints * Inbox connect: Codex CLI before 0.35 and Gemini CLI before 0.1.19 have no mcp add, so they are left to the person * Inbox Settings: a note cannot be added for an agent not found here (as the card and --notes) * Inbox notes: with PLANNOTATOR_INBOX_NOTES=0 a note already written is still listed in Settings so it can be turned off * Inbox notes: removal gives back a mostly-CRLF file that ends in a lone LF byte for byte * Inbox notes (Codex): Off removes the note from the recorded file and the file the agent reads now; the status shows a note left in the older file * Inbox notes and JSON entries: add then remove gives the file back byte for byte (no final newline, empty files, LF and CRLF) * Inbox notes: a whitespace-only file without a final line break gets the start marker on its own line, and comes back byte for byte
Builds the approved design inbox-settings-tabs (design of record
.product/approved/inbox-settings-tabs/:approval.md,DESIGN.md,prototype.html,shots/; approved 2026-10-12 by the owner, Inbox thread "Design: Settings sections and phone pairing").What changes
Settings in sections (decision 1). A focused page like Workspaces' SettingsFrame: "← Inbox" on top, a 184 px section nav (General, Agents, Devices, Archived, Storage, About), one section per page at
#settings/<section>.#settingsis General;#settings/devices/pairopens Pair a phone; an unknown section reads as#settings, so old links still land. The nav is a list of links witharia-current; a section change moves focus to itsh1and is a history entry (Back and Forward walk sections; "← Inbox" returns to where the person was). The Inbox sidebar slides away while Settings is open and comes back on leaving, without writing its cookie (⌘B there opens it for that visit only). Nav badges: the Archived count, a dot on About while an update shows, a warning dot on Devices while a way is on and not working. On a phone: a list of the six sections with a value each, then one section with "‹ Settings" (the browser's Back when opened from the list).Every control from today's single page is in the section
DESIGN.md§1 puts it in. General: Theme, Desktop notifications, the sound. Agents: today's two blocks, unchanged (the Agents design ships separately). Devices: phones, "How your phone reaches this computer" (This Wi-Fi, Tailscale, renamed from "Reach from my tailnet"), and Over your tailnet with the difference written out (decision 2). Archived: #1874's block (merged; placed here). Storage. About: version, Check now, Update now while an update shows, the two update switches, and "Where things are".Pair a phone, step by step. Always starts at step 1, "How will your phone reach this computer?" (decision 3), with the two ways side by side: live checks of this computer with a one-line fix each, what the phone needs, and each way's switch. When a way is already on, its card says so and Continue to the code is the primary button. Step 2: the QR, the six digits only while Tailscale is on, the addresses with Change, "Before you scan", the countdown, and live notes on what reached the door (wrong digits with tries left, digits typed over Wi-Fi, an older code, a phone after expiry). On expiry with nothing seen, a numbered troubleshooting list. Step 3: Paired, then Done. The relay "not available yet" line is there. The tailnet's device list is never read (decision 4).
The no-loop rule (decision 5): the checks are advisory and never a gate. Turn on stays offered next to Check again whatever a check says. The only gate on the code is a way switched on (
canShowCodeinpackages/inbox/pairing.ts). Proved bysettingsSections.test.tsx(DOM: every check failing, a way on, Continue shows the code),pairing.test.ts, andinbox-phones.spec.tson the compiled binary.Server (additive, phones-only, local-only):
GET /api/inbox/pairing/checks: read only (packages/server/inbox-pairing-checks.ts). Every probe is a seam (pairingProbes, thetailscalerunner). It never runsopenssl(only looks it up on PATH).GET /api/inbox/pairing: the last offer's state andattempts(which listener, what happened), never its secret or code.POST /api/inbox/pairingaddsreachable.Both GETs answer
local_onlythrough the tailnet and403 cross_originto another site, and 404 with phones off (inbox-phones-gate.test.ts). The phone's door and wire are unchanged.inbox-mobile.md§1 notes the window's reads andreachable. The Settings, Phones and Inbox Server table parts of CLAUDE.md are updated.Deviations from the shots (stated)
aria-disabled, notdisabled. It looks dimmed as designed, but a press explains what to turn on instead of doing nothing. The label becomes "Continue to the code" once a way is on.ipconfig getsummary(macOS) oriwgetid(Linux). When the system hides it, the address alone shows, asDESIGN.md§4.2 anticipates.Tests
bun test packages/inbox packages/server tests/never-touch-the-real-inbox.test.ts: 1490 pass. This includes the newpackages/server/inbox-pairing.test.ts(13: checks via scripted probes andtailscale, every attempt kind and its listener, expiry, five wrong tries,reachable, the guards) andpackages/inbox/pairing.test.ts.DOM_TESTS=1 bun test --isolate packages/inbox/: 225 pass. This includes the newsettingsSections.test.tsx(added to the CI DOM list), which covers routing, the sidebar closed and restored without its cookie, every control in its section, the pairing steps, the no-loop rule, step 1 always first, phones off, and the phone's list.tests/helpers/inbox-dom-server.tsgains aphonesmode with Tailscale and the checks scripted frommachine.json.bun run typecheck: clean.inbox-settings.spec.ts(new). Desktop Chromium: the nav, keyboard and focus, Back and Forward, the sidebar away and back, ← Inbox. iPhone 15 WebKit: the list, ‹ Settings, and Pair a phone to the code.inbox-phones.spec.ts(rewritten for the flow, withtailscalea script on PATH viafake-tailscale.ts, so no spec runs the real one).inbox.spec.ts,notifications.spec.ts,inbox-sound.spec.ts,inbox-attachments.spec.ts,inbox-tailscale.spec.ts,inbox-archived.spec.ts,inbox-sidebar.spec.ts, plusinbox-mobile.spec.ts: all green (61 + 46 + 7).Screenshots of each section and pairing step, dark and light, desktop and phone:
/tmp/inbox-settings-sections/on the build machine, and.local/proof/settings/and.local/proof/phones/from the specs.