Skip to content

feat(mosaic): add a skeleton loading state for the user profile API keys panel - #10031

Open
maxyinger wants to merge 3 commits into
section-skeletonsfrom
api-keys-skeleton
Open

maxyinger wants to merge 3 commits into
section-skeletonsfrom
api-keys-skeleton

Conversation

@maxyinger

@maxyinger maxyinger commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds a skeleton for the user profile API keys panel, built on the skeletons from #10029. The skeleton is the real table view rendered with placeholder data, so it can't drift from the loaded markup.

  • Table.Root skeleton shares the flag with every Table.HeaderCell and Table.Cell inside it, the same way Section.Group does. A skeleton cell keeps its children as mock text inside SkeletonText, so each bar is as wide as the text it stands in for. skeleton={false} opts a cell out. The skeleton root is inert and aria-hidden.
  • Table.Body also takes skeleton, for a table that turns only its rows into bones while the header stays real.
  • APIKeysTableView takes skeleton. It renders its normal rows from the data it is given, shows toolbar bones and a visually hidden loading status, and skips its create and revoke dialogs. The name cell draws its two lines (name, then id and expiry) through SkeletonText. The date cells render their labels directly instead of through Text, so the inherited SkeletonText wraps plain text (no visual change to loaded rows). The actions cell draws nothing and holds the menu trigger's column width.
  • APIKeysTableSkeleton renders the view with skeleton and three placeholder keys of typical length. UserProfileApiKeysPanelSkeleton puts it under Panel.Title skeleton with the page title as mock text.
  • APIKeysTableView also takes refetchSkeleton (opt-in). With it, the rows become bones while isFetching is set. After a page change or a sort it shows exactly min(pageSize, totalCount − offset) rows; after a search it shows 3. Nothing passes it yet, so production behavior is unchanged: the wired table keeps its spinner and keepPreviousData rows until wire-up adds the delay/min-duration gate.

Open question:

  • Toolbar controls on first load. I made the search field and Create button bones (17rem × 32px and 112px × 32px), so the first load is one loading state. The other option is real controls, disabled.

Previews on UserProfileApiKeysPanel:

  • Loading: the first load. Reload replays a 2s fake load.
  • Page change: refetchSkeleton with a 2s fetch. Go to page 2 to see its two rows as bones.
Light Dark
API keys loading story, light API keys loading story, dark
API keys page change story, light API keys page change story, dark

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 55cb988

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 8, 2026 10:56pm UTC
swingset Ready Ready Preview Oct 8, 2026 10:56pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 97fd98b8-4570-49be-a982-77802d4247dc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

maxyinger and others added 2 commits October 6, 2026 13:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shimmer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-skeleton

# Conflicts:
#	packages/mosaic/src/features/api-keys/api-keys-table.view.tsx

This branch was successfully deployed

2 active deployments
Preview – swingset — 55cb9888 Deployed Oct 8, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 55cb9888 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant