Skip to content

feat: tool-panel pane resizing and column auto width (SP5) - #539

Merged
blove merged 11 commits into
mainfrom
blove/tool-panel-resize-autosize
Aug 30, 2026
Merged

blove merged 11 commits into
mainfrom
blove/tool-panel-resize-autosize

Conversation

@blove

@blove blove commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

The last two items on the tool panel's designed-for shelf. Spec: docs/superpowers/specs/2026-08-30-tool-panel-resize-autosize.md.

Pane resizing — a drag handle on the pane/grid seam:

  • Live pointer resize (capture at pointerdown, Escape-cancel, double-click reset) and full keyboard parity: role="separator" with a coherent aria-value* range at all times (a review catch — a focusable separator MUST carry aria-valuenow; the unmeasured fallback degrades to a collapsed range, never ARIA's implicit 50/100), arrows ±16 direction-aware (RTL rows mutation-pinned), Home/End, Enter reset.
  • The surface's assert-and-report trio: defaultPaneWidthPx / paneWidthPx / onPaneWidthChange, clamped everywhere (MIN = 186px, measured against the filters section's narrowest usable control — method recorded in the constant's comment; max from a ResizeObserver, degrading to no-ceiling when unmeasured, never an invented number).
  • No inline style until someone acts: untouched panes keep the stylesheet width, so the documented CSS override keeps working; reset restores it.

Auto width — built on a semantics correction: a mid-arc browser verification proved auto width is a mode bit ("let the grid manage this width"), not a content fit — nothing measures cell content anywhere in the column-width path. So:

  • The columns section's row menu (renamed ColumnPinMenu → ColumnRowMenu) gains a menuitemcheckbox "Auto width" toggle that stays open on toggle, wired through the new public setColumnAutoWidth(columnId, auto); the docs say grid-managed width, name the flex pairing, and state the 140→160 jump plainly. The e2e pins the NEGATIVE (content changes must not move an auto column's width).
  • Reset columns now restores the initial auto set (audit found the drift — Reset was a half-reset).
  • The planned "Auto-size all" footer was dropped: its value was predicated on the content-fit myth.

Rebased onto #537's modernized architecture (classic-runtime JSX conventions adopted; all its new gates green: packed consumers, React 18+19 compat, publint/attw).

Test plan

  • Every task TDD'd red-first with mutation checks run by implementer AND reviewer (direction inversion → exactly the 8 rtl rows; clamp drop → the clamp-report pair; inverted checked derivation; constant column id; guard-roster reach ×3).
  • react 1643, ui 99, website 606, all package suites, api:check, lint, typecheck, format, consumer:check, react:compat green post-rebase; e2e 52/52 both browsers (three pre-rebase runs + one post-rebase).
  • Follow-ups filed rather than smuggled: autosizeColumns rename + 140/160 unification; column-layout.mdx documents a nonexistent autosizeColumn with the content-fit myth (pre-existing drift).

🤖 Generated with Claude Code

blove and others added 11 commits August 30, 2026 14:18
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
B2: the public handle gains setColumnAutoWidth(columnId, auto) beside
setColumnWidth — true puts the column in the live auto-width set, false
makes it manual at the engine's current stored width. setColumnWidth
still flips auto off and autosizeColumns keeps its all-columns meaning;
both pinned by test.

B4 audit verdict: Reset restored pin/visibility/order but left auto-mode
drift — a half-reset. The surface now captures the mount-time auto set
(read from the store's own state, so the no-declared-widthPx rule keeps
one home) beside the layout baseline, and Reset replays it through the
new setter. The facade also carries an internal ɵautoWidths read seam
for chrome that must reflect membership (the SP5 kebab toggle's future
subscription).

jsdom observes the set at its real seam: mergeRenderColumns strips
widthPx for auto columns, so the drawn header width follows the
renderer's fallback (140) for auto and the engine store for manual —
content-driven pixels stay with Task 4's e2e.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… fit

Verified in a real browser: nothing measures cell content in the
column-width path. B3 (auto-size-all footer) dropped; the toggle and
docs say grid-managed width; the 140→160 jump documented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… range (SP5 review)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
B1: the kebab menu gains a role=menuitemcheckbox "Auto width" item,
checked from a live subscription over the facade's ɵautoWidths seam and
writing through setColumnAutoWidth. The item is a mode bit ("let the
grid manage this column's width"), never a content fit, and toggling
stays open — the native menuitemcheckbox pattern — while the pin items
keep their select-and-close command semantics.

B5: ColumnPinMenu sheds its stale name for ColumnRowMenu (it now holds a
non-pin item); ColumnPinMenuMessages follows. New message key
toolPanelAutoWidthLabel in the three established places. The Task 1 test
header's lingering "content-tracking mode" phrase is corrected to the
amended spec's mode-bit wording. B3 (auto-size-all footer) is dropped
per the amended spec.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e (SP5)

The tool-panel page gains a Resizing-the-pane section (drag, keyboard,
bounds, and the A5 stylesheet-vs-inline-width interplay), the width trio
joins the Configuration table, the columns section documents the Auto
width toggle in the mode-bit wording (including the 140→160 jump), and
the two new message keys are named and bound in the docs guard's roster
(mutation-verified: dropping the roster entry, retyping a table cell,
and unnaming a key each fail the guard). setColumnAutoWidth's TSDoc
sheds the pre-amendment content-tracking phrasing for the same mode-bit
wording. Changesets: @pretable/react minor, @pretable/ui patch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…h, message keys)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pretable Ignored Ignored Aug 30, 2026 9:26pm

Request Review

@blove
blove enabled auto-merge (squash) August 30, 2026 21:26
@github-actions

Copy link
Copy Markdown
Contributor

Vercel preview ready

Preview: https://pretable-lk6blm8nc-cacheplane.vercel.app
Commit: 77cbf58c8dd4338a6a15ef1c87243a4a233bde06

Updated automatically by the deploy-preview job.

@blove
blove merged commit ac1cbb4 into main Aug 30, 2026
21 checks passed
@blove
blove deleted the blove/tool-panel-resize-autosize branch August 30, 2026 21:43
@blove blove mentioned this pull request Aug 30, 2026
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