Skip to content

feat: add XLSX export for quarter transactions#23

Merged
ECWireless merged 3 commits into
mainfrom
codex/xlsx-export
Jun 18, 2026
Merged

feat: add XLSX export for quarter transactions#23
ECWireless merged 3 commits into
mainfrom
codex/xlsx-export

Conversation

@ECWireless

@ECWireless ECWireless commented Jun 18, 2026

Copy link
Copy Markdown
Member

This pull request introduces a new "quarter balances" feature, including database migrations, backend logic, and UI components for tracking and exporting treasury account balances at the start and end of each reporting quarter. It also adds support for exporting quarter data as an XLSX spreadsheet, and updates the quarter sync workflow to include a new balances step. Additionally, the database schema is extended to support new account types and balance tracking.

Quarter Balances Feature

Quarter Export Improvements

Database Schema Updates

  • Adds a new value 'bank' to the treasury_account_type enum to support bank accounts.
  • Updates the migration journal to include the new migrations for balances and account types.

Sync Workflow Updates

These changes collectively enable comprehensive quarter-end balance tracking, review, and export, improving transparency and auditability of treasury activity.

Summary by CodeRabbit

Release Notes

  • New Features

    • Export quarters as XLSX files with comprehensive financial summaries and balance data
    • Track quarter balance snapshots with opening and closing boundaries across accounts
    • New bank account type for treasury management
    • Toggle between admin and member view modes for sessions
    • Multi-chain balance tracking support
    • Added DAI and DKUSD token support
  • Enhancements

    • Improved quarterly sync workflow with new balances step
    • Enhanced treasury account and quarters admin UI
    • Better dashboard refresh logic

Copilot AI review requested due to automatic review settings June 18, 2026 12:59
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
raidguild-accounting Ready Ready Preview, Comment Jun 18, 2026 1:38pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

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 21 minutes and 41 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

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

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 14a6437e-9923-4313-8a76-77a203447551

📥 Commits

Reviewing files that changed from the base of the PR and between b2ae91b and 51f3aec.

📒 Files selected for processing (19)
  • drizzle/0015_bumpy_green_goblin.sql
  • drizzle/meta/0015_snapshot.json
  • drizzle/meta/0016_snapshot.json
  • src/app/admin/quarters/[id]/transactions/actions.ts
  • src/app/admin/quarters/[id]/transactions/page.tsx
  • src/app/admin/quarters/actions.ts
  • src/app/admin/treasury-accounts/actions.ts
  • src/app/api/auth/view-mode/route.ts
  • src/app/api/treasury/transactions/route.ts
  • src/app/api/treasury/transfers/[id]/price/route.ts
  • src/app/raids/transaction-lookup-actions.ts
  • src/components/auth/wallet-connect.tsx
  • src/db/schema.ts
  • src/lib/auth/session.ts
  • src/lib/core-entity-mutations.ts
  • src/lib/quarter-balances.ts
  • src/lib/quarter-xlsx-export.ts
  • src/lib/treasury/accounts.ts
  • src/lib/treasury/balances.ts
📝 Walkthrough

Walkthrough

The PR adds quarter-level opening/closing balance snapshots across multi-chain treasury accounts (gnosis, mainnet, base), introduces a new bank treasury account type, expands tracked ERC-20 assets (DAI, DKUSD), builds a multi-sheet XLSX accounting export via exceljs, and adds an admin/member view-mode toggle with refactored controlled navigation dropdowns.

Changes

Quarter Balance Snapshots & XLSX Export

Layer / File(s) Summary
Schema & migrations: balance snapshots, bank type, balances step
drizzle/0015_bumpy_green_goblin.sql, drizzle/0016_rapid_loa.sql, drizzle/meta/_journal.json, src/db/schema.ts
Adds quarter_balance_boundary enum, balances sync step value, quarter_balance_snapshots table, balances_* tracking columns on quarter_sync_statuses, and bank treasury account type in both SQL migrations and the Drizzle schema.
Bank account type & multi-chain asset/account expansion
src/lib/treasury/types.ts, src/lib/treasury/assets.ts, src/lib/treasury/pricing.ts, src/lib/treasury/accounts.ts, src/lib/treasury/swap-details.ts, src/lib/treasury/transactions.ts, package.json
Adds "bank" to EditableTreasuryAccountType and listActiveBalanceAccounts; adds DAI/DKUSD to OPERATOR_ERC20_ASSETS_BY_CHAIN and STABLE_ASSET_SYMBOLS; normalizes token addresses via getAddress in swap-detail matching and operator transfer log queries.
Multi-chain live treasury balance sync
src/lib/treasury/balances.ts, src/components/treasury/treasury-dashboard.tsx
Adds chain-aware RPC/client helpers, per-account getTrackedAssetsForAccount, ALL_TRACKED_TREASURY_ASSETS, and aggregate failed-snapshot detection; TreasuryDashboard now refreshes on "failed" status.
Quarter balance snapshot sync library
src/lib/quarter-balances.ts
New 627-line module: RPC retry helpers, binary-search boundary block resolution, per-asset raw balance fetching with mapBalanceRow, syncQuarterBalances upsert/stale-cleanup loop, and listQuarterBalanceRows / listQuarterAccountBalanceSummaries query helpers.
Quarter sync state machine: balances step
src/lib/quarter-sync.ts
Adds balancesStatus/balancesError to QuarterSyncStatus, updates mapQuarterSyncStatus, and extends startOrResume, markRunning, markFailed, markSuccess with the balances step case (transitions membership → balances → finalize).
syncQuarterBalancesStep server action & finalize gate
src/app/admin/quarters/[id]/transactions/actions.ts
Adds syncQuarterBalancesStep server action (admin-only, runs after membership success, marks step running/success/failed); updates finalizeQuarterSyncStep to require balancesStatus === "success".
Export readiness predicate & XLSX workbook builder
src/lib/quarter-export-readiness.ts, src/lib/quarter-xlsx-export.ts
Adds isQuarterExportReady (sync freshness + balances success + zero unclassified transfers); adds buildQuarterXlsxExport producing Summary, Balances, Ledger, Raids, RIPs, Provider Expenses, Membership, and Proposals sheets, plus getQuarterExportFilename.
XLSX export API route
src/app/admin/quarters/[id]/export.xlsx/route.ts
Node.js GET route with 401/403/404/409 guards; returns XLSX buffer as a file attachment with no-cache headers.
Admin UI: balance panel, export link, sync form, quarter card, treasury accounts
src/app/admin/quarters/[id]/transactions/page.tsx, src/app/admin/quarters/[id]/transactions/sync-transactions-form.tsx, src/app/admin/quarters/page.tsx, src/app/admin/treasury-accounts/actions.ts, src/app/admin/treasury-accounts/page.tsx
Adds QuarterBalancesPanel and "Export XLSX" link to the quarter detail page; wires balances step into SyncTransactionsForm; adds export link and q1Exists check to QuarterCard; extends treasury accounts UI with bank type label, Landmark icon, and redirect-on-create.

Admin/Member View Mode Toggle

Layer / File(s) Summary
Auth types, session serialization, and view-mode API route
src/lib/auth/types.ts, src/lib/auth/session.ts, src/app/api/auth/view-mode/route.ts
Adds optional viewMode to AuthSessionData; serializeSession now derives canUseMemberView, conditionally rewrites permissions for member view, and returns viewMode; new POST route saves the requested mode and returns the updated serialized session.
Controlled nav dropdowns and profile/view-mode UI
src/components/app-header.tsx, src/components/auth/wallet-connect.tsx
Refactors NavGroup from uncontrolled <details> to controlled dropdown with openGroup state and outside-click detection; replaces WalletConnect's authenticated layout with a profile dropdown exposing toggleViewMode and a conditional view-mode toggle.

Sequence Diagram(s)

