Skip to content

refactor: consolidate loading skeletons into shared ui/loading components - #236

Merged
Benjtalkshow merged 2 commits into
boundlessfi:mainfrom
Shadow-MMN:feat/consolidate-loading-skeletons
May 28, 2026
Merged

refactor: consolidate loading skeletons into shared ui/loading components#236
Benjtalkshow merged 2 commits into
boundlessfi:mainfrom
Shadow-MMN:feat/consolidate-loading-skeletons

Conversation

@Shadow-MMN

@Shadow-MMN Shadow-MMN commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Standardize all loading skeletons across the app by extracting reusable loading components into a shared components/ui/loading directory.

Changes

  • Created components/ui/loading/ with shared skeleton components
  • BountyCardSkeleton & BountyListSkeleton - extracted from components/bounty/
  • BountyDetailSkeleton - renamed from bounty-detail-bounty-detail-skeleton.tsx
  • LeaderboardRowSkeleton & LeaderboardTableSkeleton - extracted inline markup
  • WalletPageSkeleton - extracted from app/wallet/page.tsx
  • Updated imports across 6 files to use shared components
  • Removed old inline skeleton files

Closes #212

Summary by CodeRabbit

  • Chores
    • Reorganized loading skeleton components into a centralized location with consolidated exports.

Review Change Stack

@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Shadow-MMN, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 13 minutes and 36 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6b378314-b4e8-4d11-8a73-54bd9129ec50

📥 Commits

Reviewing files that changed from the base of the PR and between e7ad8dd and 0dff363.

📒 Files selected for processing (4)
  • components/ui/loading/bounty-card-skeleton.tsx
  • components/ui/loading/bounty-detail-skeleton.tsx
  • components/ui/loading/leaderboard-row-skeleton.tsx
  • components/ui/loading/wallet-page-skeleton.tsx
📝 Walkthrough

Walkthrough

Skeleton loading components are consolidated from scattered local definitions into a new components/ui/loading/ library. New skeleton components for bounties, leaderboard rows, and wallet pages are created and exported via a barrel module. All consumer pages and components are updated to import from the centralized library instead of local or inline definitions.

Changes

Skeleton Component Consolidation

Layer / File(s) Summary
Centralized skeleton component library
components/ui/loading/bounty-card-skeleton.tsx, components/ui/loading/leaderboard-row-skeleton.tsx, components/ui/loading/wallet-page-skeleton.tsx, components/ui/loading/index.ts
New BountyCardSkeleton, BountyListSkeleton, LeaderboardRowSkeleton, LeaderboardTableSkeleton, and WalletPageSkeleton components are created using the base Skeleton primitive. A barrel export at components/ui/loading/index.ts re-exports all skeleton components for unified access.
Bounty skeleton consumer migration
app/bounty/page.tsx, components/bounty/bounty-grid.tsx, components/bounty/bounty-list.tsx, components/bounty-detail/bounty-detail-client.tsx
BountyListSkeleton and BountyDetailSkeleton imports are updated to use @/components/ui/loading instead of local module paths. The old components/bounty/bounty-card-skeleton.tsx file is removed.
Wallet and leaderboard skeleton updates
app/wallet/page.tsx, components/leaderboard/leaderboard-table.tsx
WalletPageSkeleton is extracted from inline definition and imported from the centralized library. LeaderboardTable replaces inline Skeleton placeholder markup with the dedicated LeaderboardTableSkeleton component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • boundlessfi/bounties#88: Both PRs modify the bounty detail loading skeleton wiring in components/bounty-detail/bounty-detail-client.tsx by changing/introducing BountyDetailSkeleton usage/import paths.
  • boundlessfi/bounties#34: The main PR refactors the bounty skeleton components by removing components/bounty/bounty-card-skeleton.tsx (where PR #34 added BountyCardSkeleton/BountyListSkeleton) and re-exporting/importing them from components/ui/loading, so the changes directly touch the same skeleton components and their modules.

Suggested reviewers

  • Benjtalkshow
  • 0xdevcollins

Poem

🐰 Skeletons scattered far and wide,
Now gather in one place with pride,
From bounties, wallets, leaderboards bright,
A unified loading sight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and concisely summarizes the main change: consolidating loading skeletons into a shared ui/loading directory.
Linked Issues check ✅ Passed The PR fully addresses issue #212: created reusable skeleton components in components/ui/loading/, updated all four pages to use shared components, and removed inline skeleton markup.
Out of Scope Changes check ✅ Passed All changes directly align with the linked issue #212 objectives. No out-of-scope modifications or unrelated refactoring detected in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@drips-wave

drips-wave Bot commented May 27, 2026

Copy link
Copy Markdown

@Shadow-MMN Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 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.

