feat(ui): adopt the designed loading treatment - #322
Conversation
Ports the loading state from the "BoloDB App" design (Claude Design project 777adb72) to LoadingScreen, replacing the card-with-orbit-rings treatment. The design's loader is the BoloDB mark drawing itself: four shapes sharing one stroke-dash animation on a 0.15s stagger, so the bubble outline, the disc and the two bands appear in the order you would draw them by hand. Under it sits a label and a 120x1px progress line. No card, no blobs, no spinner -- the mark carries the motion, and the radial brand glow from the design sits behind it. Kept deliberately compatible: - message/submessage/variant are unchanged, so all five call sites work as they are. The design uses one treatment for every loading context, so variant no longer swaps the mark; it stays in the signature rather than breaking callers, and submessage renders under the label. - New optional `progress` (0-100) drives the determinate bar the design specifies. Left unset the bar sweeps, because none of the current call sites have real progress to report and inventing a percentage that jumps to 90% and waits is worse than an honest indeterminate bar. Added a prefers-reduced-motion path the previous component did not have. The mark is the only thing signalling "still working", so it keeps a slow opacity pulse rather than freezing outright. Verified in the browser against dark and light themes: every token the design uses (--brand, --ink-2, --faint, --border, --glow-rgb) already exists in layout.css for all themes, so the mark picks up brand blue on dark and brand green on light with no new variables. Confirmed the SVG resolves correctly when fully drawn by freezing the animation. svelte-check reports 0 errors and the production build succeeds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🤖 CodeAnt AI — Review Status
|
📝 WalkthroughWalkthrough
ChangesLoading screen
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/lib/components/ui/LoadingScreen.svelte (1)
89-95: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd ARIA progressbar semantics to the
.trackelement.The
.trackelement visually represents progress but exposes norole="progressbar"oraria-valuenow. Screen reader users only get the staticaria-label={message}from the root region; they cannot perceive the actual percentage in determinate mode, or that the operation is ongoing but unmeasured in indeterminate mode. WAI-ARIA guidance states that a progressbar should providearia-valuenowwhen the value is known and omit it when indeterminate.♻️ Proposed fix to expose progress state to assistive technology
<div class="track"> + <div + class="track" + role="progressbar" + aria-valuemin="0" + aria-valuemax="100" + aria-valuenow={determinate ? Math.round(pct) : undefined} + > {`#if` determinate} <div class="fill" style="width:{pct}%"></div> {:else} <div class="fill sweep"></div> {/if} </div>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/lib/components/ui/LoadingScreen.svelte` around lines 89 - 95, Update the `.track` element in the loading screen to add `role="progressbar"` and expose `aria-valuenow` as `pct` only when `determinate` is true; omit `aria-valuenow` in indeterminate mode while preserving the existing root `aria-label` and visual fill behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@frontend/src/lib/components/ui/LoadingScreen.svelte`:
- Around line 89-95: Update the `.track` element in the loading screen to add
`role="progressbar"` and expose `aria-valuenow` as `pct` only when `determinate`
is true; omit `aria-valuenow` in indeterminate mode while preserving the
existing root `aria-label` and visual fill behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 55376bee-422a-44d6-a4ca-c1dff7b86161
📒 Files selected for processing (1)
frontend/src/lib/components/ui/LoadingScreen.svelte
User description
Ports the loading state from the BoloDB App design (Claude Design project
777adb72,BoloDB App.dc.html) intoLoadingScreen.What the design specifies
The loader is not a spinner — it's the BoloDB mark drawing itself. Four shapes share one
stroke-dasharray/stroke-dashoffsetanimation on a 0.15s stagger, so the bubble outline, the disc and the two bands appear in the order you'd draw them by hand:Under it: a 14px/600 label in
--ink-2and a 120×1px progress line. No card, no blobs, no orbit rings — the mark carries the motion, with the design's radial brand glow behind it.Worth noting for anyone searching the design file: it contains no "loader", "spinner" or "skeleton" anywhere. The loading state is the
connectingbranch of the onboarding screen.What changed
Replaced the previous card-with-orbit-rings-and-dots treatment. Kept deliberately compatible:
message/submessage/variantunchanged — all five call sites (AskScreen ×2, ConnectScreen, profile, workspaces) work as-is with no edits.variantno longer swaps the mark. The design uses one treatment for every loading context. It stays in the signature rather than breaking callers — flagging that explicitly since it's now inert.progress(0–100) drives the determinate bar the design specifies. Left unset, the bar sweeps — none of the current call sites have real progress to report, and inventing a percentage that jumps to 90% and waits is worse than an honest indeterminate bar.Also added a
prefers-reduced-motionpath the previous component lacked. The mark is the only thing signalling "still working", so it keeps a slow opacity pulse rather than freezing outright.Verification
Rendered both states side by side in a throwaway route (removed before commit) and checked in the browser:
Every token the design uses (
--brand,--ink-2,--faint,--border,--glow-rgb) already exists inlayout.cssfor all themes, so this needed no new variables.Because a self-drawing animation is mid-stroke in any given screenshot, I froze it via injected CSS to confirm the SVG geometry resolves correctly when fully drawn — it does.
svelte-check: 0 errors. Production build (adapter-static): succeeds.support.jsfrom the design project was read as instructed — it's the generated dc-runtime that interpretssc-if/sc-for/{{ }}, i.e. tooling rather than design content. Nothing to port from it; it only confirmed the template semantics for translating to Svelte.🤖 Generated with Claude Code
CodeAnt-AI Description
Replace the loading card with a focused brand-mark animation and clearer progress feedback
What Changed
Impact
✅ Clearer loading status✅ Visible upload or connection progress✅ Reduced motion for accessibility💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
New Features
Style