Skip to content

sim: frame log is a real <table> - #60

Merged
Kinflou merged 1 commit into
masterfrom
feat/frames-table
Sep 4, 2026
Merged

sim: frame log is a real <table>#60
Kinflou merged 1 commit into
masterfrom
feat/frames-table

Conversation

@Kinflou

@Kinflou Kinflou commented Sep 4, 2026

Copy link
Copy Markdown
Member

Option 2 from the follow-up list — the deferred semantic-table rewrite of the frame log.

Why

The header row was a CSS grid, each frame row was a <details>/<summary> grid, and keeping the two grids aligned across font sizes and the optional conn column took three separate fix PRs (#48#51). A real <table> aligns columns for free.

What

  • <table class="sim-frames-table"> with table-layout: fixed; explicit widths on # / kind / rtt / bytes, and direction / function share the remaining width.
  • Sticky <thead> — the labelled header now scrolls-locks at the top of the pane instead of being a separate element above it. Header cells are real <th title="…">.
  • One <tbody class="frame-row"> per frame (multiple tbodies is valid): a <tr class="frame-summary"> of <td>s that toggles a <tr class="frame-detail" hidden> holding the decoded envelope + raw-bytes panes. Toggle on click or Enter/Space, role="button" + aria-expanded, replacing <details>'s built-in behaviour.
  • Idle separators and refusal notices are their own single-cell <tbody> rows (colspan), still data-kind / data-conn tagged so the filters and clear work unchanged.
  • Deletes --frame-grid / --frame-grid-conn and the whole .sim-frames-cols / summary grid block.

Tests

  • New polish — the frame log is a real <table> whose rows expand in place: asserts the <table> + <thead> structure, one <tbody> per frame, the collapsed-by-default detail row, and click-to-expand with aria-expanded.
  • The ~10 existing frame-log assertions (.frame-row, .frame-body, .frame-delta, .frame-idle, .frame-refused, filters, counts) pass unchanged — .frame-row is now the <tbody> and .frame-body is still a descendant of it.
  • yarn test 30 pass · yarn build clean.

Not verified

Sticky-header behaviour and the fixed-layout column alignment are layout features linkedom doesn't render — worth an eyeball in the browser.

Replaces the CSS-grid column header + <details>/<summary> rows (which
needed three PRs to keep aligned) with a proper <table>: fixed layout +
explicit widths on the narrow columns align the cells for free, and a
sticky <thead> stays put while the rows scroll.

Each frame is its own <tbody class="frame-row">: a <tr.frame-summary>
of <td>s that toggles a hidden <tr.frame-detail> (click or Enter/Space,
with aria-expanded). Idle separators and refusal notices are their own
single-cell <tbody> rows. Filtering, the clear button, RTT, and the
raw-bytes panes are unchanged.
@Kinflou
Kinflou merged commit 46ea5bc into master Sep 4, 2026
2 checks passed
@Kinflou
Kinflou deleted the feat/frames-table branch September 4, 2026 13:14
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