Repository navigation
fix: layout-shift audit of the panel, store and quota-history hardening - #42
Merged
Merged
Conversation
- Auth stores reject delete paths outside the managed auth directory (file, git, object and Postgres stores) and write auth files atomically. - bbolt KV store refuses reads and writes after Close instead of racing it; plain sets skip the existence check NX/XX need. - Quota history: History holds the store open while it reads, plan caches reset when recording stops or moves, a future last-sample time no longer delays the first poll, day durations reject NaN/Inf/overflow, and the scan bound cannot overflow. - Session-affinity snapshots are deleted once expired; a failed local KV store disables affinity persistence instead of leaving it half on. - Postgres store: pooled connections are bounded and closed on exit; the refresh journal ensures its schema before reads and completions. - Object refresh journal always removes its capability probe; cooldown and Meta token temp files are 0600 and fsynced before rename. - Codex websocket SOCKS dials honour the request context; Codex/OpenAI thinking appliers mutate an ojson.Doc as the conventions require. - Server exit tests run the child without a controlling TTY. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audited every panel route at 390px and 1440px on a throttled connection with the cache disabled, then clicked through the main flows. Fixes target each cause: - Skeletons take the loaded size: dashboard stat tiles are real Stat tiles with inline skeletons and a reserved hint line; the accounts table skeleton has its header, last row count and last height; pool panels and the first pool keep their last height (useRememberedSize/lastLayout); the model-rules rail skeleton matches the phone chip row. - Data-dependent rows render while loading: provider tab rows, pending tab counts (count: null), toolbar summaries, the Connect key row and hint, the routing model line, and header actions. - Live text cannot re-wrap: one-line quota summary (attention first), one-line pool meta with the stale badge standing in for the time, dashboard window as a title pill, fixed-basis section headers, logs readouts with fixed boxes, tabular digits panel-wide. - Buttons keep their width while loading (spinner over a hidden label); the plugin update dot no longer widens its tab. - The pool chart measures its width before paint (it painted 80px too tall on phones first), and pools are not dropped before history answers. - The accounts bulk-action bar floats in a sticky dock instead of pushing the rows down under the pointer. - Sidebar plugin pages and other layout facts are remembered per viewer. DESIGN.md records the layout-stability rules. The dev fixture accepts &latency=<ms> to reproduce slow data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up from clicking through every main flow at 390px and 1440px: - StableLabel lays out every alternative of a toggling label in one cell, so Hide/Show emails, Pause/Resume, Copy/Copied, Read now/Refresh, Cancel/Close and the login connection toggle never change width. - Quota span control: Today is always laid out (hidden on today's span) and Chart options is icon-only on phones, so stepping the span never wraps the toolbar and drops the pools 36px. - Pool accounts table uses a fixed layout with header widths, so live countdowns and credit counts no longer re-balance its columns. - Connect key box is sized by the row, not the key text, so revealing the key does not move Copy or re-wrap the row. - Provider tiles keep a badge-high caption line when a sign-in status replaces it. - The YAML editor shows once CodeMirror has measured its lines, so line numbers no longer jump when the tab opens. - Excluded-model rules show placeholder match lines and hold the chip row's last height while a provider's catalog loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit of the panel, backend and stores.
Panel: layout shifts
Loaded every route at 390px and 1440px over a throttled connection ("Slow 4G", cache disabled, 4x CPU on mobile) against the real hub's quota-history snapshot, recorded every
layout-shiftentry, then clicked through the main flows. Worst load score before: quota page on mobile, 0.29.After: a returning viewer records no shifts on any route at either width; the remaining first-visit shifts come only from layout the browser has not seen yet (row counts, panel heights, plugin pages). Clicks no longer move nearby controls.
Causes fixed:
Stattiles with inline skeletons, accounts table header/rows/height, pool panel and first-pool heights remembered per breakpoint viauseRememberedSize/utils/lastLayout).count: null, toolbar summaries, Connect key row and hint, routing model line, header actions).StableLabelfor toggling labels, Today always laid out, icon-only chart options on phones, Connect key box sized by the row, provider-tile caption line.DESIGN.mdrecords the layout-stability rules; the dev fixture takes&latency=<ms>.Visible changes: quota summary truncates on phones (attention first; tabs repeat the counts), a stale pool badge replaces the "Last reading" time (time in its tooltip), dashboard window is a title pill, "Chart options" is icon-only on phones, digits are tabular everywhere.
Backend / stores
Close; quota-history reads hold the store open; plan caches reset when recording stops; duration parsing rejects NaN/Inf/overflow.ojson.Doc.Verification
go test ./...,go vet,make lint,make test-web(2257 tests, lint, build) pass.🤖 Generated with Claude Code