Repository navigation
Studio: resizable Model hub split view, smaller row kebab, centred token icon - #13966
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 409c536db5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onPointerCancel={endDrag} | ||
| onLostPointerCapture={() => { | ||
| if (dragRef.current) endDrag(); | ||
| }} |
There was a problem hiding this comment.
Reconcile the width when a drag is cancelled
After a drag has painted --hub-split-list-width directly onto the pane, a pointercancel or unexpected loss of pointer capture only calls endDrag; it neither commits pendingRef.current nor restores the width held in React state. In those cancellation scenarios the pane therefore remains at an unpersisted width, while subsequent keyboard input and reloads use the old value and make it jump. Restore the committed CSS variable or commit the pending width before ending the cancelled drag.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7139d14: pointercancel and lost capture now go through the same commit path as release, so the painted width is stored.
| if (event.key === "ArrowLeft" || event.key === "ArrowRight") { | ||
| event.preventDefault(); | ||
| const step = event.key === "ArrowRight" ? RESIZE_STEP : -RESIZE_STEP; | ||
| onWidthChange(clamp((width ?? limits().now) + step)); |
There was a problem hiding this comment.
Resize from the rendered width after viewport clamping
When a saved width exceeds the current maximum after the window narrows, CSS displays the pane at limits().max but width still contains the larger persisted value. The first arrow-key press is calculated from that hidden value and then clamped back to the same visible maximum, so it does not resize by the advertised 16 px and also overwrites the wider saved preference. Base keyboard resizing on the rendered limits().now value instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7139d14: arrow keys step from the rendered width (keyboardSplitWidth), with a regression test.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…13991) ## Summary `Frontend build + bundle sanity` is red on main again. #13969 merged with it red, and its run reported `over the startup budget: transfer 1995.0 KB > 1994.7 KB, raw 6633.8 KB > 6632.7 KB`. Main at 6106de9 measures 6,796,799 B raw / 2,044,202 B transfer, against limits of 6,792,425 / 2,042,777. Measured commit by commit (one machine and build, Node 24, 95 chunks throughout, `rm -rf dist` before each build): | commit | raw B | transfer B | |---|---|---| | 1790106 (#13983, last raise from me) | 6,791,768 | 2,042,404 | | 7d33eff (#13965) | 6,792,034 | 2,042,515 | | cc0cb59 (#13966) | 6,792,447 | 2,042,693 | | 7bee02d (#13969) | 6,793,737 | 2,043,138 | | ce83dee (#13973) | 6,796,298 | 2,044,201 | | 6106de9 (main, after #13974, #13972, #13951, #13945) | 6,796,799 | 2,044,202 | The two largest steps: - Inline chat markdown tables with hover controls and the expand dialog (#13973): +2,561 B raw / +1,063 B transfer, in the eager chat chunk. - Latest Unsloth Models ranking (#13969): +1,290 B raw / +445 B transfer. #13945 already raised the budget for its own 497 B. ## Change The budget is set to the measured build plus the margin main had at 1790106 (160 B raw, 189 B transfer), with the per-commit numbers recorded beside the limits as in the earlier raises. If #13973's expand dialog should be lazy-loaded instead, that is a follow-up for its owner. This only gets main and every open PR off a red that none of them caused. ## Testing - `npm run build && npm run bundle:check` on main with this change: within budget (0.2 KB transfer, 0.2 KB raw to spare). Without it: over by 4,374 B raw / 1,425 B transfer. - `tests/bundle-budget-cli.test.ts` and `tests/bundle-budget-closure.test.ts`: 43 passed. - `prettier --check scripts/check-bundle-budget.ts`: clean.
What changed
Draggable split divider. In the Model hub split layout (Discover and On Device), you can now drag the vertical line between the model list and the detail panel to resize the two panes.
localStorageunderunsloth.hub.splitListWidth, next to the other Hub layout preferences (unsloth.hub.allModelsView). Both tabs share it.role="separator"witharia-valuenow/min/max.acquireDragOverlay) for the cursor and hit testing.clamp(460px, 32%, 620px)/max-w-[44%]default. Belowlgthe layout stays stacked as before, and the divider is not shown.The existing
ResizablePanelGroup(react-resizable-panels) was not used here. It needs the panes inside a Group, which would change the tree between split, card and compact layouts and remount the catalog (losing scroll and state) on every layout switch. A small handle on the existing pane avoids that.On device row kebab. On Device rows had a 32 px kebab hover background, almost the full height of the row. It is now 24 px, round, with a 14 px icon, the same as the kebab on the detail panel's variant card (
gguf-download-card.tsx).Verification
npm run typecheck,npm test(12475/12475),npm run buildpass.biome checkreports no new diagnostics in the touched files. The repo-wide baseline is unchanged.UNSLOTH_STUDIO_HOME, own port), driven with Playwright at 1440 and 1920 px wide, on both Discover and On Device:scrollWidth == clientWidthon the page).Screenshots
Discover at 1440 px, divider dragged to the minimum (left) and maximum (right):
On Device at 1440 px, the same two extremes:
On Device row kebab on hover, 32 px before and 24 px after:
Token indicator at the worst-case zoom and UI scale combinations, before and after:
Not tested here
Touch and pen dragging (the pointer events are the same, but untested). Desktop (Tauri) webview, which should behave the same as Chromium.
Token indicator centring. The red "set a token" circle next to the transport toggle drew its shield glyph as an inline SVG on top of a CSS background. The two snap to the pixel grid separately, and the old fixed
-0.5pxnudge assumed one scale, so at fractional interface scales or browser zoom the glyph sat up to about 1px left of centre. The disc and the glyph are now one SVG, so they always line up. The glyph geometry is already centred in its 24-unit box, so the nudge is gone.Measured as the glyph's ink centroid against the disc centre across browser zoom 0.67x to 2x and UI scale 0.7 to 1.3 (30 combinations): largest offset went from 1.06 to 0.26 CSS px, and the mean from 0.58 to 0.05 px horizontally. The token-set and hover states were checked in dark and light themes.