feat(dashboard): enhance my-groups component with live pool data and …#74
Conversation
Sendi0011
left a comment
There was a problem hiding this comment.
@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.
- 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>
- 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>
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.tsxthat had stripped the entire file header (imports, types, constants,PoolCardcomponent), 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 6PoolCardSkeletoncomponents 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 reputationBadgewas placed outside its parentdiv.group-actions.tsx— Added skeleton block (deposit, withdraw, admin controls) whilepoolDatais fetching. Actual form renders once pool metadata resolves — no layout shift.Closes # (issue)
Type of Change
How Has This Been Tested?
cargo testpasses (smart contracts)pnpm buildsucceeds (frontend)pnpm lintpasses (frontend)Manually verified skeleton states appear on initial load for:
Confirmed no layout shift occurs when real data replaces skeletons. Tested on both desktop and mobile viewport widths.
Checklist