Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

fix(ui): open the viewer on the timeline and the selected event's diff - #3

Merged
zz-plant merged 1 commit into
mainfrom
claude/vibecoded-ui-copy-audit-g3mj8p
Sep 29, 2026
Merged

zz-plant merged 1 commit into
mainfrom
claude/vibecoded-ui-copy-audit-g3mj8p

Conversation

@zz-plant

Copy link
Copy Markdown
Contributor

The viewer should open on the timeline and the changes the user loaded it to read. Before this change, the first screen went to controls and an empty panel, and at 390px the page was 708px wide.

What changes

  • Toolbar
    • The filter row wraps, so all nine type filters fit on screen at 390px and the page is 390px wide instead of 708px.
    • The three export buttons become one Export button with a format select.
  • Filters
    • All and None are no longer highlighted alongside nine highlighted chips; each is disabled when clicking it would change nothing.
    • The chips are now buttons with aria-pressed, so a keyboard can reach and toggle them. They used to be click-only spans.
  • Diff panel
    • The first listed event is selected on load, and again whenever a filter hides the selected event. The panel shows a change instead of "Click an event".
    • The diff reads as one run of text. Its word chunks used to be laid out in a two-column grid that split sentences.
  • Layout
    • Diff, Citation churn and Model confidence stack beside the timeline, so the confidence chart sits in a 692px panel instead of a 1398px one.
    • The second row has three equal columns, and no panel stretches to match a taller neighbour.
  • Source changes
    • The revision id moves to each row's tooltip, and Detail gets the rest of the row: 210px wide at 1440, up from 26px visible.
    • The panel is 245px tall instead of 886px.
  • Security: table cells are now filled with textContent. They used innerHTML, and markup in an uploaded JSONL file (for example <img onerror> in a fact or section) ran as script. Both remaining innerHTML writes in src are fixed strings.
  • Event schema: the panel says once that a field is present in every event. Only fields that some events lack show a percentage.
  • Labels: the "Timeline" and "Changes" labels are removed; they repeated the panel titles below them.

Measured (Chromium, before → after)

Before After
Page width at 390px 708px 390px
Empty diff panel's share of the first screen at 1440px 16.4% 0% (it opens filled)
Detail column width at 1440px 26px 210px
Source changes panel height at 1440px 886px 245px
Toolbar controls 15 14
"100% present" repeats 10 0

Not changed

  • Events shown twice: each event appears in the timeline and in one type-specific panel. Talk page activity is the closest to a duplicate, but none of the panels is clearly redundant, so that is left as a product call.
  • Found, not fixed here:
    • The pre-commit hook fails any commit that touches a .md file: biome check --write exits with "No files were processed". Adding --no-errors-on-unmatched should fix it.
    • After filtering, the timeline count reads "N of N" instead of "N of 12".
    • Wording-change cards print an empty "−" or "+" line for a new or removed sentence.
    • var(--font-mono) is used in three components, but the variable is named --mono.

Checks

  • bun run lint, tsc --noEmit, bun run test, bun run build and bun run assets:check pass.
  • Interactions were checked in Chromium at 1440×900 and 390×844:
    • selection stays in sync with filters, All and None;
    • the chips toggle from the keyboard;
    • all three export formats download;
    • an upload with no eventIds works;
    • markup in uploaded text renders as text.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EpGaiBuSk5nCSV2hKyD6PN


Generated by Claude Code

The first screen was spent on controls and an empty panel. This makes
the viewer lead with the timeline and a filled diff, and gives each
panel the room its content needs.

- Toolbar: the filter row wraps (flex-wrap on #toolbar > div), so a
  390px page is 390px wide, not 708px, and all nine type filters are on
  screen. The three export buttons become one Export button with a
  format select.
- Filters: All and None are actions, not states. They are no longer
  highlighted beside nine highlighted chips; each is disabled when it
  would change nothing. The chips are buttons with aria-pressed, so
  they can be reached and toggled from the keyboard.
- Diff: the timeline selects its first listed event on load, and again
  when a filter hides the selected one, so the diff panel shows a change
  instead of "Click an event". Selection is held by reference, since
  eventId is optional. The diff now reads as one run of text. Before,
  its word chunks were laid out in a two-column grid.
- Layout: diff, citation churn and model confidence stack beside the
  timeline, so the confidence chart is no longer in a 1398px panel.
  The second row has three equal columns, and no panel is stretched to
  a taller neighbour's height.
- Source changes: the Rev column moves to each row's tooltip. The short
  columns shrink to their content, so Detail gets the rest of the row:
  210px at 1440, up from 26px visible. The panel is 245px tall, not
  886px. Cells are built with textContent. They were built with
  innerHTML, which ran markup from an uploaded file.
- Event schema: "present in every event" is said once in the header,
  and only fields some events lack show a percentage, which never rounds
  up to 100%. The fields share one grid so their columns stay aligned.
- The "Timeline" and "Changes" labels above panels that say the same
  thing are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EpGaiBuSk5nCSV2hKyD6PN
@zz-plant
zz-plant merged commit 5366f2f into main Sep 29, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants