feat(kb): graph navigability — focus + context map (implements #73) - #90
Open
jordanrburger wants to merge 4 commits into
Open
feat(kb): graph navigability — focus + context map (implements #73)#90jordanrburger wants to merge 4 commits into
jordanrburger wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…breadcrumb Implements the spec's stale-focus fallback (review note on #73): when the focused note is deleted/renamed, the map falls back to the hub seed via a cheap existence guard against service.tree; back-history skips stale entries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t cap caption Vault-empty (no notes at all) shows the map empty state with the spec's "showing 0 of 0" caption; filtered-to-empty shows "No notes match these filters" with a reset affordance — distinguished per the #73 review notes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ree orphan note, neutral search example 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.
Implements the KB graph navigability feature per the spec + plan merged in #73, with the merge-time review notes applied where they override the plan.
What changed
Task 1 — engine (
KBGraph.swift,KnowledgeBaseService.swift)KBGraph.topHubs(maxNodes:)— top nodes by degree (id-ascending tiebreak), only edges internal to the kept set; no-op under the cap.KBGraph.filtered(types:hideOrphans:minDegree:)— pure post-filter; always retains the center so a re-rooted view is never emptied.KnowledgeBaseService.hubGraph(maxNodes: 40)— the overview's default seed (fullGraph().topHubs).KBGraphTransformTestssuite (6 tests, TDD; fixtures use the neutral alex/priya/sam stand-ins).Task 2 —
KBMapView(new) embedded inKBOverviewViewin place of the unboundedfullGraph()maplocalGraph(around:depth:2,maxNodes:40)); tapping the centred node again — or the breadcrumb "Open" button — opens it in the editor.Task 3 — filters + honest captions
Review notes from #73 applied
effectiveFocusguard checks the focused path still exists inservice.tree; if the note was deleted/renamed the map falls back to the hub seed, and ‹ Back skips history entries whose note is gone.ScoutTeststarget run before each commit — 429 tests in 79 suites, 0 failures (no-only-testingfalse greens).Inline nits: no
tryon the non-throwingreparseAndWait(); canvas.idkeyed on the sorted rawValue join of active types (not the set count); spec updated with the tap-divergence sentence, the global-degree "Hide orphans" note, and a neutral search example.Verification
xcodebuild build -scheme Scout -destination 'platform=macOS'— BUILD SUCCEEDED.ScoutTeststarget after every task: 429 tests in 79 suites passed./runGUI walkthrough (tap-to-re-root, filter toggles) could not be driven autonomously: this machine has no accessibility grant for UI scripting and the env-gated boot-tab harness was never merged, so the KB tab can't be reached programmatically. Please give the map a quick manual spin before merging.🤖 Generated with Claude Code