feat: interactive account map with React Flow canvas#560
Merged
simple-agent-manager[bot] merged 8 commits intomainfrom Mar 30, 2026
Merged
feat: interactive account map with React Flow canvas#560simple-agent-manager[bot] merged 8 commits intomainfrom
simple-agent-manager[bot] merged 8 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New API endpoint GET /api/account-map aggregating all user entities - 6 custom React Flow node types (Project, Node/VM, Workspace, Session, Task, Idea) - Animated SVG particle edges with configurable color and activity state - Dagre auto-layout for hierarchical positioning - Search with node highlighting/dimming - Filter chips per entity type - Draggable nodes with reorganize button - Hover tooltips (desktop) / tap tooltips (mobile) - MiniMap and Controls (desktop only) - Mobile responsive toolbar and simplified nodes - Nav sidebar integration with Map link - Loading, error, and empty states Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- API route tests: empty state, entity+relationship building, DO failure tolerance - Component tests: loading, empty state, canvas render, error+retry, filter chips, search Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ideas were removed from the account map API and UI during review. Update test helper and filter chip test to match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix useMemo side-effect bug: change to useEffect for state sync - Add aria-pressed to filter chip toggle buttons - Add prefers-reduced-motion guard on animated SVG particles - Increase filter chip touch targets to 44px minimum height - Expand search clear button touch target (p-1.5 instead of p-0) - Add accessible labels to status indicator dots (NodeVM, Workspace) - Add aria-label region to React Flow canvas wrapper - Fix scrollbar-none: use standard CSS properties instead of utility - Fix tooltip z-index to use Tailwind theme alias (z-dropdown) - Move keyboard hint to bottom-center to avoid Controls overlap - Add safe-area-inset protection to mobile tooltip Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Stage remaining cloudflare-specialist review changes (API rewrite, ideas removal, session cap, env vars) - Add ACCOUNT_MAP_* env vars to .env.example Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9632b06 to
0c430f2
Compare
.env.example listed ACCOUNT_MAP_MAX_ENTITIES=500 and ACCOUNT_MAP_MAX_SESSIONS_PER_PROJECT=50 but the actual code defaults are 200 and 20 respectively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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
/account-map) that visualizes all entities in a user's account (projects, nodes, workspaces, sessions, tasks) as a node graph using React FlowGET /api/account-mapaggregates D1 queries + ProjectData DO fan-out with KV caching (30s TTL)aria-pressedon filter chips,prefers-reduced-motionguard on animations, status dot labels, region landmarksValidation
pnpm lint— 0 errors (warnings only, pre-existing)pnpm typecheck— cleanpnpm test— 9 tests pass (3 API + 6 web)Staging Verification (REQUIRED for all code changes — merge-blocking)
app.sammy.partyusing test credentials/account-mapwith real data: 3 projects, 15 nodes, 16 workspaces, 85 sessions, 76 tasks; filter chips show counts with aria-pressed; search bar and reorganize button presentStaging Verification Evidence
Screenshot captured of account map on staging showing the full React Flow canvas with entity nodes, filter chips with counts (Projects 3, Nodes 15, Workspaces 16, Sessions 85, Tasks 76), search bar, and reorganize button. Dashboard, projects, and settings pages all load correctly with no console errors.
UI Compliance Checklist (Required for UI changes)
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
/account-map→apps/web/src/pages/AccountMap.tsxuseAccountMapDatahook callsgetAccountMap()→apps/web/src/lib/api.ts:getAccountMap()GET /api/account-map→apps/api/src/routes/account-map.tshandlerlistSessions()per projectuseAccountMapData.tsapplies dagre layoutAccountMapCanvasrenders<ReactFlow>with custom node types and animated edgesuseMapFiltersmanages search/filter state,AccountMapToolbarrenders controlsUntested Gaps
Manual staging verification covers the full user flow. Unit tests cover API route behavior (3 tests) and component rendering (6 tests). No automated E2E test for the full browser→API→DO flow; verified manually on staging.
Post-Mortem (Required for bug fix PRs)
N/A: not a bug fix
Exceptions (If any)
Agent Preflight (Required)
Classification
External References
Codebase Impact Analysis
apps/api/src/routes/account-map.ts— new API routeapps/api/src/index.ts— route mount + Env typeapps/web/src/components/account-map/— new component directory (canvas, toolbar, nodes, edges, hooks, layout, empty state)apps/web/src/pages/AccountMap.tsx— new pageapps/web/src/lib/api.ts— new API function + response typeapps/web/src/App.tsx— new routeapps/web/src/components/NavSidebar.tsx— nav itemDocumentation & Specs
apps/api/.env.exampleupdated with newACCOUNT_MAP_*env vars (ACCOUNT_MAP_MAX_ENTITIES, ACCOUNT_MAP_MAX_SESSIONS_PER_PROJECT, ACCOUNT_MAP_CACHE_TTL_SECONDS)CLAUDE.mdnot updated — new feature does not change existing documented behavior or architectureConstitution & Risk Check
🤖 Generated with Claude Code