Skip to content

fix: the Yard view shows the Yard after an upgrade through the tab, and ignores health checks from before it hid - #9

Merged
oddessentials merged 1 commit into
mainfrom
fix/session-follow-ups
Oct 21, 2026
Merged

oddessentials merged 1 commit into
mainfrom
fix/session-follow-ups

Conversation

@oddessentials

Copy link
Copy Markdown
Owner

Two fixes to the Yard view's lifecycle in 1.2.0, both in src/yard.js. Merging makes 1.2.1.

The view keeps its update notice after an upgrade through the tab

  • Cause: after an upgrade, the tab restarts the manager on the same port and token, and its page reconnects in place. The extension fires ready, but connected only fires from Panel.show(), so a view showing "needs Agent Guild 1.5.0" kept the notice until it was hidden and shown again. The view's "not running" and "stopped responding" notices got stuck the same way when a manager came back at its old address.
  • Fix: the view now listens to the tab's ready. If it is showing a notice, it checks the manager again with the same version and health checks. A view that shows the Yard is left alone, so there are no extra reloads, and repeated ready events start one check.

A stale health check can replace a working Yard

  • Cause: if the view was hidden and shown again while a frame health check was pending, VS Code restored the same page, so the page id still matched. A failure that arrived before the restored page reported ready then replaced it with "stopped responding".
  • Fix: a counter goes up each time the view hides. A check that started before that is ignored, and the restored page's own frame load starts a fresh check. The page-identity and disposal guards are unchanged.

No timers, polling or new connection states.

Tests

  • test/yard.test.js (new, in npm test) runs YardView against doubles of VS Code and the manager:

    • an upgrade turns the notice into the Yard, once, even after two ready events;
    • a ready while the Yard shows causes no reload;
    • a failed check from before a hide and show is ignored, while a failed check on the current page still shows the notice.

    The two regression tests fail against the 1.2.0 code and pass with the fix.

  • e2e in real VS Code adds an upgrade from 1.4.0 through the tab: a stub reporting 1.4.0 makes the view ask for an update, then the real manager restarts in place, and the view shows the Yard without being hidden, loading it once. With the 1.2.0 code this step fails ("did not happen within 60 s").

  • Local runs: the full e2e suite passed twice against a manager from agent-guild main, and against the published 1.4.0 (the path CI takes). Unit tests 10/10, and the VSIX packages.

🤖 Generated with Claude Code

…nd ignores health checks from before it hid

- When the tab's page reconnects in place, as after an upgrade's restart,
  a view showing a notice checks the manager again. A view showing the
  Yard is left alone, and repeated ready events start one check.
- A frame check that started before the view hid no longer replaces the
  page VS Code restores when the view shows again.
- Unit tests run the view against doubles of VS Code and the manager; the
  e2e suite adds an upgrade from 1.4.0 through the tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oddessentials
oddessentials merged commit 39469ac into main Oct 21, 2026
7 checks passed
@oddessentials
oddessentials deleted the fix/session-follow-ups branch October 21, 2026 22:28
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