Skip to content

feat: add member homepage with dummy data#4

Merged
ECWireless merged 2 commits into
mainfrom
codex/member-homepage
May 30, 2026
Merged

feat: add member homepage with dummy data#4
ECWireless merged 2 commits into
mainfrom
codex/member-homepage

Conversation

@ECWireless
Copy link
Copy Markdown
Member

@ECWireless ECWireless commented May 30, 2026

This pull request introduces a new treasury balance snapshot feature for the member home page, along with several UI and code improvements related to displaying and managing treasury data. The changes include new backend logic for fetching treasury data, new UI components for copying addresses and displaying sync status, and a significant refactor of the member home layout to show real (placeholder) treasury balances and asset breakdowns.

Treasury Data Integration and Backend:

  • Added a new backend module (balances.ts) to provide a treasury balance snapshot, including tracked assets, account details, and sync status. This uses types defined in a new types.ts file. [1] [2]
  • The main home page now fetches and passes this snapshot to the member view, replacing hardcoded asset/milestone data. [1] [2]

Member Home Page Refactor:

  • Refactored the MemberHome component to display dynamic treasury data: total balance, asset/account counts, asset breakdown table, and account details, using the new snapshot. [1] [2]
  • Improved layout and grouping of information, including updated sections for revenue reporting and export readiness.

UI Components and Enhancements:

  • Added a CopyAddressButton component that allows users to copy the treasury address with feedback.
  • Added a SyncStatusBadge component to indicate pending live synchronization of treasury data.
  • Updated the wallet connect UI for better truncation and role display.

Utility Functions:

  • Introduced utility functions for formatting currency, numbers, timestamps, and addresses for consistent display throughout the UI.

Code and Asset Cleanup:

  • Replaced legacy icons and hardcoded data with dynamic imports and data-driven rendering for improved maintainability. [1] [2]

References: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Summary by CodeRabbit

  • New Features

    • Redesigned member dashboard with live treasury balance snapshot display
    • Added copy-to-clipboard button for treasury addresses with visual confirmation
    • Added sync status badge showing data synchronization state
    • Treasury asset breakdown table with formatted USD values and balances
  • Style

    • Updated wallet sign-out button UI with improved styling and layout

Review Change Stack

Copilot AI review requested due to automatic review settings May 30, 2026 02:16
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

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

Project Deployment Actions Updated (UTC)
raidguild-accounting Ready Ready Preview, Comment May 30, 2026 2:42am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Warning

Review limit reached

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

More reviews will be available in 34 minutes and 21 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: cf2c3653-2738-4224-b724-fa1b8388e411

📥 Commits

Reviewing files that changed from the base of the PR and between 7ad0669 and f53476b.

📒 Files selected for processing (4)
  • src/components/auth/wallet-connect.tsx
  • src/components/treasury/copy-address-button.tsx
  • src/lib/treasury/balances.ts
  • src/lib/treasury/types.ts
📝 Walkthrough

Walkthrough

This PR introduces a treasury balance snapshot feature for the member dashboard. It adds TypeScript type definitions for treasury accounts and balances, server-side snapshot generation logic, two new reusable UI components for copying addresses and displaying sync status, and integrates snapshot-driven data into the member home page with formatted asset breakdowns. A separate minor styling update to the wallet authentication UI completes the changes.

Changes

Treasury Balance Snapshot Feature

