Microphone capture runs in the extension host, and for Remote-SSH, WSL,
dev containers, and tunnels that host is the remote machine. Such a machine
normally has no capture device, so starting a recording failed with
"Could not start microphone recording".
Detect the window kind from vscode.env.remoteName and report a speechToText
capability to the webview. When it is false, hide the microphone button,
skip prewarming, and disable the speech shortcut in the prompt input, the
Agent Manager new worktree dialog, and the diff viewer review annotations.
The Speech to Text settings row explains that a local window is needed.
Fixes#14197
VS Code's webview preload intercepts Ctrl/Cmd+Z and Ctrl+Y and forwards
them to the workbench, so the prompt input stopped propagation but never
performed the edit. A webview keypress has no native undo default action
on macOS, so the undo stack stayed untouched and the shortcuts did
nothing.
Perform the edit with document.execCommand on the same native undo stack
real typing builds, and match keyCode like VS Code does so non-Latin
keyboard layouts no longer leak the key back to the workbench.
The Agent Manager New Worktree prompt had the same gap with no guard at
all; it now shares the same helper through prompt-input-utils.
Content rejections such as an empty body or a bad line range leave the snapshot valid, so gate the reload on the host's reload hints instead of every failed comment. Extend the regression test to cover the non-expiry cases.
The Agent Manager diff surfaces cache PR snapshots per target while the host keeps only the eight most recent, so a cached snapshot can be evicted and every comment post then fails with "Review snapshot expired". Drop the cached snapshot and reload it when the host rejects a comment, so the next attempt is bound to a snapshot the host still holds.
The extraction dropped the early return the inline branch had: a
`agentManager.prError` for a background project used to stop there, and
after the move it fell through to `projectLive.apply(msg)`. Harmless only
because that router has no branch for the message today.
`reportFailure` now answers "stale" for it — the same contract
`routeReview` already uses in this handler — and the call site returns on
it, so the control flow is in the code rather than implied by a boolean
nobody read.
The merge left AgentManagerApp.tsx 11 lines over its 2800-line lint cap:
main had grown it to 2799 and this branch adds the health props and the
error toast. Rather than raise the cap, both failure-reporting branches
move to failure-toast.ts — the PR error code and the plain error message
are the same concern, and neither needs anything from the component but
the toast, the translator, and the project on screen.
Twelve findings from a review of this PR against the recent gh, worktree,
staleness, and pooling work. The theme is that the hardening landed on the
paths this PR touched, while adjacent paths kept the old semantics.
VS Code:
- The batched GraphQL lookup became the primary PR path after 81b9c21c24,
and it bypassed everything this PR added: a 20s budget instead of
BUDGET.gh, no timeout classification, and no quarantine or health gate,
so a parked worktree still cost a git process per full sync and could
become the working directory of the whole `gh api graphql` call. It now
runs on the shared budgets, skips parked worktrees, and reports a
timeout as a timeout instead of retrying it as an unsupported field.
- Orphan reporting re-checks git registration before naming a directory,
so a worktree the pool created mid-pass is no longer offered for
deletion, and an unanswerable re-check reports nothing.
- Restoring a worktree clears its PR polling backoff, instead of leaving
the worktree the user just repaired parked for up to half an hour.
- The orphan kind reaches the webview: a directory that still holds a
checkout is marked and gets a confirmation that says it may hold
uncommitted work, rather than "nothing here is tracked by git".
- Removing a stale entry no longer dead-ends when terminals cannot be
stopped. Nothing on that path deletes files, so for an unregistered
worktree the only action offered used to fail with an unrelated error.
- PR import runs gh on BUDGET.gh and reports a hang as a timeout.
- findWorktreeByPath and prepareWorktreePath compare with pathKey, so a
symlinked parent or a case variant cannot hide a registration.
- Quarantine gained a non-mutating peek, so generating a diagnostics
report no longer releases the quarantines it is reporting.
- The stats loop gained the same per-worktree backoff as the PR loop; an
explicit refresh still measures a parked worktree.
JetBrains:
- A poll prunes stale worktree metadata only when no mutation holds the
repository lock, and never waits for it. `git worktree add` registers a
worktree before its checkout is written, so pruning underneath one
could delete the metadata of a worktree being created.
- `git status` is off the 5s probe budget: it scans the working tree, so
on a large or cold worktree the probe budget reported unavailable for a
measurement that would have succeeded. The sync prune uses the write
budget its docstring already claimed.
Await Playwright readiness before withRetry so prompt errors keep their
backoff, drop the draft browser entry on close instead of storing an
authoritative null, translate the Integrated Browser panel strings in all
Agent Manager locales, and tighten the lifecycle and Agent Manager tests.
Wait for the Playwright MCP server before Agent Manager prompts as well as
sidebar prompts, and stop respawning a failed server on every prompt.
Let the Integrated Browser panel open on a fresh Local tab before a
session exists, and rename the Agent Manager browser to Integrated
Browser in settings, tool output, and docs.
Background subagent transcripts forced the capped preview through a reasoningCapped prop. Remove that path so subagent reasoning uses the same Expanded, Preview, or Headline setting as the main chat, and drop the now-unused prop plumbing and capped input to reasoningOpenState.
Follow-up to the worktree-health PR, fixing the cases where an
indeterminate answer was still treated as a definite one.
- `removeOrphanDirectory` failed open: an unanswerable `git worktree
list` skipped the live-worktree guard and recursively deleted the
path. It now refuses.
- `applyPresence` used `some` to sync branches, so only the first
drifted worktree was synced per presence tick.
- The reconcile drop loop re-reads the session count: `prune` is awaited
after classification, and a session attached in that window would have
been deleted with the row.
- `unavailable` is no longer treated as broken. It paused stats/PR
polling for the rest of the session, rendered as a warning badge, and
offered the entry-dropping removal actions for a worktree that is
probably fine. A presence probe now also re-schedules a reconcile
while the last report is degraded.
- Git and gh timeouts are classified from the killed/signal shape rather
than from message text, so a watchdog kill no longer surfaces as a raw
"Command failed" string.
- A PR strategy ladder that only timed out now reports the failure
instead of falling through to "no PR", which cleared the quarantine
and rendered a wedged `gh` as a clean worktree.
- The PR loop counts rejections that are not attributable to already
quarantined worktrees, instead of comparing two unrelated totals.
- JetBrains: `stop()` cancels the stats/dirty jobs, an empty list from a
failed `git worktree list` no longer clears every badge, a TIMEOUT no
longer consumes the one-shot gh notification, the diagnostics
clipboard write moved to the EDT, `git fetch`/`worktree add` got their
own wider budget, and a timed-out review-thread query no longer reads
as "every conversation settled".
- Added the three missing `agentManager.setup.error.*` keys in all 21
dictionaries; they were rendering as literal keys.
Agent Manager could tell a user "Git is not installed or not found in PATH"
while git was installed and working, show a worktree as having no changes when
the status check had actually failed, and keep polling worktrees whose folder
was long gone. One unresponsive worktree was enough to slow down status updates
for every other row.
Three causes, all of them the same mistake in different places: a failure was
reported as a fact about something else.
- A failed process launch reports ENOENT whether the program or the working
directory is missing, and the code read that as "git is missing".
- A failed or timed-out status check returned zero counts, which is
indistinguishable from a clean worktree.
- A timed-out GitHub CLI call was recorded as a success, which reset the
backoff that was supposed to stop retrying it.
Nothing reconciled the three views of a worktree either (the row, git's own
registration, the folder on disk), so stale rows accumulated and were polled
forever, and a timed-out `gh pr view` was retried on every cycle.
Approach: name each state and never guess between them. A worktree is healthy,
restorable, gone, not-a-worktree, or unmeasurable, and each state gets the
message and the recovery action that actually applies. Startup reconciles the
three views and repairs metadata only; deleting files is always a user's
click. Repeated failures park one worktree instead of the whole panel, and
git/gh calls get budgets sized to the work they do.
Both clients implement the same states, wording, and recovery actions.
Add a chain-link action to Agent Manager PR comment cards that copies the comment GitHub permalink. The action renders only when the comment has a valid URL and reuses the existing copy feedback. It covers review-thread and conversation cards, including the diff viewer comment card, and adds the copy comment link label to all locales.
Drop the never-read `available` and `label` members from the GitHub
comment context introduced with inline PR comments, and cover the
retained resolve/send gating with a focused test.
- Track dropped mentions so typing after a drop keeps the dropdown closed
- Detect leaving the side panel via strip bounds so leftward reordering works
- Tear down the drop listener and drag state when the prompt unmounts
- Restore sidebar worktree order on prompt and outside drops
- Derive the disabled flag for drag-dropped worktree references
Register a detached worktree in the background and claim it for a new
session instead of running a full worktree checkout at creation time.
Add per-phase creation timing and the "Pre-warm worktrees" Agent Manager
setting, enabled by default.
Also fix a claim path that could reset an existing branch whose name
matched a pooled worktree directory, and raise the worktree add worker
count for the fallback path.
Render one chevron glyph and rotate it for the expanded state. The separate
chevron-down icon draws at a different weight, so expanded and collapsed
section headers looked inconsistent.