Repository navigation
feat: opt-in chat table breakout and resizable columns - #15547
Conversation
First Principles Review (Fable 5) — ✅ human override accepted@buluoray overrode this lane for |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS A reader's Widen press and column drags silently revert on ordinary scrolling: VirtualTranscript unmounts off-window rows, and both choices live in the row's Watch
Suggestions
[DESIGN-REVIEWED] f8e1b6a Description read[DESCRIPTION-READ] f0f8a763368393f3c121f9fa6ebe9471195b17c16100fa5678a95100bc68d491 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Over-dragged columns clip cell text with no visible scroll cue — the blind reader called the table "broken", seeing no way to read the hidden text. Watch
[UX-REVIEWED] f8e1b6a Description read[DESCRIPTION-READ] 66a7b4fe7140e5fed96993fbab075388c864825afe5c439edb01197569e41ad7 That sha256 names everything this verdict read: the PR description, plus the 8 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
95b647e to
b11e18b
Compare
|
Dispositions for the review of GPT 5.6 BLOCKING (ArrowRight can shrink naturally wide columns): fixed. Confirmed: a column auto layout set wider than Design Review CONCERNS (opt-out |
|
UX Review (CONCERNS,
|
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsThe Widen toggle's state is row-local in a virtualized transcript, so the reader's choice is dropped on scroll — advisory, not blocking. FINDING — website/src/components/markdown/MarkdownTable.tsx:73 — [OPUS-REVIEWED] f8e1b6a Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
b11e18b to
1a89c53
Compare
1a89c53 to
a1fc031
Compare
|
Rebased onto main. #15509 already keeps a crewmate (bordered) bubble's table inside its card via |
a1fc031 to
e072c41
Compare
Human judgment recorded@buluoray marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
992b7a1 to
de3a6d1
Compare
|
Rebased onto main to clear a conflict with #15850 (table overflow fade). Merge: the table node feeds both the overflow fade ( |
|
Dispositions for
Inherited reds: Frontend Tests (1)/(2), Frontend Coverage Merge and Coverage Gate fail on main too (#14807 cross-merge); the fix is #16210. Not patched here. |
|
/ai-review override fable de3a6d1: maintainer decision — the per-table action row keeps three controls (Expand, Copy Markdown, Copy CSV) as one compact table toolbar; opt-in expand needs its own visible control and merging the copy buttons into a menu was considered and rejected |
Human judgment recorded@buluoray marked the fable AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
de3a6d1 to
203b303
Compare
A top-level assistant table now keeps the reading column's width by default. A Widen toggle beside the copy actions (keyboard-operable, aria-expanded, i18n, a 40px target on touch) widens it into the pane's spare width, and a second press (Narrow) restores it. The accessible name and title flip with the visible word. The toggle is gated on a top-level table in an unbordered bubble and a viewport at least 880px wide; the gate is the viewport, not the pane, so in a narrow split pane on a wide screen it shows but cannot widen past the pane. Columns are resizable from a grip on each header cell's right edge. The first drag freezes the auto-laid-out widths (rounded up) and switches the table to fixed layout, so widening a column widens the table and never squeezes a neighbour. Widths live for the rendered message only. A table's grips are one roving tab stop: ArrowUp/ArrowDown move between them, ArrowLeft/ArrowRight resize, Enter or double-click resets. Touch devices get no grips, so a horizontal swipe still scrolls the table. Only the header boxes are observed, measured at most once per frame.
|
GPT 5.6 on
Related test files pass (75), |
|
Dispositions for
|
Human judgment recorded@buluoray marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
iamwhatever
left a comment
There was a problem hiding this comment.
Re-reviewed at f8e1b6a; all five points fixed. Each table is one roving tab stop (useMarkdownTableColumns.tsx:96-99, 177-193), touch devices get no grips while a mouse on a touchscreen laptop still does, the change check compares width and label, and only the header and its cells are observed, measured at most once per frame. The feature-map row is updated, and new tests cover a pointer drag, a motionless click, the round-up width and the observed elements. setTable feeds both tableRef and #15850's attachTable (MarkdownTable.tsx:63-69), so the overflow fade still tracks the table. Clearing my request.
Problem / Motivation
Goal: Chat tables stay at the reading column's width unless the reader asks for more, and the reader can resize any chat table's columns.
Today every top-level assistant table automatically spreads into the pane's gutters (#13066). A short table then sits wider than the prose around it, and the reader has no say in it. A wide table can be scrolled, but a cramped column cannot be widened.
Why it matters
The reader decides how much room a table takes. Prose and tables line up by default, a wide table is one press away from the pane's full width, and a cramped column can be dragged wider wherever a table renders, including inside a crewmate bubble, which keeps its tables in the card (#15509).
Not a goal
What changed (motivation → approach → change)
index.cssbreakout width rule now applies only to.markdown-table[data-expanded].MarkdownTableowns anexpandedstate (off by default) and a new Widen toggle in its action row, beside the copy buttons. Its visible word flips Widen/Narrow (width words, not "Expand", which this app uses for disclosure), the accessible name andtitleflip with it ("Widen table"/"Narrow table") so a voice-control user can say what they see,aria-expandedcarries the state, and its strings use i18n in all 12 locales. It shares the row's touch treatment (HOVER_NONE_ACTIONS_ROW_CLS): always visible with a 40px target on touch, and on desktop it shows on hover or keyboard focus. The toggle isdisplay: noneexcept on a top-level table in an unbordered transcript bubble (the breakout selector) on a viewport at least 880px wide; below that, the pane minus the rail band is no wider than the reading column. The gate is the viewport, not the pane, so in a narrow split pane on a wide screen the toggle shows but cannot widen the table past the pane. The bubble'soverflow: visible/flow-rootrules stay unconditional, so row heights and the raw-view height contract are the same in both states.useMarkdownTableColumns, used byMarkdownTable.useTableColumnWidthsdoes not fit, because it assumes declared px defaults and a markdown table has none. So the table stays on auto layout until the first drag. That drag snapshots the laid-out widths (rounded up, so no header label that fitted gets clipped) and switches totable-layout: fixedwith a<colgroup>. Widening a column widens the table, and the wrapper's existing scroll absorbs it. The grips reuseColumnResizer(ARIA splitter, Enter or double-click resets) as an overlay inside the scroll wrapper at each header cell's right edge. With no real layout (SSR/jsdom) no grips render, and when every column is reset the table returns to auto layout.ColumnResizergains optionaltabIndex/onFocus/onNavigateprops; existing callers are unchanged.useIsTouchDevice) gets no grips. A 6px strip can't be hit with a finger, and itstouch-action: nonewould swallow a horizontal swipe. On touch, the Widen toggle and the wrapper's horizontal scroll are the way to read a wide table.theadand its header cells are observed, not the table, which grows every frame while a reply streams. Observer bursts collapse into one measurement per frame. The span check visits only cells that declare a span. A width change is detected even when no right edge moved.colspan/rowspancell or a multi-row header gets no grips and keeps auto layout. One grip per first-rowthwould otherwise map widths onto the wrong logical columns.ColumnResizer's faint "all boundaries" hint now also lights when a.markdown-table's header is hovered, because those grips sit outside thethead.scripts/capture-chat-table-breakout.mjsnow asserts the default prose width and where the toggle is visible, then expands before running the existing breakout and turn-rail geometry checks.Backwards compatibility
This is a deliberate default change: a top-level transcript table no longer breaks out until the reader presses Widen. Expanded geometry is identical to before. The renderer goldens gain the toggle button in each table's action row, and nothing else in their output changed.
Tests
chatTableBreakout.test.tsx: no ungated breakout width rule exists. The default table has nodata-expanded. One press sets it along witharia-expanded="true", the Narrow word, and the "Narrow table" name and title; a second press restores "Widen table". Reverting the name/title flip turns it red. The toggle is hidden by default and only revealed by the top-level selector at ≥880px. Each test was mutation-checked: dropping the[data-expanded]gate, the click toggle,aria-expanded, or the hidden-by-default rule turns it red.MarkdownTable.columnResize.test.tsx(stubbed layout) covers:getBoundingClientRectstub)Each of these was mutation-checked too.
Locally: the 51 test files that touch markdown tables,
ColumnResizeror i18n pass (837 tests).tsc -b, eslint andi18n:check(diff-scoped against main) are clean.Manual verification
scripts/capture-chat-table-breakout.mjswas run against a local Vite server (Chromium, light and dark themes, SDK and main hosts, at 1500, 1100, 768, 390, 320 and back to 1500px). The default table matched the prose width at every width. The toggle showed at 1100 and 1500 only. After Widen, every existing breakout, turn-rail, raw-view and MCP-overlay assertion passed. Column-drag behaviour was verified earlier in the same harness: Signal widened by the drag distance, and the other columns stayed within a pixel.Not run: the full frontend suite locally (left to CI) and a live gateway pod.
Screenshots / video
Default: the table keeps the reading column's width (hovered, so the Widen toggle shows)
Expanded: after pressing Widen, the table uses the pane's spare width and the toggle reads Narrow
Column grips on header hover: each column edge shows a grip while the header row is hovered
After a drag: the first column widened by dragging its grip; the table switches to fixed layout and scrolls horizontally inside its own wrapper instead of widening the message
Keyboard: a grip focused from the keyboard shows the accent focus state; ArrowRight widened the column further
Recording: widen, narrow, then a pointer drag on a grip (captured before the label rename, so the button still reads Expand/Collapse; behaviour is unchanged)
expand-collapse-resize.webm
Related Issues
Builds on #13066 and #15509.
Pattern harvest
Not generalizable: a feature change with no recurring defect shape.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement