Skip to content

fix(vscode): keep agent view metadata on snapshot errors#2848

Merged
Hmbown merged 1 commit into
codex/v0.9.0-stewardshipfrom
codex/v090-vscode-agent-view-resilience
Jun 6, 2026
Merged

fix(vscode): keep agent view metadata on snapshot errors#2848
Hmbown merged 1 commit into
codex/v0.9.0-stewardshipfrom
codex/v090-vscode-agent-view-resilience

Conversation

@Hmbown
Copy link
Copy Markdown
Owner

@Hmbown Hmbown commented Jun 6, 2026

Summary\n- refresh Agent View thread summaries and restore points independently in the VS Code extension\n- keep branch/workspace thread metadata available when snapshot listing fails\n- update committed extension output and changelogs\n\n## Stewardship notes\n- Read-only extension-side resilience only: no runtime mutation endpoint, no restore/retry/undo behavior, no thread/file state mutation.\n- Preserves the #2580 Agent View lane while keeping #2808's mutating endpoints deferred until atomicity tests exist.\n\n## Verification\n- npm run check (extensions/vscode)\n- cmp -s CHANGELOG.md crates/tui/CHANGELOG.md && echo changelogs-match\n- git diff --check\n- ./scripts/release/check-versions.sh\n- ./scripts/release/check-ohos-deps.sh

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Hmbown has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@Hmbown Hmbown merged commit 23a188e into codex/v0.9.0-stewardship Jun 6, 2026
2 checks passed
@Hmbown Hmbown deleted the codex/v090-vscode-agent-view-resilience branch June 6, 2026 08:49
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a helper function refreshAgentViewDetails in the VS Code extension to refresh the Agent View and snapshots independently, ensuring that a failure in one does not clear the metadata of the other. The reviewer suggested running these two independent refresh operations concurrently using Promise.all instead of sequentially to reduce latency and improve responsiveness.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +41 to +63
const refreshAgentViewDetails = async (showWarning: boolean): Promise<void> => {
try {
await refreshAgentView();
} catch (error: unknown) {
const detail = error instanceof Error ? error.message : String(error);
statusView.updateThreads([], "Runtime thread summaries unavailable.");
output.appendLine(`Runtime thread summaries unavailable: ${detail}`);
if (showWarning) {
void vscode.window.showWarningMessage(detail);
}
}

try {
await refreshSnapshots();
} catch (error: unknown) {
const detail = error instanceof Error ? error.message : String(error);
statusView.updateSnapshots([], detail);
output.appendLine(`Runtime restore points unavailable: ${detail}`);
if (showWarning) {
void vscode.window.showWarningMessage(detail);
}
}
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The functions refreshAgentView() and refreshSnapshots() are executed sequentially with await. Since these operations are independent, running them sequentially introduces unnecessary latency, especially if one of the network requests is slow or times out. Running them concurrently using Promise.all would improve the responsiveness of the Agent View.

  const refreshAgentViewDetails = async (showWarning: boolean): Promise<void> => {
    const agentViewPromise = refreshAgentView().catch((error: unknown) => {
      const detail = error instanceof Error ? error.message : String(error);
      statusView.updateThreads([], "Runtime thread summaries unavailable.");
      output.appendLine(`Runtime thread summaries unavailable: ${detail}`);
      if (showWarning) {
        void vscode.window.showWarningMessage(detail);
      }
    });

    const snapshotsPromise = refreshSnapshots().catch((error: unknown) => {
      const detail = error instanceof Error ? error.message : String(error);
      statusView.updateSnapshots([], detail);
      output.appendLine(`Runtime restore points unavailable: ${detail}`);
      if (showWarning) {
        void vscode.window.showWarningMessage(detail);
      }
    });

    await Promise.all([agentViewPromise, snapshotsPromise]);
  };

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