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

Talk's pane address bar is a switcher: a repository, a version, a path; Back returns, Diff is this conversation's #16367

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The owner, after watching an app built in the pane: "it would be cool if the url bar was dynamic so I could select the repo and the preview … i should always be able to go right back to where i was", and "i have never seen anything in diff". Pane-bar A of the approved note.

Notes

shipped production is serving it deploy b03b44b

opened this

The owner, after watching an app built in the pane: "it would be cool if the url bar was dynamic so I could select the repo and the preview … i should always be able to go right back to where i was", and "i have never seen anything in diff". Pane-bar A of the approved note.

  • The bar: a form of three pickers in the address pill: the repository (the conversation's, then the person's own apps, at most 8, only ones they may read: the conversation's is checked as a reader, the rest are ones they write), the version (Live, or each open pull whose preview is up, at most 5), and a path checked by the pane's one hostile-path check (panePath, #16351). The choice is the address (?repo=&show=&path=); every tab link and live fragment of the pane carries it.
  • In place: the page names in frame-src exactly the origins the bar offers this person (each app's production and its offered previews, by exact origin), so a pick swaps the pane fragment and frames another origin with no reload; the chat is never redrawn and keeps its scroll.
  • Back: each pick is one history entry (pushState); Back and Forward read the pane for that address; a reload keeps it. The last pick is kept per conversation in localStorage and brought back when the conversation is opened with no pick of its own. Without the script the bar is a GET form with a Go button.
  • Reloads keep the pick: the frame's fresh-grant reload (#16352) and the production-after-a-pull check read the pane again with its query (data-pane-q), never the pane the conversation would show unpointed.
  • A picked pull whose preview is gone falls to Live, path kept, with one line: "#N landed: Live has it now." (or "was closed", or "has no preview up yet").
  • The line under the bar (paneInfo, src/core, printed by the terminal's pane too): for a pull's preview who made it, its number and title, checks and review, with a link; for Live the default branch and what last landed. The checks' words move to core (PULL_CHECKS), one copy.
  • Diff is what this conversation's work changed: the issues its receipts name (receiptIssues), the pulls the crew's runs on them pushed and the pulls that close them (conversationPulls), newest first, each folded with its change (a landed one as it landed). A pull picked in the bar shows that pull alone. A conversation that filed nothing on the repository asks for a pick, never the repository's newest open pull unasked. A build conversation's Diff is as it was.

Tests: test/talk-pane-bar.test.ts (the hostile paths; offered only to a reader, with a team member and a stranger; frame-src exactly the offered origins, a stranger's ?repo= never framed; the fall to Live; the info line; Diff from receipts, and the pick asked for), test/talk-page.test.ts (a pick swaps the pane as one history entry kept per conversation, the chat untouched; a new repository drops the old version; Back swaps the one before), the terminal's pane line in test/talk-live-pane.test.ts.

Seen headless at 1280 and 360 px through the real path (new_app through /mcp with the owner's turns, a second app, a pull with its preview up; scripts/shots-pane-bar.ts, talk-research/design-pass/o19-*): open on the pull's preview, pick Live, pick the other app, Back, Back again, reload, open the conversation again. Every pick and Back in place (the page never navigated), the frame on each version's own origin, the chat's scroll unchanged at 1280, the reload and the reopened conversation on the last pick, no horizontal scroll, no page errors. On a phone the bar takes a row of its own under the tabs.

Sizes near use: the script measures 53,327 B (+2,300 for the switcher and Back), pin 53,600; the page with a code reply measures 53,069 B, pin 54,000; /talk's gzip ceilings js 40,960, css 56,064.

{"go": "/talk on a conversation that built an app with an open pull, Preview tab", "look": "the address bar", "expect": "the repository, the version (the pull's preview) and / as three pickers; under it who made the pull, its title, checks and review"}
{"go": "pick Live, then another app, then press Back twice", "look": "the pane and the chat", "expect": "each pick and Back changes only the pane, in place; the chat keeps its place; Back returns to Live, then to the pull"}
{"go": "reload, then open the conversation again from the list", "look": "the pane", "expect": "the last pick, both times"}
{"go": "Diff on a conversation that filed work", "look": "the pane", "expect": "the pulls it led to, newest first, each with its change; on a conversation that filed nothing, \"Pick a pull above\""}
{"go": "the same at 360 px", "look": "the address bar", "expect": "a row of its own under the tabs, both pickers readable, no horizontal scroll"}

Try: open /talk on a conversation that built an app, pick another version or app in the address bar, then press Back Looks: /talk Direction: the owner's "select the repo and the preview … always be able to go right back to where i was" and the empty Diff (#15734), ahead of #6534 No door: the terminal's pane prints the same line under the bar (paneInfo), tested in test/talk-live-pane.test.ts

Co-Authored-By: Claude Fable 5 <[email protected]>

--- The owner, 2026-11-24: "it would be cool if the url bar was dynamic so I could select the repo and the preview and view different things nice and easy. i should always be able to go right back to where i was though. this needs to be well thought out tho i dont want there to be something dumb … the code view is cool but i have never seen anything in diff." Design note and mock reviewed before building; this is part A (the switcher, the info line, Diff from this conversation's pulls). One commit.

🤖 Generated with Claude Code

3 earlier comments · 1 event
commented

<!-- look-pages b3d4ee05b267 --> Look pages for b3d4ee0, from the gate:

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

Steward note: new head 09afab088 fixing this pull's own query-budget failures without raising a pinned count: with no repository for the pane, the pickers read nothing; with a pane, apps come from one read and all open pulls of the offered repositories from one statement; previews are offered from the runtime with no read; Diff's conversationPulls is one statement, run only for the Diff tab. Behaviour change: a stranger naming a repository they cannot read gets no pane (before, it offered their own apps); test updated.

commented

<!-- look-pages 09afab088aa4 --> Look pages for 09afab0, from the gate:

  • look pages (named): this pull changes src/web/layout.ts, src/web/pages/talk.ts, src/web/pages/talk_client.ts; a commit names /talk
Changes requested — before the latest push

I opened the preview: / answers 200, and /talk sends an unsigned request to /signin, as it should. The look pictures are outside my sandbox, so I judged the phone layout from the CSS. I read the diff and the docs. The switcher is well shaped: the repository and path are validated at the boundary, frame-src names exactly the origins offered, the pickers fall back to a form with a Go button without JavaScript, and the controls are 2.75rem tall on a phone. Three things need fixing in one round.

  1. Both doors (blocking). The page lets a person pick a repository, a version and a path. The terminal only gained a read-only paneInfo line in the p pane (src/tui/screens/talk_chats.ts). A terminal user cannot switch the pane to another repository, to Live, to an open pull's preview, or to a path, and cannot see the Diff for this conversation's pulls. Add a pick in src/tui/screens/talk_chats.ts that uses paneOffer and workspaceOf with pull and path, with a test in the terminal suite. docs/features/talk.md already claims the terminal prints the same line; say what the terminal can pick too.
  2. First paint shifts and does the work twice. In talk_client.ts, a pick remembered in localStorage is restored after load. It runs replaceState and then swapAt, which fetches and replaces the whole pane after the server has already drawn it. That is a visible swap and a second request on every open of a conversation. It also keeps a remembered repo that the server may silently drop, and the stored pick is never cleared. Fix: send the remembered pick to the server (a cookie, or a redirect on the first request) so the first paint is right. If that is too large, drop the restore. The URL already survives a reload.
  3. Without JavaScript, a repository change leaves a stale version. The form submits show=pull-N from the old repository's selected option together with the new repo. JS clears show in picked(..., repoChanged), but the no-JS Go path cannot. In paneAtOf or paneOffer, ignore a show that the chosen repository does not offer and fall to Live. Add a test.

Smaller fixes:

  • realApps in src/actions/talk_workspace.ts returns an object literal that is not indented, and talk_code.ts has a leftover double blank line where CHECKS was removed. Run the gate and formatter.
  • receiptIssues, conversationPulls and paneInfo are core logic; check that each has a test that fails without it (talk-pane-bar.test.ts looks like it covers them).
  • The size budget was raised for /talk (js +1 KB, css +256 B). Say in the pull why that is needed.

This change touches src/web/, so run bun scripts/design-lint.ts before pushing. Add a review block of {go,look,expect,ask?} steps to the pull description.

commented

<!-- look-pages c45c9aa56a35 --> Look pages for c45c9aa, from the gate:

  • look pages (named): this pull changes src/web/layout.ts, src/web/pages/talk.ts, src/web/pages/talk_client.ts; a commit names /talk
Approved

I could not diff against 09afab088aa4 (the commit is not in this clone). I read the change as it stands at c45c9aa instead, and the preview answers 200.

What I checked:

  • The address bar works without JavaScript: it is a GET form with a Go button.
  • Every pick is a history entry, so Back returns.
  • The choice sits in the URL, so a reload keeps it.
  • The repository is checked for reading (paneOffer), and frame-src names only the origins the bar offers.
  • The terminal has the same pickers (o, w, l) and the same paneInfo and paneFell wording.
  • The how-to is in docs/features/talk.md and the component classes are in docs/design/areas/talk.md. README is untouched.
  • There is a new test file, test/talk-pane-bar.test.ts.

Two things I would do next:

  1. Make the path input and the two selects carry visible labels or aria-labels, and check they are at least 44px tall on a 360px phone. .talk-addr is hidden under 30rem, so confirm the picker form stays usable there.
  2. Keep the page script inside its budget. The pull raised it again (to 40,704 B for /talk); move the address-bar swap code into a lazily loaded part if it grows more.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs