fix(dashboard): one stated rule for small-size spinners - #4085
Conversation
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
UX Review (Fable 5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS A pure spinner-glyph consistency sweep — size-keyed, documented, and test-enforced; no copy, flow, or state a user interacts with changes. [UX-REVIEWED] fa79d54 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- website/src/test/spinnerGlyphRule.test.ts:13 -- |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of I have everything the contract requires: intent, full inventory, counted siblings/consumers against the base tree, and verified the guard-test convention already exists in-repo. Emitting the review. First-Principles-Verdict: CONCERNS The rule and sweep earn their place, but eight What this change shipsIntent: make small loading spinners legible and uniform by adopting one size-keyed glyph rule — a FIX (closes #3925).
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] fa79d54 |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS A real, issue-backed inconsistency, fixed with a stated rule plus a two-directional guard — consistent with this repo's existing source-pin test idiom. Watch
Suggestions
[DESIGN-REVIEWED] fa79d54 |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
ac8489a to
7a7cb3c
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
2 similar comments
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
7a7cb3c to
284dc91
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
Head branch was pushed to by a user without write access
284dc91 to
fa79d54
Compare
) `LoaderCircle` (exported as both `Loader2` and `LoaderCircle`) draws a single 2px-stroke arc spanning ~270 degrees of a circle. At 10-14px that stroke is thick relative to the radius and the gap is roughly a sixth of the glyph, so it reads as a broken ring rather than as motion. kirodotdev#3905 swapped the one row it touched to lucide `Loader`, whose eight discrete spokes stay legible at that size, and its review made the sharp point: the stated cause is a property of the ICON at small sizes, not of that row, so it indicts every small spinner in the app. The rule, adopted from the issue's option 1 and written down in `website/docs/page-layout.md`: Below 15px use `Loader`. At 15px and above use `LoaderCircle`. Applied to every spinner with a DECLARED size below 15px (68 sites across 46 files), and in the other direction too: three `<Loader size={16|20}>` in ChatPage move to `LoaderCircle`, because a rule enforced one way only would let the spoke glyph spread upward and leave two spinners at one size again. `src/test/spinnerGlyphRule.test.ts` enforces both directions and pins the threshold to the doc, so the next call site has something to check against rather than re-litigating the choice. Two scope boundaries, both stated rather than left implicit: - A spinner sized by CSS is out of scope. `lucide-inline` is `width: 1em`, so it follows the surrounding font size and has no size to check statically; those stay on `LoaderCircle` rather than being guessed at. - The `Loader2` alias is left alone where it is not a small-size site. Retiring it in favour of the one canonical `LoaderCircle` name is worth doing, but it is a rename across ~40 unrelated sites and belongs in its own change. The third assertion exists because the size-keyed sweep MISSED a class: a spinner passed as a VALUE (`{ Icon: Loader2 }` in a phase/status map) has its size at the `<Icon size={13} />` render site instead, so four such maps went unconverted -- two of them breaking at runtime rather than in review. That case is now checked rather than remembered. - `spinnerGlyphRule`: 4 passed; all four fail on main. - Full `vitest run`: 20959 passed, 1328 of 1329 files. The one failure is `CronFolderHeader.cov80.test.tsx`, the known parallel-load flake. - `tsc --noEmit` clean; eslint 0 errors.
Head branch was pushed to by a user without write access
fa79d54 to
afa168f
Compare
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
Problem / Motivation
Small loading indicators use
Loader2/LoaderCircleinconsistently, and the arc glyph becomes difficult to read at 10–14px. The repository had no stated rule or regression guard.Why it matters
These indicators appear throughout dense dashboard controls. Inconsistent glyph selection makes equivalent states look different, while undersized arc spinners read as broken rings instead of motion.
What changed (motivation → approach → change)
Adopt one size-based rule: below 15px use lucide
Loader; at 15px and above useLoaderCircle. The change documents that rule, applies it across explicit-size call sites, covers spinner components stored in icon maps, and adds a source-level guard. CSS/1em-sized spinners remain outside the static rule because their rendered size is contextual.Tests
spinnerGlyphRule.test.ts: four assertions cover sub-15px sites, 15px-and-up sites, icon maps, and the documentation pin.Manual verification
Reviewed the affected spinner sizes and confirmed the rule preserves
LoaderCircleat normal sizes while using the spoke glyph only where the arc loses legibility.Screenshots / video
N/A — this is a repository-wide consistency sweep of existing loading states; no layout or interaction changed.
Related Issues
Closes #3925
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
N/A — repository placeholder; no CLA text has been supplied.