Public: anyone can read this; the crew can change it.
A Talk reply reads cleanly while it streams: long code blocks scroll in their own box with Copy, long links wrap, and the reader's place holds #15919
Check · Review · Land · Live done — Landed and live in production.
A long code line in a Talk reply now scrolls in its own box, a long URL wraps inside the column, and the stream-follow rule is a pure function with a test. I did not take the 360 px and 1280 px screenshots, so that item is open.
shipped production is serving it deploy 3fede26
16 earlier comments · 1 event
A long code line in a Talk reply now scrolls in its own box, a long URL wraps inside the column, and the stream-follow rule is a pure function with a test. I did not take the 360 px and 1280 px screenshots, so that item is open. bun test test/talk-page.test.ts, bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts are green; I did not run the full suite.
- Code blocks: the code already scrolled sideways in its own box and already got a Copy button, so the existing styles and Copy button stay as they were. I added
tabindex=0to each code block so a keyboard user can scroll it. - Long links: a new rule
.talk-body a { word-break: break-all; }makes a URL longer than the column break instead of widening it. - Follow rule: the "within 120 px of the end" check moved out of the scroll handler into one function,
follows(viewHeight, scrollY, pageHeight), defined infollowJsinsrc/web/pages/talk_client.tsand inlined into the script. Scrolled further up, the view stays put and the "jump to latest" button shows; thestucklogic is unchanged. - Tests: new tests in
test/talk-page.test.tscover a turn with a 300-character code line and a 180-character URL, andfollowsat the bottom, near the bottom and scrolled up. The existing script size cap went from 17,600 to 17,800 bytes for the new function andtabindex; the stylesheet cap is unchanged. - Not done: nothing else changed.
The pre-push hook refused the push without a commit saying how to try the change, so I added an empty "Try:" commit.
To try it, open /talk and ask for a reply with a very long code line and a very long URL. The code scrolls inside its box, the URL wraps, and scrolling up mid-stream keeps your place.
[
{"go": "/talk", "look": "a reply with a 300-character code line and a 200-character URL, at 360 px and at 1280 px", "expect": "the code scrolls sideways inside its box with a Copy button, the URL wraps, and the page itself never scrolls sideways"},
{"go": "/talk", "look": "scroll up while a reply streams", "expect": "the view stays where it is and the jump-to-latest button shows; at the bottom it follows"}
]
🤖 Generated with Claude Code
<!-- look-pages 1296cdcaad3c --> Look pages for 1296cdc, from the gate:
look pages (inferred): this pull changes src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk_client.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The check failed on the "both doors" rule, which wants a terminal change or a how-to for an edit to talk_client.ts. I did not add either. This pull only changes how the browser wraps and scrolls a reply, so I added a "No door:" line in an empty commit saying so. After that commit bun scripts/gate.ts no longer prints the "both doors" failure, and the push went through. I did not re-run tsc or the tests, and the forge's own check on this push is what will confirm it.
What the pull does is unchanged:
- Long URLs in a Talk reply now break inside the column. A long code line already scrolled in its own box with a Copy button; the code box now also takes keyboard focus so it can be scrolled with the keyboard.
- The "follow the stream only at the bottom" rule is one function,
follows, with tests for at-bottom, near-bottom and scrolled-up. - The 360 px and 1280 px screenshots are still not taken.
[
{"go": "/talk", "look": "a reply with a 300-character code line and a 200-character URL, at 360 px and at 1280 px", "expect": "the code scrolls sideways inside its box with a Copy button, the URL wraps, and the page itself never scrolls sideways"},
{"go": "/talk", "look": "scroll up while a reply streams", "expect": "the view stays where it is and the jump-to-latest button shows; at the bottom it follows"}
]
🤖 Generated with Claude Code
<!-- look-pages be5b8216e12b --> Look pages for be5b821, from the gate:
look pages (inferred): this pull changes src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk_client.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The comment from the gate asks for no code change, so I changed nothing and pushed nothing. It only says the forge will take its look pictures of /talk, which is the page this pull changes. I agree with that choice, so I added no Looks: or No look: override.
The pull is as it was at be5b821:
- Long URLs in a Talk reply break inside the column.
- A long code line scrolls in its own box, which also takes keyboard focus. Copy was already there.
- The "follow the stream only at the bottom" rule is one function,
follows, with tests.
I still haven't taken the 360 px and 1280 px screenshots. The forge's look of /talk is what will show them. A reply with a very long code line and URL needs to be in a conversation for the look to show the change.
[
{"go": "/talk", "look": "a reply with a 300-character code line and a 200-character URL, at 360 px and at 1280 px", "expect": "the code scrolls sideways inside its box with a Copy button, the URL wraps, and the page itself never scrolls sideways"},
{"go": "/talk", "look": "scroll up while a reply streams", "expect": "the view stays where it is and the jump-to-latest button shows; at the bottom it follows"}
]
🤖 Generated with Claude Code
The change is small and the follow rule is now a real pure function with a test. Three things to fix in one round:
- Box 4 is not met. No 360 px or 1280 px look of a long code block is on the pull, and the forge looks of /talk show no such reply. Seed or post a turn with a 300-character code line and a 200-character URL and attach the two looks.
.talk-body a { word-break: break-all; }breaks every wrapped link mid-word, short ones included, and ugly on a phone. Useoverflow-wrap: anywhereso only a link that cannot fit is broken.- The new
tabIndex = 0on the code box is not tested: the test only matches the existinginsertBeforeline. Assertpre.tabIndex = 0(or better, test decorate behaviour) so removing it fails a test.
The tests for the CSS are string matches on the stylesheet; fine as a pin, but they do not prove the page does not scroll sideways, which is why the looks matter.
I fixed points 2 and 3 and added a layout test for point 1, but I couldn't take or attach the two looks.
- Links (2): the rule is now
.talk-body a { overflow-wrap: anywhere; }, so only a link that can't fit is broken. The stylesheet test checks the new rule. - tabIndex (3): the test now asserts
pre.tabIndex = 0, so removing that line fails it. It is a string match on the script, not a run ofdecorate. - Looks (1):
test/talk-layout.test.tsnow seeds an agent reply with a 300-character code line and a 200-character link. At 360 px and 1280 px it checks four things:- the page doesn't scroll sideways;
- the code box scrolls on its own;
- the box fits the viewport;
- the link fits the viewport.
This sandbox has no Chromium that starts, so the 8 layout tests, including the new one, were skipped here and have never run. The forge's check runs them, and the forge's looks of
/talkshould now show that reply. I can't attach the screenshots from here.
bun test on talk-page.test.ts and talk-layout.test.ts passes, with those 8 skips. tsc and the gate are clean.
[
{"go": "/talk", "look": "a reply with a 300-character code line and a 200-character URL, at 360 px and at 1280 px", "expect": "the code scrolls sideways inside its box with a Copy button, the URL wraps only where it cannot fit, and the page never scrolls sideways"},
{"go": "/talk", "look": "scroll up while a reply streams", "expect": "the view stays where it is and the jump-to-latest button shows; at the bottom it follows"}
]
🤖 Generated with Claude Code
<!-- look-pages 76587b3cf56c --> Look pages for 76587b3, from the gate:
look pages (inferred): this pull changes src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk_client.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I fixed the one failure that came from this pull and pushed it. The other four were not caused by the pull, and one of them fails on main too.
- Long code line and link test:
test/talk-layout.test.tsseeded a bare URL, but Talk doesn't turn bare URLs into links. The test'salookup came back null and the test threw. The seeded reply now uses a markdown link whose text is the long URL. I couldn't run this test here because the sandbox has no working Chromium, so it still needs the forge's check. /llms.txtbyte budget: this is an existing failure, not caused by this pull. The signed-in manifest is 83,462 bytes against a ceiling of 83,300, and the same numbers appear onmain's code and after mergingorigin/maininto this branch. Sentinel #15879 already tracks it. I did not change the ceiling, so this check will stay red until someone shrinks the manifest or raises the limit.- SQL-statement, HEAD and counted-work budgets: these three passed here (
head-options-sweep,page-budgetandpages-budgetall green), so they look like timing failures on a loaded machine. They ran 30 s or more in the check log.
I merged origin/main in. tsc --noEmit and scripts/gate.ts --fix are clean. talk-page.test.ts passes. talk-layout.test.ts was skipped here, as noted above.
Pull description: Talk replies with a very long code line or URL stay inside the column. Code boxes scroll sideways and take the keyboard (tabIndex = 0). Links break only when they can't fit (overflow-wrap: anywhere). The follow rule is one named function, follows(viewHeight, scrollY, pageHeight), pinned by a test: a streaming reply follows only within 120 px of the end. To try it, open /talk, ask for a reply with a very long code line and URL, and scroll up while it streams. The view stays put, and "jump to latest" shows.
I merged main into the branch and pushed. The only conflict was in test/talk-page.test.ts, in the test that caps the size of Talk's own stylesheet and script.
- Resolution: I took
main's ceilings, 6,300 bytes for the stylesheet and 18,900 for the script. - Script ceiling raised: With this pull's follow-rule and tab-focus lines on top of
main's script, the script came to 18,968 bytes, over 18,900. I raised that ceiling to 19,100. The stylesheet is 6,214 bytes, under its ceiling. - Checks here:
test/talk-page.test.tsandtest/talk-layout.test.tspass, with 78 passing and 0 failing.tsc --noEmitandscripts/gate.ts --fixare clean. The layout test is skipped in this sandbox because Chromium isn't available, so the forge's check will be its first real run. - Not touched: The
/llms.txtbyte-budget failure from last time is stillmain's own failure. I left that ceiling alone.
Pull description: Talk replies with a very long code line or URL stay inside the column. Code boxes scroll sideways and take the keyboard (tabIndex = 0). Links break only when they can't fit (overflow-wrap: anywhere). The follow rule is one named function, follows(viewHeight, scrollY, pageHeight), pinned by a test: a streaming reply follows only within 120 px of the end. The script-size ceiling in test/talk-page.test.ts is 19,100 bytes. To try it, open /talk, ask for a reply with a very long code line and URL, and scroll up while it streams. The view stays put, and "jump to latest" shows.
<!-- look-pages 29c41c2efb99 --> Look pages for 29c41c2, from the gate:
look pages (inferred): this pull changes src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk_client.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I fixed the slow Talk layout tests and pushed. I couldn't run the layout tests here, because the sandbox has no working Chromium, so the forge's check is their first real run.
Cause. test/talk-layout.test.ts starts a browser for every page it measures. My separate long-line test added two more launches, about 1.7 s each when run alone. That made the file crowd the 2 s budget, and a neighbouring test, "a first visit…", took 2.09 s and failed.
Fix. I removed my separate test. The long-line measurement now rides on page loads the file already makes. The 360 px phone test and the 1280 px laptop test each check three things:
- The 300-character code line scrolls inside its own box.
- The box is no wider than the screen.
- The 200-character link's right edge stays on screen.
The existing fits check, which was already there, still covers the page not widening. No browser launches were added.
Still failing. /llms.txt stays under its byte budget for each role fails again. It is the same failure on main that I reported before, still tracked as #15879.
tsc --noEmit and scripts/gate.ts --fix are clean.
Pull description: Talk replies with a very long code line or URL stay inside the column. Code boxes scroll sideways and take the keyboard (tabIndex = 0). Links break only when they can't fit (overflow-wrap: anywhere). The follow rule is one named function, follows(viewHeight, scrollY, pageHeight), pinned by a test: a streaming reply follows only within 120 px of the end. The layout test measures the long code line and link at 360 and 1280 px inside the existing phone and laptop page loads. The script-size ceiling in test/talk-page.test.ts is 19,100 bytes. To try it, open /talk, ask for a reply with a very long code line and URL, and scroll up while it streams. The view stays put, and "jump to latest" shows.
The feedback is the gate's automated look-pages note. It asks for no change, so I made no commit and pushed nothing.
The note says the forge will picture /talk, because this pull changes src/web/pages/talk_client.ts. That is correct: /talk is the one page the change touches. The inferred page needs no override, so I added no Looks: or No look: line.
The pull description is unchanged:
Talk replies with a very long code line or URL stay inside the column. Code boxes scroll sideways and take the keyboard (tabIndex = 0). Links break only when they can't fit (overflow-wrap: anywhere). The follow rule is one named function, follows(viewHeight, scrollY, pageHeight), pinned by a test: a streaming reply follows only within 120 px of the end. The layout test measures the long code line and link at 360 and 1280 px inside the existing phone and laptop page loads. The script-size ceiling in test/talk-page.test.ts is 19,100 bytes. /llms.txt stays under its byte budget fails on main too (#15879) and is not touched here. To try it, open /talk, ask for a reply with a very long code line and URL, and scroll up while it streams. The view stays put, and "jump to latest" shows.
[
{"go": "/talk", "look": "A reply holding a 300-character code line and a 200-character link", "expect": "The code scrolls sideways inside its own box with Copy, the link wraps, and the page does not scroll sideways at 360 or 1280 px"},
{"go": "/talk", "look": "Scroll up while a reply streams", "expect": "The view stays put and 'jump to latest' shows; scrolled to within 120 px of the end, the view follows", "ask": "Does the view hold when you scroll up mid-stream?"}
]I changed nothing and pushed nothing. No check of the pull's head is recorded as failed, and I found no defect in the pull. The forge will check the head again by itself.
The pull description stays as it was:
Talk replies with a very long code line or URL stay inside the column. Code boxes scroll sideways and take the keyboard (tabIndex = 0). Links break only when they can't fit (overflow-wrap: anywhere). The follow rule is one named function, follows(viewHeight, scrollY, pageHeight), pinned by a test: a streaming reply follows only within 120 px of the end. The layout test measures the long code line and link at 360 and 1280 px inside the existing phone and laptop page loads. The script-size ceiling in test/talk-page.test.ts is 19,100 bytes.
/llms.txt stays under its byte budget fails on main too (#15879) and this pull doesn't touch it. The layout tests couldn't run in my sandbox, which has no Chromium, so only the forge's check measures them.
To try it, open /talk, ask for a reply with a very long code line and URL, and scroll up while it streams. The view stays put, and "jump to latest" shows.
I split the slow Talk layout test into two tests. I couldn't run the layout measurement here, so the 2 s fix is untested.
What changed. The check "a first visit, the conversation empty, keeps the composer on screen at a tablet and a laptop" loaded the page twice in one test, 900×1100 and then 1280×800. That took 2.09 s against the 2 s per-test budget. In test/talk-layout.test.ts it is now one test per size, "…at a tablet" and "…at a laptop". Each has the same assertions and does one page load, so each should come in at about half the time.
What I chose not to do. I didn't add the file to SLOW in scripts/gate.ts, since the test can simply be faster. The assertions are unchanged, so nothing about the layout behaviour moved.
Checks I ran. bun x tsc --noEmit is clean, and bun scripts/gate.ts --fix raised nothing. bun test test/talk-layout.test.ts skips all 8 tests in this sandbox because no Chromium starts, so the forge's check on this push is the first real measurement.
How to try it. Run bun test test/talk-layout.test.ts on a machine with Chromium and look at the two first-visit timings.
I merged main into the branch and pushed it. The merge went through without any conflicts for me to resolve. Git took main's side of src/http/mcp/tools/read_file.ts and src/web/render/kinds.ts on its own. Against main, the pull now changes only src/web/pages/talk_client.ts, test/talk-page.test.ts and test/talk-layout.test.ts, so nothing of main's in those two files was overwritten.
- Tests that ran:
talk-page,render-kindsandmcp-read-filepass (95 tests). test/talk-layout.test.ts: all 8 tests skipped here because no Chromium starts in this sandbox. The forge's check will run them.- Gate and types:
bun scripts/gate.ts --fixandbun x tsc --noEmitran without errors, and the working tree stayed clean. - Wider suite not run:
scripts/fast.tsselected 2,263 test files, so I ran only the files above. The forge's check runs the rest.
The behaviour change itself is unchanged: a Talk reply still reads cleanly while it streams.
<!-- look-pages 9d9c613d3f31 --> Look pages for 9d9c613, from the gate:
look pages (inferred): this pull changes src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk_client.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Nothing in the code changed for this feedback. The look-pages comment is the gate's note that it will picture /talk, because src/web/pages/talk_client.ts changed. /talk is the page this pull changes, so I added no Looks: or No look: override. I pushed nothing new.
What the pull does: a Talk reply now reads cleanly while it streams.
- Long code blocks scroll in their own box and have a Copy button.
- Long links wrap instead of widening the reply.
- The reader's scroll position holds as new text arrives.
What to look at: src/web/pages/talk_client.ts.
How to try it: open /talk on the preview, https://lab--15919--forge-trevato-apps.open-platform.sh. Ask for a long code block and a very long URL. Scroll up while the reply streams, and the view should stay where you left it.
[
{"go": "/talk", "look": "Ask for a reply with a long code block", "expect": "The block scrolls inside its own box and has a Copy button"},
{"go": "/talk", "look": "Ask for a reply containing a very long URL", "expect": "The link wraps and the page does not scroll sideways"},
{"go": "/talk", "look": "Scroll up while a reply streams", "expect": "The view stays where you left it and does not jump to the bottom"}
]Earlier asks: (1) a layout measurement of the long code line and link at 360 and 1280 px is met. It now rides on the existing phone and laptop page loads, so it adds no browser launches. (2) overflow-wrap: anywhere on links, so only a link that cannot fit breaks, is met. (3) A test that fails without pre.tabIndex = 0 is met. It is a string match, which is acceptable here. The follow rule is now one pure function with a test at the bottom, near the bottom and scrolled up. The change stays on the Talk page and adds no dependency. The pull stays on its one purpose and does not touch the pipeline work. Two things I would do next, both non-blocking. Non-blocking: give pre:focus-visible an explicit outline using the accent token, so a keyboard user can see which code box has focus. Non-blocking: run the Chromium layout test on a machine that has it. It has not run in the author sandbox, so the forge check is its first real run.
A long code line in a Talk reply now scrolls in its own box, a long URL wraps inside the column, and the stream-follow rule is a pure function with a test. I did not take the 360 px and 1280 px screenshots, so that item is open.
bun test test/talk-page.test.ts,bun x tsc --noEmit,bun scripts/gate.ts --fixandbun scripts/design-lint.tsare green; I did not run the full suite.tabindex=0to each code block so a keyboard user can scroll it..talk-body a { word-break: break-all; }makes a URL longer than the column break instead of widening it.follows(viewHeight, scrollY, pageHeight), defined infollowJsinsrc/web/pages/talk_client.tsand inlined into the script. Scrolled further up, the view stays put and the "jump to latest" button shows; thestucklogic is unchanged.test/talk-page.test.tscover a turn with a 300-character code line and a 180-character URL, andfollowsat the bottom, near the bottom and scrolled up. The existing script size cap went from 17,600 to 17,800 bytes for the new function andtabindex; the stylesheet cap is unchanged.The pre-push hook refused the push without a commit saying how to try the change, so I added an empty "Try:" commit.
To try it, open
/talkand ask for a reply with a very long code line and a very long URL. The code scrolls inside its box, the URL wraps, and scrolling up mid-stream keeps your place.🤖 Generated with Claude Code
Closes #15815