Skip to content

fix: hygiene — names, scrolling, timezones, one fetch, a real robots.txt (#232) - #240

Merged
vishr merged 2 commits into
mainfrom
fix/p4-hygiene
Sep 7, 2026
Merged

vishr merged 2 commits into
mainfrom
fix/p4-hygiene

Conversation

@vishr

@vishr vishr commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

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: /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, 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 /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 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.txt is 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 check
  • just test-race when auth, API, ingest, query, MCP, or agent paths changed
  • User-facing behavior and configuration docs are current
  • No credentials, private telemetry, host details, or enterprise-only source are included
  • API, migration, ingest, MCP/AG-UI, or release-contract changes are called out

Verified against a local instance seeded over OTLP, driven in a real browser:

  • A 12,000px streamed answer stayed pinned to the bottom across the draft-to-named-thread navigation. Before: scrollTop 0, with the first screen all the reader ever saw.
  • Scrolling up parked the pane and it stayed parked while the answer grew; returning to the bottom re-pinned it.
  • The browser's own accessibility tree now reads First page, Previous page, Page 1…Page 24, Next page, Last page, and the log table's column head reads Time (PDT).
  • A dashboard load went from 13 requests to 7.
  • /robots.txt → 200 text/plain with Disallow: /; /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).

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
@vishr

vishr commented Sep 7, 2026 •

Copy link
Copy Markdown
Member Author

Review fixes pushed as fc27fd4e, and I corrected three claims in the description above.

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 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 showing, and exactTimestamp takes a Date or an epoch so nobody round-trips 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.

A robots.txt shipped in the build now wins over the default, which exists for a binary that has none rather than to shadow one that does. A trailing dot is no longer read as an extension, and the comment says what a route parameter carrying a dot would cost — no route can today, both params are UUIDs.

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 now say what actually happens.

Two things I did not change, and why:

  • The dashboard's logs widget is a five-row card with no header row, so it names no zone — only the embedded log tables do. Adding a header to that card is a layout decision, not a defect fix. The description now says which tables it means.
  • title is mouse-only. Making the exact instant reachable for keyboard and touch means a real tooltip or a details affordance on every timestamp, which is a bigger change than this hygiene pass; the description now says so instead of implying the reach.

just check green; 122 UI tests.

@vishr
vishr merged commit 850c738 into main Sep 7, 2026
8 checks passed
@vishr
vishr deleted the fix/p4-hygiene branch September 7, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant