Public: anyone can read this; the crew can change it.

Talk: remove the captain; Talk opens on the conversation I was in #18288

opened this in answer to

Green, waits for a review (no review yet), 9h 3m

Talk now opens on the conversation you were last in, and the Captain is removed from Talk. Not verified: the full suite, and the browser test with a sign-out and sign-in. tsc is clean and the files I ran pass, but the first run of the broader batch hit the sandbox timeout and I didn't check its result.

Notes · 60 files · +430 −2964

opened this

Talk now opens on the conversation you were last in, and the Captain is removed from Talk. Not verified: the full suite, and the browser test with a sign-out and sign-in. tsc is clean and the files I ran pass, but the first run of the broader batch hit the sandbox timeout and I didn't check its result.

Opens where you were

  • A new conversation_last table (one row per person) records the conversation you open, and openConversation prefers it. A refresh, a new tab or a new session lands there, even if another thread was written to afterwards.
  • Archived conversations are skipped. With no conversation at all, Talk opens a new empty one with the box focused.
  • The terminal and the API use the same function, so they follow.
  • test/talk-opens-where-left.test.ts checks the empty case, three reloads after a newer write elsewhere, and the archived case. It would fail without the change.
  • It is an HTTP test, not a browser one. A new session stands in for sign-out and sign-in, since the table is keyed on the person, not the session.

What the Captain did, and where it went

  • Memory rules: kept, as an ordinary Settings › Memory page at /settings/memory. The old /settings/captain page and its terminal screen are gone and now answer 404. The terminal screen is now Memory, with add, edit and delete.
  • Check-in, friends watch and morning paper routines: dropped. They only posted into the Captain thread, which no longer exists.
  • Watches and the talk_watch tool: dropped, because they could only wake the agent in that thread. Their confirm and ask entries, the tests and docs/features/talk-captain.md went too.
  • Cost line: dropped with the Captain page and terminal screen it was shown on.
  • Public /edition page: removed. It only reported when the morning paper last ran, so it would have said "none printed" for good.
  • Opening /talk: it no longer lands on the Captain. Existing Captain threads stay as ordinary conversations you can archive. The talk_routine and talk_watch tables are left in place so no data is dropped.
  • Cleanup: the ops_log helpers that only the check-in used are deleted, and so is the brief line about Captain posts.

Left for you

  • v1-probe's default "schedules ran in 24 h" line now answers UNKNOWN, since /edition is gone. --edition <url> still works. I recorded this in docs/OPERATING.md and did not rework the probe.
  • The gate flagged rememberOpened and requireOwner as similar to existing functions. I did not merge them.

To try it, open /talk, switch to another conversation, reload, and Talk opens on that one. Open /settings/memory as the owner.

Docs: talk-memory.md is new, talk-conversation-list.md and talk-voice.md are updated.

Closes #18252

19 earlier comments · 1 event
commented

Talk now opens on the conversation you were last in, and the Captain is removed from Talk. Not verified: the full suite, and the browser test with a sign-out and sign-in. tsc is clean and the files I ran pass, but the first run of the broader batch hit the sandbox timeout and I didn't check its result.

Opens where you were

  • A new conversation_last table (one row per person) records the conversation you open, and openConversation prefers it. A refresh, a new tab or a new session lands there, even if another thread was written to afterwards.
  • Archived conversations are skipped. With no conversation at all, Talk opens a new empty one with the box focused.
  • The terminal and the API use the same function, so they follow.
  • test/talk-opens-where-left.test.ts checks the empty case, three reloads after a newer write elsewhere, and the archived case. It would fail without the change.
  • It is an HTTP test, not a browser one. A new session stands in for sign-out and sign-in, since the table is keyed on the person, not the session.

What the Captain did, and where it went

  • Memory rules: kept, as an ordinary Settings › Memory page at /settings/memory. The old /settings/captain page and its terminal screen are gone and now answer 404. The terminal screen is now Memory, with add, edit and delete.
  • Check-in, friends watch and morning paper routines: dropped. They only posted into the Captain thread, which no longer exists.
  • Watches and the talk_watch tool: dropped, because they could only wake the agent in that thread. Their confirm and ask entries, the tests and docs/features/talk-captain.md went too.
  • Cost line: dropped with the Captain page and terminal screen it was shown on.
  • Public /edition page: removed. It only reported when the morning paper last ran, so it would have said "none printed" for good.
  • Opening /talk: it no longer lands on the Captain. Existing Captain threads stay as ordinary conversations you can archive. The talk_routine and talk_watch tables are left in place so no data is dropped.
  • Cleanup: the ops_log helpers that only the check-in used are deleted, and so is the brief line about Captain posts.

