Skip to content

Silence the canvas fallback prompt when Treemon reports a worktree unmonitored - #178

Merged
0101 merged 1 commit into
mainfrom
silence-unmonitored-canvas-fallback
Aug 26, 2026
Merged

Silence the canvas fallback prompt when Treemon reports a worktree unmonitored#178
0101 merged 1 commit into
mainfrom
silence-unmonitored-canvas-fallback

Conversation

@0101

@0101 0101 commented Aug 26, 2026

Copy link
Copy Markdown
Owner

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

  • Keep serving browser-fallback pages when Treemon reports the worktree unmonitored, but stop sending the URL to the session.
  • Keep sending the URL when Treemon is unreachable, and say so in the prompt text.
  • Add extension coverage for both browser-fallback branches.
  • Update docs/spec/canvas-browser-fallback.md and the canvas skill to describe the two branches.

Tests

  • npm run test:extension - 74 passed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 12af1745-d3f9-4086-a0ff-24303f24dcd8
Copilot AI balanced review requested due to automatic review settings August 26, 2026 10:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@0101
0101 merged commit f8032ef into main Aug 26, 2026
2 checks passed
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.

2 participants