Skip to content

feat(dashboard): enhance my-groups component with live pool data and …#74

Merged
Sendi0011 merged 1 commit into
JointSave-org:mainfrom
SudiptaPaul-31:improve/loading-skeletons
Jun 20, 2026
Merged

feat(dashboard): enhance my-groups component with live pool data and …#74
Sendi0011 merged 1 commit into
JointSave-org:mainfrom
SudiptaPaul-31:improve/loading-skeletons

Conversation

@SudiptaPaul-31

@SudiptaPaul-31 SudiptaPaul-31 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Description

Replaces spinner-based loading states across the dashboard and group detail pages with skeleton loaders that match real content dimensions. This eliminates layout shift when data arrives and improves perceived performance on initial load.

Also fixes a pre-existing bad merge in my-groups.tsx that had stripped the entire file header (imports, types, constants, PoolCard component), leaving the file non-functional.

resolves #12

Changes per file:

  • my-groups.tsx — Restored missing file header lost in a prior merge conflict. Replaced the centered spinner with 6 PoolCardSkeleton components in the same grid as real cards. Added inline <Skeleton> for the live "Total Saved" value while onchain data resolves independently.
  • profile.tsx — Swapped 3 spinners for skeleton stat tiles matching real content size across the reputation score, savings statistics, and reputation breakdown sections.
  • group-details.tsx — Full-card spinner replaced with a structured skeleton: title, badge pills, 4 stat tiles (2×4 grid), and progress bar area.
  • group-members.tsx — Spinner replaced with 4 skeleton member rows. Also fixed pre-existing broken JSX where the reputation Badge was placed outside its parent div.
  • group-actions.tsx — Added skeleton block (deposit, withdraw, admin controls) while poolData is fetching. Actual form renders once pool metadata resolves — no layout shift.

Closes # (issue)

Type of Change

  • feat: new feature
  • fix: bug fix
  • chore: maintenance, tooling, dependencies
  • docs: documentation only
  • refactor: code restructuring (no functional changes)
  • test: adding or updating tests

How Has This Been Tested?

  • cargo test passes (smart contracts)
  • pnpm build succeeds (frontend)
  • pnpm lint passes (frontend)
  • Manual testing (describe below)

Manually verified skeleton states appear on initial load for:

  • Dashboard → My Groups tab (6 skeleton cards in the pool grid)
  • Group detail page → Details card, Members list, Actions card
  • Dashboard → Profile tab (reputation score, savings stats, reputation breakdown)

Confirmed no layout shift occurs when real data replaces skeletons. Tested on both desktop and mobile viewport widths.

Checklist

  • My code follows the coding conventions of this project
  • I have added/updated tests if needed
  • I have updated documentation if needed
  • My changes generate no new warnings or errors

@Sendi0011 Sendi0011 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.

@SudiptaPaul-31 i Verified the headline claim directly, not just the description — main genuinely has a broken JSX nesting bug in group-members.tsx right now (tsc --noEmit fails with a real syntax error), caused by a bad merge between the reputation-tracking and optimistic-transactions PRs. Your fix correctly re-nests the reputation badge inside its parent div before it closes, matching the structure that existed before those two PRs collided. Confirmed this resolves cleanly with no remaining errors in that file.
This is a solid, well-scoped PR on its own merits too — skeleton dimensions matching real content, independent resolution per data source rather than blocking on everything at once, and the fix description honestly separates "new feature" from "fixed a pre-existing break I found along the way." Approving — this should merge soon, ideally before #54, since it resolves a real live bug that's currently sitting on main.

@Sendi0011 Sendi0011 merged commit 5dfdfe4 into JointSave-org:main Jun 20, 2026
1 check passed
Sendi0011 pushed a commit that referenced this pull request Jun 20, 2026
- Add useOptimisticTransactions import to group-details.tsx
- Fix STELLAR_RPC_URL export in web3-provider.tsx and update yield-dashboard.tsx
- Add missing rpc import to yield-dashboard.tsx

Resolves TypeScript errors:
- frontend/components/group/group-details.tsx(39,31): error TS2304: Cannot find name 'useOptimisticTransactions'.
- frontend/components/group/yield-dashboard.tsx(15,18): error TS2459: Module 'useJointSaveContracts' declares 'STELLAR_RPC_URL' locally, but it is not exported.
- frontend/components/group/yield-dashboard.tsx(48,18): error TS2503: Cannot find namespace 'rpc'.

Now all 3 of the original TypeScript errors (4 errors total when including the 4th already fixed in PR #74) are resolved. Front end CI (#54) can now pass cleanly.

Co-authored-by: openhands <openhands@all-hands.dev>
Sendi0011 pushed a commit that referenced this pull request Jun 20, 2026
- Add proper type guard for LedgerEntryResult to safely access xdr property
- Check entry type before accessing properties to prevent runtime errors

Fixes TypeScript error:
- frontend/hooks/useJointSaveContracts.ts(662,28): error TS2339: Property 'xdr' does not exist on type 'LedgerEntryResult'.

This error was already covered in PR #74, but now resolved comprehensively with proper type safety.

Co-authored-by: openhands <openhands@all-hands.dev>
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.

[Improvement] Add loading skeletons to dashboard and group detail pages

2 participants