Repository navigation
feat(web): Dashboard and Alerts pages backed by live data - #67
Merged
Merged
Conversation
formatMoney scales integer minor units through bigint/decimal strings using the currency's Intl minor-unit digits (no float division). formatTimestamp renders RFC 3339 values in UTC at the edge. ApiError parses the canonical error envelope. Refs #66 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xzt3HRqVzoHnEyEUbTT3h9
useAlerts (infinite, cursor), useAlertPage, useTransactions and useAlertTransition, all via useApiFetch with keys built on the shared queryKeys prefixes so realtime invalidation refreshes them. Refs #66 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xzt3HRqVzoHnEyEUbTT3h9
Semantic table with status filter in the URL, Load more pagination, per-status Acknowledge/Resolve actions and a non-fatal inline message for 409 INVALID_TRANSITION. Refs #66 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xzt3HRqVzoHnEyEUbTT3h9
…nt transactions
Open/acknowledged tiles ("200+" when truncated), a Recharts column
chart of open alerts by severity with an equivalent table, and the 10
most recent transactions.
Refs #66
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xzt3HRqVzoHnEyEUbTT3h9
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the placeholder Dashboard and Alerts pages with real views over the existing REST API, so the realtime invalidation from #65 now visibly refreshes the UI. Frontend only: there are no contract or backend changes.
Closes #66
Architecture summary
lib/apiError.tsparses the canonical{"error":{"code","message"}}envelope into a typedApiError.requestJsonsends every call throughuseApiFetch, which attaches the bearer token and logs out on 401.useAlerts(status)(useInfiniteQuerywith cursor "Load more"),useAlertPage,useTransactionsanduseAlertTransition.queryKeys.alertsorqueryKeys.transactions, sotransaction.observed/alert.raisedevents refresh every view.?status=. Unknown values fall back to "all".openalerts and Resolve only foracknowledgedones. Each row has its own pending state.INVALID_TRANSITIONshows a dismissiblerole="alert"message and the stale list is refreshed.limit=200page and show "200+" whennextCursoris set, so there are no unbounded scans.aria-hiddenand paired with a visible severity table as its text equivalent. Chart colours are tokens inindex.cssfor light and dark themes.formatMoneyscales integer minor units throughbigintinto an exact decimal string and uses the currency's minor-unit digits fromIntl(e.g. JPY has 0). There is no float division and no summing across currencies.formatTimestamprenders RFC 3339 values in UTC only at render time, inside<time dateTime>.Security considerations
ACC-*accounts.messagefield, with a generic fallback.Testing evidence
openand clicked Acknowledge: the open rows went from 14 to 13 and the URL showed?status=open.api seed -n 15moved the "Open alerts" tile from 13 to 24 without a reload, through the realtime stream.Known limitations
amountMinoris typednumber, because JSON parsing loses precision above 2^53. The formatter itself is exact forbigintandstringinput..darkclass; the app does not handleprefers-color-schemeyet.Follow-up issues
Checklist
main. This PR targets the feat: transactional outbox relay and in-process WebSocket hub #65 branch for now and will be retargeted tomainonce feat: transactional outbox relay and in-process WebSocket hub #65 merges.make verifypassed.git diff --checkis clean.