sequenceDiagram
    rect rgba(135, 206, 235, 0.5)
        note over Admin,quarterBalanceSnapshots: Balance Sync Step
    end
    participant Admin
    participant syncQuarterBalancesStep
    participant quarter_sync_state as QuarterSyncState
    participant syncQuarterBalances
    participant RPC
    participant quarterBalanceSnapshots

    Admin->>syncQuarterBalancesStep: invoke with { quarterId, runId }
    syncQuarterBalancesStep->>quarter_sync_state: markQuarterSyncStepRunning("balances")
    syncQuarterBalancesStep->>syncQuarterBalances: syncQuarterBalances(quarter)
    syncQuarterBalances->>RPC: binary-search boundary blocks per chain
    loop per account × boundary × asset
        syncQuarterBalances->>RPC: getRawBalance (native or ERC-20)
        syncQuarterBalances->>syncQuarterBalances: getHistoricalUsdPricing
        syncQuarterBalances->>quarterBalanceSnapshots: upsert snapshot row
    end
    syncQuarterBalances->>quarterBalanceSnapshots: delete stale rows
    syncQuarterBalances-->>syncQuarterBalancesStep: row count
    syncQuarterBalancesStep->>quarter_sync_state: markQuarterSyncStepSuccess("balances") → currentStep = "finalize"
    syncQuarterBalancesStep-->>Admin: updated QuarterSyncStatus
Loading
sequenceDiagram
    rect rgba(144, 238, 144, 0.5)
        note over Admin,XLSXBuffer: XLSX Export
    end
    participant Admin
    participant ExportRoute as GET /export.xlsx
    participant isQuarterExportReady
    participant buildQuarterXlsxExport
    participant DB

    Admin->>ExportRoute: GET /admin/quarters/[id]/export.xlsx
    ExportRoute->>ExportRoute: authenticate + authorize (401/403)
    ExportRoute->>DB: getQuarterById (404 if missing)
    ExportRoute->>isQuarterExportReady: check sync freshness + balancesStatus + unclassified=0
    isQuarterExportReady-->>ExportRoute: false → 409 / true → proceed
    ExportRoute->>buildQuarterXlsxExport: fetch ledger, membership, proposals, balances
    buildQuarterXlsxExport->>DB: concurrent queries for all datasets
    buildQuarterXlsxExport-->>ExportRoute: XLSX Buffer
    ExportRoute-->>Admin: attachment response (Content-Disposition, XLSX MIME)
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • raid-guild/accounting#15: Adds the base quarter_sync_statuses step tracking (transactions → proposals → membership → finalize) in src/lib/quarter-sync.ts; this PR directly extends that state machine by inserting the new balances step before finalize.
  • raid-guild/accounting#8: Introduces multi-account treasury balance snapshot logic in src/lib/treasury/balances.ts and src/lib/treasury/accounts.ts; this PR extends those same files to support multi-chain RPC clients and bank account types.
  • raid-guild/accounting#7: Establishes the treasury accounts admin backend and schema (treasury_account_type enum); this PR adds "bank" to that same enum, updating the same actions and page files.

Poem

🐰 A rabbit once hopped through the ledger so wide,
With balance snapshots from opening to closing tide.
On mainnet and base, DAI and DKUSD gleam,
And XLSX sheets flow like a quarterly dream.
Flip to "member" view — the admin hops free!
Export with a click, raidguild-accounting.xlsx 🎉

🚥 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 PR title accurately and concisely describes the main feature: XLSX export functionality for quarter transactions, which is well-supported by the majority of changes including the new export route, XLSX generation logic, and export-readiness checks.
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/xlsx-export

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.

Copilot AI 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.

Pull request overview

This PR adds quarter balance snapshotting and XLSX export support, extending the quarter sync workflow with a new “balances” step and expanding treasury account/asset support (including new account types and stable assets). It also introduces an admin “member view” toggle to preview reduced permissions in the UI.

Changes:

  • Add quarter balance snapshot syncing (opening/closing) and surface the results in the quarter transactions admin UI.
  • Add an /admin/quarters/[id]/export.xlsx download route and a server-side ExcelJS export builder, gated by sync/classification readiness.
  • Extend treasury schema and logic (new bank account type, new tracked assets, multi-chain balance syncing improvements) and add a UI view-mode toggle.

Reviewed changes

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