Layer / File(s) Summary
Treasury domain types and data contracts
src/lib/treasury/types.ts
Defines TreasuryAssetSymbol, TreasurySnapshotStatus, TreasuryAssetBalance, TreasuryAccountBalance, and TreasuryBalanceSnapshot with constrained address templates (0x${string}) and string-typed monetary fields.
Server-side snapshot generation
src/lib/treasury/balances.ts
getTreasuryBalanceSnapshot() fetches treasury account balances from environment config; getMainSafeAddress() validates and normalizes the safe address; TRACKED_TREASURY_ASSETS defines the asset list with default zero balances.
Treasury UI components
src/components/treasury/copy-address-button.tsx, src/components/treasury/sync-status-badge.tsx
CopyAddressButton renders a copy-to-clipboard button with visual checkmark feedback (1600ms reset); SyncStatusBadge shows an animated refresh icon that stops after 5 seconds, both with proper cleanup on unmount.
Member dashboard snapshot integration
src/app/page.tsx
MemberHome now accepts snapshot prop and derives treasury data; renders snapshot timestamp, account/asset counts, formatted balances, safe address with copy button, and asset breakdown table; Home server component fetches the snapshot before render. Local formatting helpers added for currency, numbers, timestamps, and addresses.
Wallet authentication UI refinement
src/components/auth/wallet-connect.tsx
Sign-out button wrapper updates flex/gap layout and overflow handling; button changes from icon/outline to icon-sm/ghost variant with revised border and hover styling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 A snapshot's born, the treasury glows,
With assets neat in data flows,
Copy, badge, and dashboard bright—
The ledger shines in member's 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 title 'feat: add member homepage with dummy data' is partially related to the changeset. While it mentions adding a member homepage, the actual primary change is refactoring the homepage to display dynamic treasury balance snapshots, not just adding dummy data.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/member-homepage

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@src/components/auth/wallet-connect.tsx`:
- Line 285: The span element with className "ml-2 truncate text-scroll-300" in
the WalletConnect component should be made block-level so Tailwind's truncate
works reliably; either add "inline-block" (or "block") to that className or
replace the <span> with a <div> that preserves the same classes and styling,
ensuring the element supports text-overflow: ellipsis for reliable truncation.

In `@src/components/treasury/copy-address-button.tsx`:
- Around line 25-28: The copyAddress function currently calls
navigator.clipboard.writeText without handling failures or missing clipboard
API; wrap the clipboard call in a try/catch, verify navigator.clipboard exists
before calling it, and on error update state/feedback (e.g., call
setDidCopy(false) or trigger an error notification) so the user receives
feedback when copying fails; reference the copyAddress function and the
navigator.clipboard API and ensure any fallback or error path avoids unhandled
promise rejections.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: a3503c70-9319-41ae-81ed-fd202ba8fcf0

📥 Commits

Reviewing files that changed from the base of the PR and between 50bdfdc and 7ad0669.

📒 Files selected for processing (6)
  • src/app/page.tsx
  • src/components/auth/wallet-connect.tsx
  • src/components/treasury/copy-address-button.tsx
  • src/components/treasury/sync-status-badge.tsx
  • src/lib/treasury/balances.ts
  • src/lib/treasury/types.ts

Comment thread src/components/auth/wallet-connect.tsx Outdated
Comment thread src/components/treasury/copy-address-button.tsx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Wires the member-facing home page to a server-side treasury balance "snapshot" (currently placeholder data) and refactors the layout to render totals, account details, and an asset breakdown driven by the new types. Also adds two small client widgets (copy-address button, sync status badge) and tightens the authenticated wallet pill styling.

Changes:

  • New src/lib/treasury/{types,balances}.ts defining TreasuryBalanceSnapshot and a server-only getTreasuryBalanceSnapshot() returning a hardcoded Gnosis Safe account with USDC/xDAI/wxDAI/wETH at zero balance.
  • MemberHome in src/app/page.tsx rewritten to consume the snapshot, with local formatCurrency / formatNumber / formatTimestamp / formatAddress helpers and new sections for accounts, asset breakdown, revenue priority, and Q1 export readiness.
  • New CopyAddressButton and SyncStatusBadge client components, plus a small visual refresh of the authenticated WalletConnect pill.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/treasury/types.ts Introduces snapshot/account/asset types and a pending_live_sync status.
src/lib/treasury/balances.ts Server-only placeholder returning a single Gnosis Safe account with zeroed tracked assets; reads MAIN_SAFE_ADDRESS via viem.
src/app/page.tsx Fetches the snapshot for authenticated users and rebuilds MemberHome around it with new formatting helpers and layout sections.
src/components/treasury/copy-address-button.tsx Client button that copies an address and swaps icon for ~1.6s.
src/components/treasury/sync-status-badge.tsx Client badge with a 5s spin animation indicating pending Safe sync.
src/components/auth/wallet-connect.tsx Minor restyle of the authenticated address pill and sign-out button; truncates the roles label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/treasury/balances.ts Outdated
Comment thread src/app/page.tsx
Comment thread src/components/treasury/copy-address-button.tsx
@ECWireless ECWireless merged commit af08f31 into main May 30, 2026
3 checks passed
@ECWireless ECWireless deleted the codex/member-homepage branch May 30, 2026 02:44
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