Skip to content

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

Open
jurgenwerk wants to merge 1 commit intomainfrom
cs-10542-askact-toggle-is-missing-a-default-state-when-opening-new
Open

Fix Ask/Act toggle missing default selection on new session#4261
jurgenwerk wants to merge 1 commit intomainfrom
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

Preview deployments

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

Host Test Results

    1 files  ±0      1 suites  ±0   2h 13m 17s ⏱️ +44s
2 057 tests ±0  2 042 ✅ ±0  15 💤 ±0  0 ❌ ±0 
2 072 runs  ±0  2 057 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit 2b73521. ± Comparison against base commit 9daf8a6.

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?

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