Show a summary per file
File Description
src/lib/treasury/types.ts Expand TreasuryAssetSymbol to include new tracked symbols.
src/lib/treasury/transactions.ts Normalize token addresses for operator log fetching / transfer IDs.
src/lib/treasury/swap-details.ts Normalize tracked token addresses before isAddressEqual checks.
src/lib/treasury/pricing.ts Add new stable symbols for historical pricing shortcuts.
src/lib/treasury/balances.ts Support syncing balances across multiple chains/accounts and broaden tracked assets.
src/lib/treasury/assets.ts Add DAI (mainnet) and DKUSD (Base) operator assets.
src/lib/treasury/accounts.ts Add bank editable account type and new listActiveBalanceAccounts() helper.
src/lib/quarter-xlsx-export.ts New ExcelJS workbook builder for quarter exports (summary, balances, ledger, raids, etc.).
src/lib/quarter-sync.ts Add “balances” to quarter sync status model and step transitions.
src/lib/quarter-export-readiness.ts New helper to determine when quarter XLSX export is allowed.
src/lib/quarter-balances.ts New module to sync quarter boundary balances and query rows/summaries.
src/lib/auth/types.ts Add viewMode to session data.
src/lib/auth/session.ts Serialize session with optional “member view” permission masking.
src/db/schema.ts Add bank to account enum, add balances step fields, and add quarter_balance_snapshots table + enums.
src/components/treasury/treasury-dashboard.tsx Refresh logic now treats failed snapshots as refreshable.
src/components/auth/wallet-connect.tsx Add profile dropdown + view-mode toggle UI and outside-click handling.
src/components/app-header.tsx Replace <details> nav groups with controlled dropdown state + outside-click close.
src/app/api/auth/view-mode/route.ts Add API route to persist view mode in session.
src/app/admin/treasury-accounts/page.tsx Add bank account type UI labels/icons and tweak empty-state copy.
src/app/admin/treasury-accounts/actions.ts Allow creating/updating bank accounts; redirect after create.
src/app/admin/quarters/page.tsx Show XLSX export link when export-ready; adjust Q1 creation prompt copy/visibility.
src/app/admin/quarters/[id]/transactions/sync-transactions-form.tsx Insert “Balances” step into the sync workflow UI.
src/app/admin/quarters/[id]/transactions/page.tsx Display export link when ready and add quarter balances panel.
src/app/admin/quarters/[id]/transactions/actions.ts Add syncQuarterBalancesStep and require balances before finalizing.
src/app/admin/quarters/[id]/export.xlsx/route.ts Add XLSX export endpoint with readiness + permission gating.
package.json Add exceljs dependency.
pnpm-lock.yaml Lockfile updates for exceljs and transitive dependencies.
drizzle/meta/_journal.json Register new migrations in the journal.
drizzle/0015_bumpy_green_goblin.sql Migration: add balances enum/table + quarter sync status columns + enum value.
drizzle/0016_rapid_loa.sql Migration: add bank to treasury_account_type enum.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

Comment thread src/lib/quarter-balances.ts Outdated
Comment thread src/app/admin/quarters/[id]/transactions/page.tsx
Comment thread src/lib/auth/session.ts

@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: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/app/admin/quarters/[id]/transactions/actions.ts (1)

792-798: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Insert the balances step before finalization in the full sync orchestrator.

syncQuarterTransactions finalizes immediately after membership, but finalization now requires balances success (Line 1048). This path will fail when invoked.

Suggested fix
   status = await syncQuarterMembershipStep({ quarterId, runId: status.runId });
   throwIfStepFailed(status, "membership");
+  status = await syncQuarterBalancesStep({
+    quarterId,
+    runId: status.runId,
+  });
+  throwIfStepFailed(status, "balances");
   status = await finalizeQuarterSyncStep({
     quarterId,
     runId: status.runId,
     writeAudit: true,
   });
🤖 Prompt for 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.