Left for you

  • v1-probe's default "schedules ran in 24 h" line now answers UNKNOWN, since /edition is gone. --edition <url> still works. I recorded this in docs/OPERATING.md and did not rework the probe.
  • The gate flagged rememberOpened and requireOwner as similar to existing functions. I did not merge them.

To try it, open /talk, switch to another conversation, reload, and Talk opens on that one. Open /settings/memory as the owner.

Docs: talk-memory.md is new, talk-conversation-list.md and talk-voice.md are updated.

commented

<!-- look-pages f78b90db73c8 --> Look pages for f78b90d, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts, src/web/pages/talk.ts; a commit names /settings/memory
commented

I fixed the five failing checks and pushed. The five rule and scan test files now pass locally (77 pass, 0 fail) and tsc is clean. I did not run the full suite, so the forge's check on this push is the full run.

The Captain removal left tests that still expected it:

  • Routines service: test/boot-production.test.ts no longer expects routines among the services started on boot. test/timers-named.test.ts and test/job-slices.test.ts drop their routines entries, since src/crew/routines.ts is gone.
  • Unread tables: I added talk_routine and talk_watch to scripts/unread-tables-allow.json. The migrations that create them stay, so existing data is untouched and nothing reads those tables any more. Dropping them would be a separate change.
  • Design debt: bun scripts/design-lint.ts --update lowered the src/web/pages/memory.ts debt in docs/design/quiet-debt.json, because that page now has fewer violations.

The gate's --fix printed two similar-code notes: rememberOpened in src/core/conversations.ts and requireOwner in src/web/pages/memory.ts. I left both alone.

No page behaviour changed in this push, so there is no review block.

🤖 Generated with Claude Code

commented

<!-- look-pages 056da3cfd083 --> Look pages for 056da3c, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts, src/web/pages/talk.ts; a commit names /settings/memory
commented

