Skip to content

feat(graph): live watcher, /graph toggle, AgentSession wiring (PR3) - #443

Merged
mohitranka merged 1 commit into
mainfrom
feat/knowledge-graph-pr3-watcher-toggle
Aug 26, 2026
Merged

mohitranka merged 1 commit into
mainfrom
feat/knowledge-graph-pr3-watcher-toggle

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

  • forge-graph's initial build is now hash-aware (skips unchanged files on re-open) and a debounced notify watcher keeps the graph live for the rest of the process (crates/forge-graph/src/watcher.rs).
  • GraphHandle gains pause_watcher/resume_watcher/is_watching; resuming runs a cheap catch-up sweep for edits missed while paused.
  • AgentSession holds the workspace's GraphHandle and exposes set_graph_enabled/graph_enabled/has_graph; tools_for_model() gets a third filter stage hiding find_definition/find_references when disabled, mirroring the existing MCP-deferral layering.
  • New /graph [on|off] TUI slash command wired to the toggle, plus a palette entry.
  • Fixed a path-canonicalization bug found while writing the watcher e2e test: on macOS, notify reports paths through /private/var/... while a workspace root often resolves through the same symlink un-canonicalized, so strip_prefix silently produced the wrong relative key and stale rows never cleared.

Closes out the knowledge-graph plan phased delivery (PR1 #441, PR2 #442, this is PR3). docs/ is gitignored so the plan's doc-update item isn't committable — skipped, as previously confirmed.

Test plan

  • cargo test -p forge-graph — 44 tests incl. 2 new watcher e2e tests (live edit pickup, pause/resume catch-up)
  • cargo test -p forge-core — new tools_for_model graph-filter test
  • cargo test -p forge-session — new graph-attach/toggle tests
  • cargo test -p forge-tui — new /graph parse tests
  • cargo test --workspace — full suite green
  • cargo fmt --all / cargo clippy --workspace --all-targets clean

https://claude.ai/code/session_01Tb5bxZgFovoKct29q9VEgs

Completes the knowledge-graph phased plan: forge-graph now hash-aware
rebuilds and keeps itself live via a debounced notify watcher; AgentSession
holds the GraphHandle and exposes set_graph_enabled to pause/resume the
watcher and hide find_definition/find_references from the model; the TUI
gets a /graph [on|off] slash command wired to the same toggle.

Claude-Session: https://claude.ai/code/session_01Tb5bxZgFovoKct29q9VEgs
@mohitranka
mohitranka merged commit aae0844 into main Aug 26, 2026
7 checks passed
@mohitranka
mohitranka deleted the feat/knowledge-graph-pr3-watcher-toggle branch August 26, 2026 08:12
mohitranka added a commit that referenced this pull request Aug 26, 2026
* Revert "feat(graph): live watcher, /graph toggle, and AgentSession wiring (PR3) (#443)"

This reverts commit aae0844.

* Revert "feat(graph): extend symbol graph to Python, Go, TypeScript, JavaScript (PR2) (#442)"

This reverts commit a58b6a2.

* Revert "feat(graph): add repo-wide symbol graph, find_definition/find_references (PR1: Rust) (#441)"

This reverts commit ea4c3b9.
mohitranka added a commit that referenced this pull request Sep 11, 2026
…3) (#443)

Completes the knowledge-graph phased plan: forge-graph now hash-aware
rebuilds and keeps itself live via a debounced notify watcher; AgentSession
holds the GraphHandle and exposes set_graph_enabled to pause/resume the
watcher and hide find_definition/find_references from the model; the TUI
gets a /graph [on|off] slash command wired to the same toggle.

Claude-Session: https://claude.ai/code/session_01Tb5bxZgFovoKct29q9VEgs
mohitranka added a commit that referenced this pull request Sep 11, 2026
* Revert "feat(graph): live watcher, /graph toggle, and AgentSession wiring (PR3) (#443)"

This reverts commit ec8c1ef.

* Revert "feat(graph): extend symbol graph to Python, Go, TypeScript, JavaScript (PR2) (#442)"

This reverts commit 0e813ab.

* Revert "feat(graph): add repo-wide symbol graph, find_definition/find_references (PR1: Rust) (#441)"

This reverts commit e18cf38.
mohitranka added a commit that referenced this pull request Sep 11, 2026
…3) (#443)

Completes the knowledge-graph phased plan: forge-graph now hash-aware
rebuilds and keeps itself live via a debounced notify watcher; AgentSession
holds the GraphHandle and exposes set_graph_enabled to pause/resume the
watcher and hide find_definition/find_references from the model; the TUI
gets a /graph [on|off] slash command wired to the same toggle.

Claude-Session: https://claude.ai/code/session_01Tb5bxZgFovoKct29q9VEgs
mohitranka added a commit that referenced this pull request Sep 11, 2026
* Revert "feat(graph): live watcher, /graph toggle, and AgentSession wiring (PR3) (#443)"

This reverts commit c8048f9.

* Revert "feat(graph): extend symbol graph to Python, Go, TypeScript, JavaScript (PR2) (#442)"

This reverts commit b48bbbe.

* Revert "feat(graph): add repo-wide symbol graph, find_definition/find_references (PR1: Rust) (#441)"

This reverts commit f2acb05.
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