Repository navigation
feat(expansion): make the graph's growth felt — arrival glow, frontier ring, anchor toast, undo - #20
Merged
Merged
Conversation
Four divergent type→color maps (GraphCanvas VIBRANT_TYPE_COLORS, MiniMap, TagCloud, tailwind config) plus server meta.type_colors rendered the same memory type as different hues per surface. Canonicalize on the scene palette in src/lib/palette.ts, resolve it over server colors at the API chokepoint, and make normalizeNode prefer the type-keyed color. Pathfinding trace hues and the pinch pre-select amber become named tokens; settings relationship swatches now derive from EDGE_STYLES instead of a duplicate table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The UI never said which universe a number referred to: the stats bar's bare count read as exhaustive, the search badge counted the whole store while the canvas highlighted only loaded matches, pathfinding silently vanished when no path existed among loaded edges, and the timeline counted 'memories' that were really just the loaded scene. Every count now names its scope, and pathfinding failure gets an honest no-path card with the expand-and-retry hint. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Force, display, clustering, and relationship-visibility configs were plain useState — every reload reset the workspace to defaults (only sound settings persisted). Extract the sounds.ts localStorage pattern into usePersistentState, apply it to all four configs plus the tag AND/OR mode, and add a 'Reset all' escape hatch to the settings header. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A successful snapshot with zero nodes left an unexplained black canvas — indistinguishable from a crash, and the literal first impression for anyone opening a freshly deployed (empty) AutoMem store. Distinguish the two causes via stats.total_nodes: an empty store gets a friendly onboarding card with Refresh and a wire-up-an-agent link; an over-filtered view says how many memories the filters excluded and offers one-click filter reset. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Embedded /viewer/#token= sessions authenticated silently — no confirmation, no way to see which server you're on, no sign-out, and a rejected shared-link token dead-ended at a generic 'Connection Error' whose Retry re-hit the same 401 forever. Add a one-time 'Connected to <host>' toast for URL-token sessions, a Settings → Connection section (server, masked token, Disconnect), and an auth-aware error card whose 'Enter credentials' strips URL-borne tokens so TokenPrompt can actually take over. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
usePersistentState setters aren't lint-exempt like React's useState setters; they're stable (useCallback on key), so listing them is behavior-neutral. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TanStack Query's default networkMode 'online' parks a failed query at fetchStatus 'paused' whenever the browser's online-manager misdetects connectivity — no retry, no error state, an infinite spinner exactly where the error card should be (reproduced in a managed browser; failureCount froze at 1 with status 'pending'). This app talks to exactly one API, so let the fetch itself be the connectivity check: networkMode 'always' for queries and mutations. Auth rejections (401/403) additionally skip retries entirely — they don't fix themselves, and failing fast is what makes the new Access-denied card render immediately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR makes graph expansion events visually and informationally explicit by adding arrival animations, an expansion frontier cue, and a status toast with single-level Undo, while also fixing “in view” counts to reflect the live rendered graph (snapshot + expansions).
Changes:
- Added single-level “undo last expansion” state + API to the expandable graph reducer.
- Implemented expansion arrival animation for newly merged nodes and added a dashed “+N more” frontier ring for partially expanded selections.
- Updated StatsBar and App wiring so “in view” counts and expansion toasts reflect the current rendered graph.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hooks/useExpandableGraph.ts | Tracks last expansion and supports tail-only undo in the reducer/hook API. |
| src/components/StatsBar.tsx | Uses live in-view node/edge counts instead of stale snapshot counts. |
| src/components/SelectionHighlight.tsx | Adds ExpansionFrontierRing (dashed ring + “+N more” label) for partially expanded nodes. |
| src/components/GraphCanvas.tsx | Plumbs newNodeIds to instanced rendering and adds arrival scale+glow animation logic. |
| src/App.tsx | Computes frontier count, wires live counts to StatsBar, and adds status toast with Undo action. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1389
to
+1395
| <button | ||
| onClick={() => { | ||
| statusMessage.action!.onClick() | ||
| setStatusMessage(null) | ||
| }} | ||
| className="px-2 py-0.5 rounded bg-white/10 hover:bg-white/20 text-accent text-xs font-medium transition-colors" | ||
| > |
Member
Author
There was a problem hiding this comment.
Fixed in 0681810 — explicit type="button" and the auto-dismiss timer is cancelled on click so a stale timer can't clear a later toast.
Copilot review: the button implied it reset everything in the panel but only covered forces/display/clustering/relationships. It now also resets audio (enabled/volume) and the tag AND/OR mode; the tooltip states exactly what it covers and that filters (view state) are deliberately untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r ring, anchor toast, undo Focus-and-expand is the product's core model, yet expansion was invisible: useExpandableGraph computed newNodeIds 'for transient highlight' and nothing consumed it. Now: - Arrival animation: newly merged nodes scale up from 0.2x with an emissive boost that catches the bloom pass (~1.5s of embers cooling into place), so the user sees exactly where the graph grew. - Anchor toast: every expansion announces itself — '+26 memories connected to "…"' — with a single-level Undo. Undo removes only the most recent expansion: those nodes sit at the array tail, so removal never reorders an earlier index (the one removal the append-only invariant permits). - Expansion frontier ring: a slowly rotating dashed '+N more' ring around a selected node whose neighbors aren't all loaded (cache-read of the Inspector's neighbors query — no extra fetch). A fully expanded node shows nothing: absence reads as exhausted. Dashes are mesh ring-arcs, not THREE.Line — LineDashedMaterial misrendered as a filled disc in this scene. - Live 'in view' counts: StatsBar previously showed the snapshot's returned_nodes, which goes stale the moment an expansion merges nodes; it now counts the rendered graph (verified live: 2,000 → 2,026 → undo → 2,000). - Status toast supports an action button (used for Undo, 6s window). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Sweep expired arrivalsRef entries on each expansion: useFrame only deletes an entry when its node still renders, so an Undo mid-animation would leak removed ids in the map indefinitely. - Gate the expansion toast on lastExpansion identity instead of newNodeIds, so an edges-only expansion (all neighbors already in view, new connections discovered) announces '+N new connections' instead of merging silently. - Toast action button: explicit type="button" and cancel the auto-dismiss timer on click so a stale timer can't clear a later toast. - Correct the frontier-count comment: the neighbors query dedupes with the Inspector's identical key but CAN fetch on a cold or stale cache. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jack-arturo
force-pushed
the
feat/ux-expansion-visible
branch
from
June 11, 2026 21:21
2b03845 to
0681810
Compare
This was referenced Jun 11, 2026
jack-arturo
added a commit
that referenced
this pull request
Jun 11, 2026
Merging stacked PRs #19 and #20 re-applied the connection-visibility block (connectionToastShownRef / handleReenterCredentials / connectionInfo / isAuthError) a second time — #20's branch still carried the rebased #19 commits, and after #19's squash-merge the second merge duplicated the block in a shifted context, breaking tsc (TS2451 redeclarations) and the image build. src/ now matches the reviewed #20 branch tip exactly. Co-authored-by: Claude Fable 5 <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.
What
Part 2 of the UX audit workstreams (stacked on #19). Focus-and-expand is the product's signature interaction, yet expansion was invisible:
useExpandableGraphcomputednewNodeIds"for transient highlight" and nothing consumed it. This PR makes the graph's growth unmistakable:+26 memories connected to "Comprehensive list of everyt…". Undo removes the most recent expansion only — those nodes sit at the array tail, so removal never moves an earlier node's index. (The audit's "exploration popover with per-expansion remove" was deliberately scoped down: arbitrary removal would violate the documented append-only invariant that the index-keyed interpolation buffers depend on.)returned_nodes, which goes stale the moment an expansion merges nodes; it now counts the rendered graph.Implementation notes
THREE.Line—LineDashedMaterialmisrendered as a giant filled disc in this scene (caught during live verification).InstancedNodes) — the audit claim was wrong, so no change there.Verification (live, against a 10k-memory local store)
Expand into graph (39)→ toast+26 memories connected to "…"→ header2,000 in view→2,026 in view→ Undo →2,000 in view(exact revert, no crash, no teleporting)npm run lint(0 errors, 14 warnings = main's baseline) +npm run buildgreenStacked on #19 — merge that first; this PR's base is
feat/ux-truth-foundations.🤖 Generated with Claude Code