In `@src/app/admin/quarters/`[id]/transactions/actions.ts around lines 792 - 798,
The full sync orchestrator in syncQuarterTransactions is missing the balances
synchronization step before finalization. Between the syncQuarterMembershipStep
call and the finalizeQuarterSyncStep call, insert a call to sync the quarter
balances (following the same pattern as the membership step), capture the result
in the status variable, check for failures with throwIfStepFailed using an
appropriate step name, and pass the updated runId from status to the
finalization call to ensure the correct dependency order is maintained.
src/app/admin/quarters/[id]/transactions/page.tsx (1)

134-136: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Align local stable-symbol defaults with treasury pricing logic.

Line 135 omits DAI and DKUSD, so those transfers won’t get the same stable-token USD default behavior used elsewhere.

Suggested patch
 function isStableAssetSymbol(symbol: string) {
-  return ["USDC", "XDAI", "WXDAI"].includes(symbol.toUpperCase());
+  return ["DAI", "DKUSD", "USDC", "XDAI", "WXDAI"].includes(
+    symbol.toUpperCase(),
+  );
 }
🤖 Prompt for 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.

In `@src/app/admin/quarters/`[id]/transactions/page.tsx around lines 134 - 136,
The isStableAssetSymbol function is missing DAI and DKUSD from its list of
stable asset symbols. Add both DAI and DKUSD to the array alongside the existing
USDC, XDAI, and WXDAI symbols to ensure consistent stable-token USD default
behavior across the application.
🤖 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/app/api/auth/view-mode/route.ts`:
- Around line 17-18: The view-mode route currently defaults any invalid or
misspelled mode value to "admin" instead of rejecting it. After parsing the
request body on line 17, add validation to check if body.mode is either "member"
or "admin". If the mode is invalid, return a 400 Bad Request response with an
appropriate error message before proceeding with the session mutation. Only
execute the mode assignment on line 18 if the mode value has been validated as
one of the allowed options.

In `@src/components/auth/wallet-connect.tsx`:
- Around line 325-327: The error catch block in the wallet-connect.tsx file that
handles errors from the toggleViewMode operation is reusing getFriendlyError,
which has a fallback message of "Wallet sign-in failed." This is misleading for
/api/auth/view-mode failures since it displays wallet-related messaging instead
of view-mode-specific messaging. Replace the getFriendlyError call in this catch
block with a custom error message that is appropriate for view-mode toggle
failures, ensuring users see contextually correct error information related to
toggling view mode rather than wallet sign-in.

In `@src/db/schema.ts`:
- Around line 378-384: The quarter_balance_snapshots_unique index uses
table.accountAddress directly without normalization, but application code reads
data using .toLowerCase(), creating a case-sensitivity mismatch that allows
duplicate snapshots for addresses with different casing. Modify the
accountAddress field in the quarter_balance_snapshots_unique index definition to
apply lowercase normalization (using the appropriate database function for your
schema library) so that address case variants are treated identically for the
uniqueness constraint.

In `@src/lib/auth/session.ts`:
- Around line 44-52: The memberViewRoles variable filters out only the "admin"
role but retains other privileged roles like "cleric", which can leak through
the permissions object when viewMode is "member". Instead of filtering to remove
just "admin", normalize memberViewRoles to only contain ["member"] when in
member view mode to ensure no privileged roles are exposed through the adjusted
permissions object.

In `@src/lib/quarter-balances.ts`:
- Around line 232-233: The getBlock() calls on lines 232, 243, 285, and 286 lack
retry handling for transient RPC failures (such as 429 rate limit errors), which
causes the entire quarter sync to abort despite retry logic existing for balance
reads elsewhere. Wrap these direct getBlock() calls with the same retry
mechanism that is already implemented for balance read operations to ensure
transient failures do not interrupt the synchronization process.
- Around line 435-437: The stale cleanup logic at line 435 skips processing when
treasuryAccountId is null, and the pruning logic in lines 467-475 only handles
non-null treasuryAccountId values. This leaves stale snapshot rows for the main
treasury account (when treasuryAccountId is null) uncleaned when tracked assets
or scope changes. Remove or modify the `if (!account.treasuryAccountId)
continue;` condition so that null treasuryAccountId values are processed instead
of skipped, and update the pruning logic in the 467-475 range to also handle the
case where treasuryAccountId is null to ensure stale rows are properly removed.

In `@src/lib/quarter-xlsx-export.ts`:
- Around line 298-312: In the balanceRows.map() function, the balance field is
being converted to a Number using toNumber(row.balance), which can lose
precision for high-precision token balances. Remove the toNumber() conversion
from the balance property and keep it as a string to preserve the exact
precision of the token balance values for audit and export accuracy.

---

Outside diff comments:
In `@src/app/admin/quarters/`[id]/transactions/actions.ts:
- Around line 792-798: The full sync orchestrator in syncQuarterTransactions is
missing the balances synchronization step before finalization. Between the
syncQuarterMembershipStep call and the finalizeQuarterSyncStep call, insert a
call to sync the quarter balances (following the same pattern as the membership
step), capture the result in the status variable, check for failures with
throwIfStepFailed using an appropriate step name, and pass the updated runId
from status to the finalization call to ensure the correct dependency order is
maintained.

In `@src/app/admin/quarters/`[id]/transactions/page.tsx:
- Around line 134-136: The isStableAssetSymbol function is missing DAI and DKUSD
from its list of stable asset symbols. Add both DAI and DKUSD to the array
alongside the existing USDC, XDAI, and WXDAI symbols to ensure consistent
stable-token USD default behavior across the application.
🪄 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: 768b68d7-dfa9-4149-8a12-68dac1b5d534

📥 Commits

Reviewing files that changed from the base of the PR and between ec45757 and b2ae91b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (31)
  • drizzle/0015_bumpy_green_goblin.sql
  • drizzle/0016_rapid_loa.sql
  • drizzle/meta/0015_snapshot.json
  • drizzle/meta/0016_snapshot.json
  • drizzle/meta/_journal.json
  • package.json
  • src/app/admin/quarters/[id]/export.xlsx/route.ts
  • src/app/admin/quarters/[id]/transactions/actions.ts
  • src/app/admin/quarters/[id]/transactions/page.tsx
  • src/app/admin/quarters/[id]/transactions/sync-transactions-form.tsx
  • src/app/admin/quarters/page.tsx
  • src/app/admin/treasury-accounts/actions.ts
  • src/app/admin/treasury-accounts/page.tsx
  • src/app/api/auth/view-mode/route.ts
  • src/components/app-header.tsx
  • src/components/auth/wallet-connect.tsx
  • src/components/treasury/treasury-dashboard.tsx
  • src/db/schema.ts
  • src/lib/auth/session.ts
  • src/lib/auth/types.ts
  • src/lib/quarter-balances.ts
  • src/lib/quarter-export-readiness.ts
  • src/lib/quarter-sync.ts
  • src/lib/quarter-xlsx-export.ts
  • src/lib/treasury/accounts.ts
  • src/lib/treasury/assets.ts
  • src/lib/treasury/balances.ts
  • src/lib/treasury/pricing.ts
  • src/lib/treasury/swap-details.ts
  • src/lib/treasury/transactions.ts
  • src/lib/treasury/types.ts

Comment thread src/app/api/auth/view-mode/route.ts Outdated
Comment thread src/components/auth/wallet-connect.tsx Outdated
Comment thread src/db/schema.ts
Comment thread src/lib/auth/session.ts Outdated
Comment thread src/lib/quarter-balances.ts Outdated
Comment thread src/lib/quarter-balances.ts Outdated
Comment thread src/lib/quarter-xlsx-export.ts
@ECWireless

Copy link
Copy Markdown
Member Author

Addressed the two outside-diff CodeRabbit comments in 51f3aec:

  • Added the balances step to the full quarter sync orchestrator before finalization.
  • Added DAI and DKUSD to the stable-symbol default USD handling on the transaction review page.

Verified with git diff --check, eslint ., and tsc --noEmit.

@ECWireless ECWireless merged commit 2811dba into main Jun 18, 2026
5 checks passed
@ECWireless ECWireless deleted the codex/xlsx-export branch June 18, 2026 13:49
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