Inline comments:
In `@components/ui/loading/bounty-card-skeleton.tsx`:
- Around line 4-35: In BountyCardSkeleton, remove the hardcoded bg-gray-800
class from every Skeleton usage so the Skeleton component can rely on its base
theme-aware styling (bg-accent); search for Skeleton instances within the
BountyCardSkeleton function and delete any "bg-gray-800" tokens in their
className strings, preserving the other layout classes (e.g., "h-5 w-14",
"rounded-full", "w-full", etc.) so spacing and sizing remain unchanged.

In `@components/ui/loading/leaderboard-row-skeleton.tsx`:
- Around line 63-67: The wrapper div in the skeleton component adds artificial
vertical spacing via the "space-y-4" class which differs from the real
LeaderboardTable that uses border-b on each row; remove the "space-y-4" class
(i.e., stop applying inter-row spacing on the container) so that each
LeaderboardRowSkeleton (which already has border-b border-border/60) lines up
with TableRow spacing in LeaderboardTable and avoids layout shift when real data
loads.
- Around line 35-70: The header Skeleton elements in LeaderboardTableSkeleton
are hardcoding a dark background via the "bg-gray-800" utility on multiple
Skeleton usages; remove that hardcoded class from each header Skeleton (the ones
inside the top .flex block) so they use the component's theme-aware default
styling (or replace with the correct theme token if your Skeleton requires one),
ensuring consistency with LeaderboardRowSkeleton and theme switching; update the
Skeleton className props in the LeaderboardTableSkeleton function (the Skeleton
instances in the header) to omit "bg-gray-800".
- Around line 3-32: In LeaderboardRowSkeleton, remove the hardcoded
"bg-gray-800" Tailwind class from every Skeleton usage so the Skeleton
components can fall back to their theme-aware default (e.g., bg-accent); locate
the Skeleton elements inside the LeaderboardRowSkeleton function and delete any
occurrence of "bg-gray-800" in their className strings (ensure you don’t
accidentally remove other layout classes like h-*, w-*, rounded-*, ml-auto,
etc.).
- Around line 35-62: The LeaderboardTableSkeleton component uses invalid
responsive table-cell classes on divs; update the three div elements currently
containing "md:table-cell", "sm:table-cell", and "lg:table-cell" to use the
correct block visibility pattern (e.g., replace "hidden md:table-cell" with
"hidden md:block", "hidden sm:table-cell" with "hidden sm:block", and "hidden
lg:table-cell" with "hidden lg:block") while preserving the other utility
classes (width, text-right, font-bold, py-3, etc.) so the skeleton visibility
behaves correctly across breakpoints.

In `@components/ui/loading/wallet-page-skeleton.tsx`:
- Around line 3-22: The Skeleton components in WalletPageSkeleton hardcode
"bg-gray-800" which overrides the theme-aware base class; edit the
WalletPageSkeleton function and remove "bg-gray-800" from every Skeleton
className while preserving other sizing/spacing classes (e.g., "h-9 w-32",
"rounded-2xl", etc.) so the Skeleton component's default/theme class (like
bg-accent) can apply.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e27459b-a34d-42f2-8312-22d1de216042

📥 Commits

Reviewing files that changed from the base of the PR and between ede3b20 and e7ad8dd.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • app/bounty/page.tsx
  • app/wallet/page.tsx
  • components/bounty-detail/bounty-detail-client.tsx
  • components/bounty/bounty-card-skeleton.tsx
  • components/bounty/bounty-grid.tsx
  • components/bounty/bounty-list.tsx
  • components/leaderboard/leaderboard-table.tsx
  • components/ui/loading/bounty-card-skeleton.tsx
  • components/ui/loading/bounty-detail-skeleton.tsx
  • components/ui/loading/index.ts
  • components/ui/loading/leaderboard-row-skeleton.tsx
  • components/ui/loading/wallet-page-skeleton.tsx
💤 Files with no reviewable changes (1)
  • components/bounty/bounty-card-skeleton.tsx

Comment thread components/ui/loading/bounty-card-skeleton.tsx
Comment thread components/ui/loading/leaderboard-row-skeleton.tsx
Comment thread components/ui/loading/leaderboard-row-skeleton.tsx
Comment thread components/ui/loading/leaderboard-row-skeleton.tsx
Comment thread components/ui/loading/leaderboard-row-skeleton.tsx Outdated
Comment thread components/ui/loading/wallet-page-skeleton.tsx
@Shadow-MMN
Shadow-MMN force-pushed the feat/consolidate-loading-skeletons branch from 27a0e53 to 0dff363 Compare May 27, 2026 23:29

@Benjtalkshow Benjtalkshow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean consolidation. All four pages now pull skeletons from components/ui/loading/, old files are deleted, and the barrel export keeps imports tidy. The leaderboard-table reformatting from 4-space to 2-space is welcome since it brings the file in line with the rest of the codebase.

Merging this in. Thanks.

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.

Standardize skeleton loaders across bounty list, detail, leaderboard, and wallet

2 participants