Repository navigation
fix: hygiene — names, scrolling, timezones, one fetch, a real robots.txt (#232) - #240
Conversation
P4 items 27–31 and 33 from #232. **The answer no longer arrives off-screen.** The chat pane scrolled once per message, which does not hold: a turn keeps growing after the message that carried it — markdown lays out, an embedded view loads in its iframe, a lazy chunk arrives — and each of those pushes the answer back below the fold. Naming a draft thread makes it worse: /chat becomes /chat/<id> without the thread's identity changing, React reconciles the two routes into one component instance and swaps the DOM underneath it, and anything wired once is left on a container that is no longer on the page. The pane now watches its content's size from ref callbacks, which fire exactly when the nodes change. Measured on a 12,000px answer: pinned to the bottom throughout, where it used to sit at scrollTop 0 and show the first screen only. It lets go only for a wheel, a drag or a key. Position cannot tell whether the reader left — the pane's own scrolling moves scrollTop, and so does the browser clamping it every time a streaming answer briefly gets shorter. Both earlier attempts read those as scrolling up and abandoned the reader mid-answer. **Ten unnamed icon buttons.** Mantine names a Pagination's numbered controls from their own text and leaves the four edge controls as bare icons, so half the control set reached the accessibility tree as "button" — in every embedded table. The flame graph's narrow spans render no text at all, and were unnamed buttons too. Confirmed in the browser's own accessibility tree: First page, Previous page, Page 1…24, Next page, Last page. **A dashboard load asked for everything twice.** Opening /dashboards renders the default dashboard and then navigates to its own URL, unmounting the pane and mounting a new one; with nothing held fresh, the second mount asked again. Thirteen requests for a page that needs seven, and the same on every tab focus. Observability answers are current for half their poll interval, which costs a remount nothing and shows nothing the poll would not have shown. **Timestamps say which clock they are on.** Everything is rendered in the browser's zone and nothing said so, which is a real ambiguity between two people reading one incident from different offices. Log tables name the zone in the column head, and every shortened timestamp carries the whole instant — date, seconds and zone — in its title. **/robots.txt is a robots file.** It answered with the application shell and a 200, as did every unknown path: a missing asset arrived at the browser as HTML that parsed as neither script nor image. Every route here needs a session, so the file says so, and a missing path that names a file is a 404 while client routes still resolve to the shell. **The theme toggle's tooltip** described what the button would do and stayed on screen after the click changed it. Claude-Session: https://claude.ai/code/session_017ovmTezqzvxVP8P9MGDQNk
Review findings on this branch. Two of the four scroll tests passed against exactly the implementations they were said to pin. One parked the pane 600px from the bottom, where position alone decides and the wheel event was decorative; the other modelled a layout clamp at zero pixels from the bottom, which is at-bottom under any implementation. Both rewritten: a pane moved by something other than the reader is moved far enough that a position-only rule would let go, and a wheel, a key and a scrollbar drag each get a case. Verified by mutation — a position-only rule and an unpin-on-any-scroll rule both fail now, and both passed before. A time zone abbreviation belongs to an instant, not to a zone. The heads and footers asked for it as of now, so a table of rows from before a daylight saving change was headed PST while its rows read PDT — and the per-row title, which derives the zone from the row, contradicted the head. Each caller now labels what it is actually showing, and exactTimestamp takes a Date or an epoch so nobody has to round-trip through toISOString, which throws on a value this returns unchanged. The chat pane is reachable by keyboard. Chrome makes a scroller focusable only when it holds no focusable children, and this one holds copy buttons and links, so it says so itself. A robots.txt shipped in the build now wins over the default, which was written to serve a binary that has none, not to shadow one that does. A trailing dot is no longer read as a file extension, and the comment says what a route parameter carrying a dot would cost. Also: the waterfall's timeline bar carries the label its tooltip carries, the tooltip test covers the focus path that taking control of `opened` was most likely to break, and two comments that stated the wrong cause — a RefObject does not go stale across a route change, and the theme tooltip's label is reactive — say what actually happens. Claude-Session: https://claude.ai/code/session_017ovmTezqzvxVP8P9MGDQNk
e01a286 to
fc27fd4
Compare
|
Review fixes pushed as The scroll tests could not fail. Two of the four passed against exactly the implementations they were said to pin: one parked the pane 600px from the bottom, where position alone decides and the wheel event was decorative; the other modelled a "layout clamp" at zero pixels from the bottom, which is at-bottom under any implementation. Both rewritten, and a wheel, a key and a scrollbar drag each get a case. Checked by mutation: a position-only rule and an unpin-on-any-scroll rule both fail the suite now, and both passed it before. A time zone abbreviation belongs to an instant, not to a zone. The heads and footers asked for it as of now, so a table of rows from before a daylight-saving change was headed The chat pane is reachable by keyboard. Chrome makes a scroller focusable only when it holds no focusable children, and this one holds copy buttons and links. A Also: the waterfall's timeline bar carries the label its tooltip carries; the tooltip test covers the focus path that taking control of Two things I did not change, and why:
|
What changed
P4 hygiene from #232 — items 27, 28, 29, 30, 31 and 33.
The answer no longer arrives off-screen (28). The chat pane scrolled once per message, which does not hold: a turn keeps growing after the message that carried it — markdown lays out, an embedded view loads in its iframe, a lazy chunk arrives — and each of those pushes the answer back below the fold. Naming a draft thread makes it worse:
/chatbecomes/chat/<id>without the thread's identity changing, React reconciles the two routes into one component instance and swaps the DOM underneath it, so anything wired once is left on a container that is no longer on the page. The pane now watches its content's size from ref callbacks, which fire exactly when the nodes change.It lets go only for a wheel, a drag or a key. Position cannot tell whether the reader left — the pane's own scrolling moves
scrollTop, and so does the browser clamping it every time a streaming answer briefly gets shorter. Two earlier attempts read those as scrolling up and abandoned the reader mid-answer; both are pinned by tests that were checked by mutation — a position-only rule and an unpin-on-any-scroll rule each fail the suite.Ten unnamed icon buttons (27). Mantine names a Pagination's numbered controls from their own text and leaves the four edge controls as bare icons, so half the control set reached the accessibility tree as "button" — in every embedded table. The flame graph's narrow spans render no text at all, and were unnamed buttons too.
A dashboard load asked for everything twice (30). Opening
/dashboardsrenders the default dashboard and then navigates to its own URL, unmounting the pane and mounting a new one; with nothing held fresh, the second mount asked again. Thirteen requests for a page that needs seven, and the same on every tab focus. Observability answers are now current for half their poll interval.Timestamps say which clock they are on (33). Everything is rendered in the browser's zone and nothing said so. The log tables in the embedded views name the zone in their column head, for the rows they are actually showing — an abbreviation belongs to an instant, not to a zone, so a table spanning a daylight-saving change does not head PDT rows with PST. Every shortened timestamp also carries the whole instant in its
title, which is a mouse-only affordance: keyboard and touch users get the shortened form and the column head, not the tooltip. A unit and timezone preference is a larger feature and is not in this PR./robots.txtis a robots file (31). It answered with the application shell and a 200, as did every unknown path — a missing asset arrived at the browser as HTML that parsed as neither script nor image. Every route here needs a session, so the file says so; a missing path that names a file is a 404, and client routes still resolve to the shell. (The Cloudflare beacon 503 in the same item is deployment configuration, not this repository.)The theme toggle's tooltip (29) described what the button would do and stayed on screen after the click changed it.
Item 32 — the intermittent multi-second stalls — is not here. It is the rollup/maintenance write-mutex contention already characterised in the throughput work, and it needs a scheduling change rather than a hygiene fix.
Verification
just checkjust test-racewhen auth, API, ingest, query, MCP, or agent paths changedVerified against a local instance seeded over OTLP, driven in a real browser:
scrollTop0, with the first screen all the reader ever saw.First page,Previous page,Page 1…Page 24,Next page,Last page, and the log table's column head readsTime (PDT)./robots.txt→ 200text/plainwithDisallow: /;/assets/does-not-exist.js→ 404;/chat/<id>→ 200 shell.New tests: four for the scroll behaviour (following late-growing content, letting go only for real input, ignoring a layout clamp, re-arming when the route swaps the nodes), one for a remount not refetching, one for the tooltip closing on the click, one for the timezone helpers, and one Go test for robots.txt and the 404.
Part of #232 (P4 items 27, 28, 29, 30, 31, 33).