Skip to content

fix(desktop): surface an error when session actions race controller startup#3946

Merged
esengine merged 1 commit into
main-v2from
fix/new-session-feedback
Jun 11, 2026
Merged

fix(desktop): surface an error when session actions race controller startup#3946
esengine merged 1 commit into
main-v2from
fix/new-session-feedback

Conversation

@esengine

Copy link
Copy Markdown
Owner

With two workspaces open, "new session" in the not-yet-started workspace did nothing: App.NewSession/ClearSession return nil when the tab's controller is still being built (lazy per-tab construction includes MCP startup, so the window is real — cf. #3818), and the frontend then dispatched its reset regardless, clearing the visible transcript even though the backend did nothing. Silent success-shaped failure on both sides (#3938, discussion #3831).

  • Backend: a nil-controller session action now returns a named reason — workspace is still starting, or workspace failed to start: <tab.StartupErr> when the build actually failed (that case already has the topbar banner explaining itself).
  • Frontend: newSession/clearSession only reset the transcript when the backend call succeeded; a refusal keeps the conversation on screen instead of faking a fresh session.

Test covers both the no-controller error and the startup-failure message carrying the tab's error.

Closes #3938

…tartup

NewSession/ClearSession returned nil when the active tab's controller
didn't exist yet (lazy per-tab construction includes MCP startup, so the
window is real), and the frontend reset the transcript regardless — the
click was swallowed with no feedback, and with a second workspace open
"new session" appeared simply broken (#3938).

The backend now names the reason (still starting, or the tab's startup
failure), and the frontend only resets the transcript when the backend
actually rotated the session.

Closes #3938
@esengine esengine requested a review from SivanCola as a code owner June 11, 2026 04:35
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 11, 2026
@esengine esengine merged commit 4e5aabe into main-v2 Jun 11, 2026
14 checks passed
@esengine esengine deleted the fix/new-session-feedback branch June 11, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop: NewSession/ClearSession silently no-op while a tab's controller is still starting

1 participant