Path Finder - "how are these two observations related?" #129
Labels
No labels
bug
duplicate
enhancement
future
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/TeaLeaves#129
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature idea (Fable ideation, rank #6) · Effort: M · Value: Med-High
Pitch
Pick any two entries (or an entry and a motif) and get the chain(s) linking them - through typed connections and shared motifs - rendered in the existing graph view.
Why it matters
With thousands of entries, the connection graph is now too big to hold in her head. The graph view shows one motif's neighborhood; it can't answer "I know these two ideas touch - show me the route," which is how a researcher reasons across years of material. Paths through
precedes/extends/responds_toedges are literally arguments waiting to be written down.How it fits
A recursive CTE over
connections(both directions) unionentry_motifshops, depth-capped (~5) and scoped byACTIVE_PROJECT_SQL- one new endpoint inroutes/connections.ts, no schema change. Render with the@xyflow/reactcomponents already used for the motif graph; edge labels fromconnections.typeand the migration-012timestampschips.Why it was likely missed
The graph was built as a visualization (Phase 5), not a query surface; once it rendered, "graph" was checked off. Path queries only become valuable after years of accumulation - i.e. now.
Acceptance criteria
From the 2026-07-15 codebase audit - Fable feature-ideation pass. Companion report:
docs/.internal/report-2026-07-15.md(gitignored).Done — shipped in v9.2.0 (PR #141, merge
dad048a).Delivered:
services/pathFinder.ts+GET /api/connections/path?from=&to=|to_motif=, and a Path Finder section on the Insights page (entry/motif pickers + xyflow graph render, clickable nodes, typed edge labels). 6 new integration tests.Implementation note: the pitch suggested a recursive CTE, but I used a bounded bipartite BFS in the service instead — motifs are modelled as nodes (entry↔motif↔entry) rather than materialising every entry-pair that shares a motif, so a hub motif with hundreds of members can't explode the search. Depth-capped (8 steps) and scoped to the active project.
Acceptance: ✅ two entries (or entry+motif) → connecting path, depth-capped · ✅ renders in the graph view with typed edge labels · ✅ "No path found" handled explicitly.