Path Finder - "how are these two observations related?" #129

Closed
opened 2026-07-15 20:35:38 +00:00 by claude-bot · 1 comment
Contributor

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_to edges are literally arguments waiting to be written down.

How it fits
A recursive CTE over connections (both directions) union entry_motifs hops, depth-capped (~5) and scoped by ACTIVE_PROJECT_SQL - one new endpoint in routes/connections.ts, no schema change. Render with the @xyflow/react components already used for the motif graph; edge labels from connections.type and the migration-012 timestamps chips.

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

  • Selecting two entries (or entry+motif) returns the connecting path(s), depth-capped.
  • Results render in the existing graph view with typed edge labels.
  • "No path found" is handled explicitly.

From the 2026-07-15 codebase audit - Fable feature-ideation pass. Companion report: docs/.internal/report-2026-07-15.md (gitignored).

**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_to` edges are literally arguments waiting to be written down. **How it fits** A recursive CTE over `connections` (both directions) union `entry_motifs` hops, depth-capped (~5) and scoped by `ACTIVE_PROJECT_SQL` - one new endpoint in `routes/connections.ts`, no schema change. Render with the `@xyflow/react` components already used for the motif graph; edge labels from `connections.type` and the migration-012 `timestamps` chips. **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** - [ ] Selecting two entries (or entry+motif) returns the connecting path(s), depth-capped. - [ ] Results render in the existing graph view with typed edge labels. - [ ] "No path found" is handled explicitly. --- _From the 2026-07-15 codebase audit - Fable feature-ideation pass. Companion report: `docs/.internal/report-2026-07-15.md` (gitignored)._
Author
Contributor

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.

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.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/TeaLeaves#129
No description provided.