Skip to content

test: Persist the agentMessageQueue preview flag in its flag-off test - #539

Merged
Ziinc merged 1 commit into
mainfrom
claude/terminal-queue-flag-test
Sep 27, 2026
Merged

Ziinc merged 1 commit into
mainfrom
claude/terminal-queue-flag-test

Conversation

@Ziinc

@Ziinc Ziinc commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

workspace/terminal-pane.test.tsx > hides the message queue when the agentMessageQueue preview is off (added in #530) fails intermittently on main: 1 of 3 local runs, and on #532's CI. The failure is that the agent-message-queue button is still rendered.
The test only sets the in-memory useFeaturePreviewStore. Rendering <Dashboard /> triggers settings hydration, and hydrateFlags rebuilds every flag from the defaults (all on in test mode) plus the persisted settings. When hydration finishes after the test's setState, the flag flips back on.

Fix

Persist the setting with setSetting(previewSettingKey("agentMessageQueue"), "false"), the same way feature-preview.test.tsx does, and restore it in onTestFinished so it can't leak into the other tests in the file, which expect the queue to be shown.

Verification

  • The file passed 6 of 6 runs after the change; before it, 1 of 3 runs failed.
  • lint and check are clean.
    Generated by Claude Code

"hides the message queue when the agentMessageQueue preview is off"
only set the in-memory feature preview store. Rendering the Dashboard
hydrates settings, and hydrateFlags rebuilds every flag from defaults
(all on in test mode) plus persisted settings, so whenever hydration
resolved after the setState the flag flipped back on and the queue
button rendered. Persist the setting through setSetting, as
feature-preview.test.tsx does, and restore it when the test finishes.
@Ziinc
Ziinc merged commit 6959b9a into main Sep 27, 2026
16 checks passed
@Ziinc
Ziinc deleted the claude/terminal-queue-flag-test branch September 27, 2026 08:45
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