Skip to content

feat(graph): F6 UX follow-ups — cluster collapse + ArrowKey nav + EVID-013#31

Merged
explosivebit merged 4 commits into
developfrom
feature/ux-followups-f6
May 5, 2026
Merged

feat(graph): F6 UX follow-ups — cluster collapse + ArrowKey nav + EVID-013#31
explosivebit merged 4 commits into
developfrom
feature/ux-followups-f6

Conversation

@explosivebit
Copy link
Copy Markdown
Contributor

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.ts with pickNextNode(current, candidates, direction) — cone-based selection (±60° around axis), cost = distance · (1 + 2·angle/π), falls back to nearest. Wired into both RadialView and ForceView. Adds data-id on 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 informs to 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.
  • DOM check on live workspace: collapse hides ring ≥ 2 (rings 8 → 6, nodes 23 → 13 when 1 cluster collapsed). ArrowRight from PRD-001 → RFC-002 (correctly picks rightward neighbour).

Refs: PRD-005 RFC-004 EVID-013

Test plan

  • CI smoke matrix (3-OS × Node 22) green.
  • svelte-check clean on PR.
  • vitest 24/24 pass.
  • Manual: tab into a node, press arrows — focus moves directionally. Click "−" on a centre cluster — outer rings hide.

🤖 Generated with Claude Code

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
@explosivebit explosivebit merged commit 1f5cdad into develop May 5, 2026
3 checks passed
@explosivebit explosivebit deleted the feature/ux-followups-f6 branch May 5, 2026 20:22
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.

1 participant