No code change this round, so I pushed nothing. The four tests you listed pass on this branch: dead-code exports, during job timing, process-wide state, and the issue number. Every commit subject already ends in (#18252).

The look-pages gate line is a note, and a commit on this branch already satisfies it. That commit line is Looks: /settings/memory, which names a page in app.looks in forge.json.

The gate also names similar code in rememberOpened (src/core/conversations.ts) and requireOwner (src/web/pages/memory.ts). I left both alone. The duplicates it points at, notePasskeyUsed and requireAdmin, do different jobs.

commented

The "draws a private app for its owner" failure was a test problem, not a product bug, and I've fixed the test. I couldn't confirm the fix here, because this sandbox has no Chromium and those three frame tests skip. The other tests in that file pass, and tsc is clean.

Cause. /talk now opens the conversation the person last visited, which is what this issue asks for. The "public app" test opened /talk first, so the "private app" test then reopened that same conversation, which has no private-app pane. The page drew no frame and the test failed.

Fix. test/talk-preview-frame.test.ts now opens its own conversation by id (/talk/<id>) in all three frame tests. The product code is unchanged.

The other checks. scripts/gate.ts --explain passed every rule here, including both doors, dead exports, during timing and the issue number. --fix rewrapped nothing, so there was nothing extra to commit. It did note two similar-function hints: rememberOpened resembles notePasskeyUsed, and requireOwner resembles requireAdmin. I left both alone; they are different operations.

To try it: open /talk and send a message, go to another page, then come back to /talk. It should land on that conversation.

🤖 Generated with Claude Code

commented

I merged main into the branch and pushed it. The one conflict was src/generated/marks.ts, which is generated. I regenerated it with bun scripts/own-source.ts instead of merging it by hand. The type check is clean. The tests I ran all pass: own-source, timers-named, job-slices, unread-tables, boot-production, design-lint, unused-exports and talk-preview-frame. I did not run the whole suite, so the forge's check on this push does that.

The push was first rejected because the remote branch held a commit I didn't have: 0e801ca1b, which makes the Talk pane's frame test name its conversation. I merged it in, and talk-preview-frame passes with it.

The sandbox also logged two denied outbound connections to apps.test:42537 during the push. The push itself went through.

commented

<!-- look-pages b178b8f22bb1 --> Look pages for b178b8f, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts, src/web/pages/talk.ts; a commit names /settings/memory
commented

I changed no code this round. The gate's look-pages feedback only asks for a commit line naming the pages, so I added an empty commit with Looks: /settings/memory and Looks: /talk. Both pages are in app.looks in forge.json. /settings/memory is the one the gate named, and memory.ts, origins.ts and talk.ts are the pages this pull changes.

What I ran

  • bun scripts/gate.ts --explain and --fix: no failures. --fix rewrapped nothing, because the over-100-column comment lines it flags are left to the nightly rewrap on main.
  • bun x tsc --noEmit: clean.
  • 79 tests in 7 files covering Talk, conversations, the CLI, MCP and OpenAI Talk, and origin keys: all pass. scripts/fast.ts could not name tests (exit 2), because forge.json changed and the diff is not bounded, so I picked these myself.

What the gate noted but I left alone

  • The gate marks rememberOpened in src/core/conversations.ts as similar (0.84) to notePasskeyUsed in src/core/passkeys.ts.
  • It marks requireOwner in src/web/pages/memory.ts as similar (0.82) to requireAdmin in src/web/pages/packs-settings.ts.

Both are notes, not failures. Each pair does a different job, so I did not merge them in this pull.

Where the four named rules stand

  • Dead code: passes.
  • Process-wide state: passes.
  • Timed jobs: passes.
  • Name the issue: passes, and the new commit carries (#18252).

Try it Open /talk on the preview at https://lab--18288--forge-trevato-apps.open-platform.sh, then /settings/memory.

[
  {"go": "/talk", "look": "Talk opens on the conversation last visited; no Captain entry", "expect": "the last conversation is shown, and no Captain appears anywhere"},
  {"go": "/settings/memory", "look": "the memory settings page", "expect": "it renders for the owner, with no mention of the Captain"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages 451a752e5780 --> Look pages for 451a752, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts, src/web/pages/talk.ts; a commit names /settings/memory
commented

Nothing needed changing on this pull. The look-pages message is a gate note, not a failure, and the branch already meets what it asks.

  • Look pages: the note says the pull changes src/web/pages/memory.ts, origins.ts and talk.ts. It asks for a commit line Looks: <path> naming a page in app.looks. Commit 451a752 already carries Looks: /settings/memory and Looks: /talk. Both paths are in forge.json app.looks and looksAsOwner. The note's "a commit names /settings/memory" is the gate recording that match.
  • Recurring refusals: I ran the four tests behind the dead-code, duplicate-import and job-timing refusals (test/unused-exports.test.ts, test/dup-imports.test.ts, test/job-slices.test.ts, test/route-timing-coverage.test.ts). All 17 pass, and bun x tsc --noEmit is clean. The commit subject names the issue, "Direction: … (#18252)".
  • Other gate notes (left alone): the gate also flags rememberOpened and requireOwner as possible duplicates of notePasskeyUsed and requireAdmin. I did not merge them, because they are different concepts and this pull is not the place for that. The comment-width note is for the nightly rewrap on main.

I pushed nothing new.

commented

I merged main into the branch and pushed it (a57061e4f). The only conflict was in test/talk-preview-frame.test.ts.

In that file, this pull changed the talk helper so each test names its own conversation (/talk/<id>), because Talk now opens on the one last visited. main made the same helper wait until the forge's rendered page contains the pane's frame (the #18309 flake fix). I kept both: talk(as, id) polls /talk/<id> for the frame, then opens that same URL in the browser.

bun x tsc --noEmit is clean. test/talk-preview-frame.test.ts and test/palette-roster.test.ts give 22 passes, 3 skips and 0 failures. The three skips are the chromium frame tests, because this sandbox has no chromium that starts, so the merged helper has not been run in a browser here. The forge's check runs them.

commented

<!-- look-pages a57061e4f28d --> Look pages for a57061e, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts, src/web/pages/talk.ts; a commit names /settings/memory
commented

Nothing here asks for a change. This is the same look-pages note as before, now stamped for a57061e.

  • Look pages: the note is informational. The rule wants a commit line Looks: <path> naming a page in app.looks. Commit 451a752 on this branch already has Looks: /settings/memory and Looks: /talk, and both paths are in forge.json app.looks and looksAsOwner. The merge of main didn't change the pages, so the note is still satisfied.
  • Recurring refusals: the dead-code, duplicate-import and job-timing tests passed on this branch earlier, and the merge from main only touched test/talk-preview-frame.test.ts. The commit subject has the issue number: "Direction: … (#18252)".

I pushed nothing new.

commented

I merged main into the branch and pushed it. The merge conflicted only in src/generated/marks.ts.

I resolved it by regenerating the file with bun scripts/own-source.ts rather than merging by hand. git merged the other files that changed on both sides (src/http/lazy_lists.ts, src/http/marks/settings.json, src/http/settings_routes.ts) without conflict.

  • Run: bun x tsc --noEmit is clean, and test/own-source.test.ts passes, which is the test that fails when the generated file is stale.
  • Not run: the wider suite. scripts/fast.ts exited 2 ("forge.json changed; the diff is not bounded"), so it named no tests for me to run. The forge will run the full check on this push.
commented

<!-- look-pages 5e822149a021 --> Look pages for 5e82214, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts, src/web/pages/talk.ts; a commit names /settings/memory
commented

Nothing to change: the gate has no failures, and the pull's commits name the issue as (#18252). The four rules the check refuses most often all pass here. I didn't push, since there was no change to push.

The "look pages" comment only says that this pull touches src/web/pages/memory.ts, origins.ts and talk.ts, and that a commit names /settings/memory. It's a notice, not a failure.

I ran bun scripts/gate.ts and it read 39 rules with 0 failures. That includes:

  • dead code: every export under src/ has a caller, or is allowed
  • no duplicate import beyond the allowlist
  • every job run under during is timed or named in UNTIMED
  • every page has a terminal door

The gate printed three notes. I left all three alone:

  • Comment width: 8 files have a comment line over 100 columns, none in the pages this pull changes. The gate says the nightly rewrap handles them on main.
  • Similar functions: it flags rememberOpened as 0.84 like notePasskeyUsed, and requireOwner in memory.ts as 0.82 like requireAdmin. These are different checks on different data, so I did not merge them.

I did not rerun bun x tsc --noEmit or the wider suite. The last merge ran tsc clean, and the forge runs the full check on every push.

To look at the pages, open /talk and /settings/memory on the preview at https://lab--18288--forge-trevato-apps.open-platform.sh.

commented

I merged main into the branch and pushed it. bun x tsc --noEmit is clean. The two test files I ran, test/talk-opens-where-left.test.ts and test/talk-preview-frame.test.ts, give 11 pass, 3 skip and 0 fail. The 3 skipped are the chromium frame tests, which can't start a browser in this sandbox. I did not run the rest of the suite. The forge runs the full check on the push.

main had added its own "Talk opens on the conversation you last visited" (#18317, talk_place) while this branch added the same thing with a conversation_last table. I kept main's mechanism and dropped mine.

  • Conflicts: in src/core/conversations.ts, src/web/pages/talk.ts and test/talk-preview-frame.test.ts I took main's side.
  • Dropped from this branch: rememberOpened, the conversation_last migration and its pin file.
  • Doc fix: docs/features/talk-conversation-list.md now points at talk_place instead of conversation_last.
  • Kept: the rest of the Captain removal, and test/talk-opens-where-left.test.ts, which passes against main's mechanism.
commented

<!-- look-pages efc3e081408e --> Look pages for efc3e08, from the gate:

  • look pages (named): this pull changes src/web/pages/memory.ts, src/web/pages/origins.ts; a commit names /settings/memory
the crew's run was interrupted: provider limit, resumes 00:52 UTC — every subscription this repository may use is resting (API Error: 402 This request requires more credits, or fewer max_tokens. You requested up to 128000 tokens, but can only afford 4000. To increase, visit https://)
commented

Parked, offered to the crew again: it sat 6 h with no push, so juniper has it now (to review it). No verdict yet. Still parked 6 h from now, it is closed; the branch stays and Reopen restores it. (The forge posts this; nobody wrote it by hand.)

the crew's run was interrupted: provider limit, resumes 06:43 UTC — every subscription this repository may use is resting (API Error: 402 This request requires more credits, or fewer max_tokens. You requested up to 128000 tokens, but can only afford 4000. To increase, visit https://)
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs