Silence the canvas fallback prompt when Treemon reports a worktree unmonitored - #178
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 12af1745-d3f9-4086-a0ff-24303f24dcd8
There was a problem hiding this comment.
🟢 Approval recommended
The implementation, tests, and documentation consistently distinguish unreachable Treemon from explicitly unmonitored worktrees.
Pull request overview
This PR prevents competing canvas prompts when Treemon explicitly reports an unmonitored worktree while preserving browser fallback when Treemon is unreachable.
Changes:
- Adds registration-aware fallback prompt generation.
- Covers both fallback branches with tests.
- Updates the authoritative spec and canvas skill guidance.
File summaries
| File | Description |
|---|---|
src/Extension/skill/SKILL.md |
Documents host-aware fallback behavior. |
src/Extension/session-prompt.test.mjs |
Tests silent and prompted fallback branches. |
src/Extension/session-prompt.mjs |
Generates prompts only when Treemon is unreachable. |
src/Extension/extension.mjs |
Applies registration state when handling canvas writes. |
docs/spec/canvas-browser-fallback.md |
Updates fallback behavior specification. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Problem
When Treemon is running but reports the current directory as unmonitored, the canvas extension still sends a browser-fallback URL to the session after every canvas write. If the host has its own canvas pane, that prompt pushes the agent to share a second, competing view of the same doc.
Changes
docs/spec/canvas-browser-fallback.mdand the canvas skill to describe the two branches.Tests
npm run test:extension- 74 passed