fix: recover from session start failures in the AFDX agent preview @W-22434854@#204
Open
marcelinollano wants to merge 3 commits into
Open
fix: recover from session start failures in the AFDX agent preview @W-22434854@#204marcelinollano wants to merge 3 commits into
marcelinollano wants to merge 3 commits into
Conversation
When a session start fails, the webview's isSessionStarting flag and the agentforceDX:sessionStarting context were not reliably cleared, leaving the title-bar Refresh and Reset buttons unresponsive. - Always clear setSessionStarting(false) in the backend error handler, not just when an agent instance had been created. - In the webview, clear isSessionStarting on compilationError, clearMessages, and refreshAgents in addition to the existing error handler. W-22434854
Compilation errors were rendered as plain text inside the chat transcript. Route them through the same error screen as other session start failures, with an icon and a Go Back button. The bold title is now always "Something went wrong" with the specific cause shown as details below, so the entry point to recovery is consistent across all error types. Keep the agent selector mounted while the error screen is showing so it does not refetch the agents list and disable its controls when the user clicks Go Back. W-22434854
The error screen has a bold title and a muted subtitle. The previous copy used a long sentence as the title and the raw server error as the subtitle, which read poorly and exposed stack-like text to users. Move the human-readable explanation into the subtitle and use short, recognizable titles for known cases. The generic case still shows the raw server error in the subtitle, since there is no curated copy to display there. W-22434854
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.
@W-22434854@
Summary
When a session start failed in the AFDX VS Code extension agent preview, the title-bar Refresh and Reset (clear-all) icons became unresponsive and compilation errors rendered as plain text inside the chat transcript. This PR routes every failure through the same error screen, keeps the agent selector mounted while recovering, and rewrites the error copy so the bold title is short and the muted subtitle holds the explanation.
Before
agentforceDX:sessionStartingcontext flag never cleared.After
error,compilationError,clearMessages, andrefreshAgentsso the buttons never get stuck.Testing
Automated
npm run test:backend— 381 tests pass; updated assertions intest/views/agentCombined/handlers/webviewMessageHandlers.test.tsfor the new short titles and subtitle copy.npm run test:frontend— 387 tests pass; updatedtest/webview/AgentPreview.messages.test.tsxto assert the compilation error renders the unified error screen with title and subtitle.Manual verification