feat(graph): F6 UX follow-ups — cluster collapse + ArrowKey nav + EVID-013#31
Merged
Conversation
Adds a small "−/+" toggle near each cluster's centroid (rendered only for clusters with ≥ 3 rings). Click or Enter/Space collapses the cluster to root + ring 1 (hides ring ≥ 2 members and their orbits); click again to expand. State per-view in $state(Set<string>); fitToView re-fires on toggle so the new bbox fits. Improves the UX on workspaces with one dense centre cluster — labels stay legible because the outermost ring (largest radius) collapses out, and the user can still see siblings without panning. Refs: PRD-005 RFC-004
…ceView) New shared lib `keyboard-nav.ts` exporting `pickNextNode(current, candidates, direction)`. Cone-based selection: candidates inside a ±60° cone around the cardinal axis, scored by `distance · (1 + 2·angularDeviation/π)`. Falls back to nearest neighbour when no candidate falls inside the cone, so the user always moves. Wired into both RadialView and ForceView via `onNodeKeydown` on each `<g class="node">`. Each card gets `data-id` attribute so focus can be routed by id. Enter/Space still triggers selection (unchanged). 6 vitest unit tests in `keyboard-nav.test.ts` cover: cardinal-axis preference; cone fallback to nearest; same-position dedup; close-off vs far-on-axis tradeoff; null on single-node graph. Closes the audit's MEDIUM "no keyboard navigation between nodes" finding. Refs: PRD-005 RFC-004
DOM-verified acceptance pack for the post-merge audit cleanup: - All CRITICAL/HIGH/MEDIUM/LOW findings closed in PR #28 - 18 vitest unit tests passing (16 cluster + 2 regression) - Live workspace: 0 bbox overlaps, 23/23 cards exact-on-orbit (was 21/22 in EVID-012 baseline) - CVE-2024-47764 (cookie<0.7.0) closed via overrides Structured Fields: verdict supports / CL3 / measurement. Linked: informs PRD-005, informs RFC-004, informs EVID-012. Score after activation: - EVID-013: R_eff 0.80 (Adequate, F-G-R B) - PRD-005: R_eff 1.00 / Quality 0.82 (A) with 2 evidence Refs: PRD-005 RFC-004
…ps-f6 Pull in PR #27 (Feature/playground) merged to develop after this branch was cut. Auto-merge clean for ForceView.svelte and RadialView.svelte (both files added per-node `nodeClass` and BFS hover-distance imports on develop, complementary to F6's data-id and onNodeKeydown hooks). Conflict resolved: drop `.forgeplan/session.yaml` (deleted on develop). Refs: PRD-005 RFC-004
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
Two UX follow-ups from the F5 audit, plus the F5 acceptance evidence pack.
F6-T1 — RadialView cluster collapse
Toggle ("−/+") near each cluster's centroid. Visible only for clusters with ≥ 3 rings. Click/Enter collapses that cluster to root + ring 1; click again to expand. State per-view; fitToView re-runs on toggle.
F6-T2 — ArrowKey navigation between nodes
New shared lib
keyboard-nav.tswithpickNextNode(current, candidates, direction)— cone-based selection (±60° around axis), cost =distance · (1 + 2·angle/π), falls back to nearest. Wired into both RadialView and ForceView. Addsdata-idon each<g class="node">. 6 unit tests.F6-T3 — EVID-013
Forgeplan acceptance pack closing the F5 audit-cleanup work that landed in PR #28. Linked
informsto PRD-005, RFC-004, EVID-012. R_eff 0.80; PRD-005 quality bumped to A (0.82).Verify
npx svelte-check— 0 errors / 0 warnings / 406 files.npm test— 24 / 24 passed (16 cluster + 2 regression + 6 keyboard-nav).npm run smoke— PASS.Refs:
PRD-005RFC-004EVID-013Test plan
🤖 Generated with Claude Code