Skip to content

Fix Ask/Act toggle missing default selection on new session#4261

Merged
jurgenwerk merged 2 commits into
mainfrom
cs-10542-askact-toggle-is-missing-a-default-state-when-opening-new
Mar 30, 2026
Merged

Fix Ask/Act toggle missing default selection on new session#4261
jurgenwerk merged 2 commits into
mainfrom
cs-10542-askact-toggle-is-missing-a-default-state-when-opening-new

Conversation

@jurgenwerk
Copy link
Copy Markdown
Contributor

@jurgenwerk jurgenwerk commented Mar 27, 2026

When opening starting a new session in the AI assistant, the toggle is sometimes untoggled:

image

Summary

  • Normalize @selected in LLMModeToggle so the toggle always defaults to "Ask" when the value is not explicitly "act"
  • Prevents a blank toggle during transient room-resource states introduced by the memory leak cleanup teardown path (f3fb792)

Test plan

  • Open AI assistant and create a new session — toggle should show "Ask" selected
  • Switch between sessions — toggle should always have a selection
  • Existing Ask/Act toggle tests should pass

🤖 Generated with Claude Code

Normalize @selected in LLMModeToggle so the toggle always defaults to
"Ask" when the value is not explicitly "act". This prevents a blank
toggle during transient room-resource states introduced by the memory
leak cleanup teardown path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Preview deployments

@jurgenwerk jurgenwerk requested a review from a team March 27, 2026 13:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   2h 13m 43s ⏱️ + 1m 10s
2 062 tests +5  2 047 ✅ +5  15 💤 ±0  0 ❌ ±0 
2 077 runs  +5  2 062 ✅ +5  15 💤 ±0  0 ❌ ±0 

Results for commit b9ff840. ± Comparison against base commit 9daf8a6.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@backspace backspace left a comment

Choose a reason for hiding this comment

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

This fixes the problem, but is there any possibility of finding out what caused it and adding a test for it?

@jurgenwerk jurgenwerk merged commit 5d48ebc into main Mar 30, 2026
119 of 120 checks passed
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.

2 participants