Skip to content

feat(ui): add loading feedback for slow actions across the app#7

Merged
martinezharo merged 2 commits into
mainfrom
claude/eloquent-mayer-rosqqe-loading-feedback
Jun 25, 2026
Merged

feat(ui): add loading feedback for slow actions across the app#7
martinezharo merged 2 commits into
mainfrom
claude/eloquent-mayer-rosqqe-loading-feedback

Conversation

@martinezharo

Copy link
Copy Markdown
Owner

What

Add modern, lightweight loading feedback across the web so actions that take a moment (network round-trips, storage reads, off-page redirects) never look frozen.

Changes

New Spinner primitive (src/ui/Spinner.tsx) — a thin SVG ring that inherits currentColor, so it adapts to whatever button/toast/empty-state it sits in and stays crisp at any size, matching the brand's thin-stroke aesthetic.

Auth actions (useAuth + sidebar header)

  • useAuth now exposes signingIn / signingOut pending flags.
  • The sign-in button shows a spinner + "Signing in…" and stays in that state through the off-page GitHub OAuth redirect (cleared only on error so it can be retried).
  • The sign-out button shows a spinner while the Supabase session and local data are cleared.
  • Both buttons are disabled (and re-entrancy guarded) while busy.

First app load (KlipCodeApp)

  • While the initial IndexedDB workspace read is pending, the app shows a centered spinner + "Loading…" instead of a blank shell on a cold start / large workspace.

Landing page CTAs (AppCtaLink)

  • The "Open app", hero, and final CTAs use Next 16's useLinkStatus to flip their trailing arrow into a spinner the instant they're clicked — navigating into the app shell is a real round-trip on first visit, so the button now reflects that immediately.

i18n — adds auth.signingIn / auth.signingOut to both en and es dictionaries (kept structurally identical; dictionary-shape test passes).

Verification

  • pnpm test — 87 passing
  • pnpm lint — 0 errors (only pre-existing warnings)
  • npx tsc --noEmit — clean
  • pnpm build — succeeds (RSC boundary + React Compiler happy with the new client component)

🤖 Generated with Claude Code

https://claude.ai/code/session_01XFQW9aw6XqpwkQUScq3ogU


Generated by Claude Code

Surface progress for the actions that round-trip to the network or storage so
they never look frozen:

- New `Spinner` UI primitive (currentColor SVG ring) used everywhere below.
- Auth: `useAuth` now tracks `signingIn` / `signingOut`. The sidebar sign-in
  button shows a spinner + "Signing in…" through the off-page GitHub redirect
  (cleared only on error so it can be retried), and sign-out shows a spinner
  while the session and local data are cleared. Both buttons disable while busy.
- First load: KlipCodeApp shows a centered spinner while the initial IndexedDB
  workspace read is pending, instead of a blank shell on a cold start.
- Landing: the "Open app" / hero / final CTAs use Next's `useLinkStatus` to flip
  their arrow to a spinner the moment they're clicked, since navigating into the
  app shell is a real round-trip on first visit.

Adds `auth.signingIn` / `auth.signingOut` to both locale dictionaries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFQW9aw6XqpwkQUScq3ogU
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
klipcode 2e3ca25 Commit Preview URL

Branch Preview URL
Jun 25 2026, 11:57 AM

@martinezharo martinezharo merged commit 15b9046 into main Jun 25, 2026
1 check was pending
@martinezharo martinezharo deleted the claude/eloquent-mayer-rosqqe-loading-feedback branch June 25, 2026 11:56
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.

2 participants