Skip to content

test(tui): remove flaky update-restart, session-tabs storage and tab-rail scroll tests - #59400

Merged
rekram1-node merged 2 commits into
devfrom
kill-flaky-tui-tests
Oct 26, 2026
Merged

rekram1-node merged 2 commits into
devfrom
kill-flaky-tui-tests

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Removes three flaky TUI tests and one flaky step from a fourth. All of them keep failing CI on PRs that don't touch the TUI, and they run on any PR that affects core, since tui depends on it.

  • app-lifecycle.test.tsx: restarting after an update tells the user to start OpenCode again and quitting after a background update tells the user to start OpenCode again. Each drives a full run() through the update flow and times out waiting for a frame, ending on a blank frame with the renderer stopped. They pass locally and failed today on fix(core): add GPT-6.1 Terra to Sign in with ChatGPT models #59359 and on an unrelated compaction-cache-prefix PR. The restart message itself is still covered by test/util/presentation.test.ts (tells the user to start OpenCode again after an update).
  • session-tabs.test.tsx: stores session tabs for the current working directory by default. On Windows, the test reads tabs.json while the app is still writing it atomically, so the rename onto that file fails with EPERM.
  • session-tabs-rail.test.tsx: the last step of compact rail renders and controls session tabs loads 40 tabs and waits for the rail to scroll to tab 40. On Windows it times out at that line (135), both on this PR and on an unrelated media-entrypoints PR. Only that step is removed, so the rest of the rail test still runs.

I didn't see a quick, obvious fix for any of them, so this deletes them (and that step) rather than patching them. Nothing else changes.

Tested: bun test test/app-lifecycle.test.tsx test/context/session-tabs.test.tsx test/component/session-tabs-rail.test.tsx (all pass), bun run typecheck and oxlint in packages/tui.

Requested by: @rekram1-node (Aiden Cline via Slack)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks fine: this only deletes the three flaky tests and touches no source. The remaining tests in both files pass locally (63 pass). Public API unchanged.

One thing to keep in mind: presentation.test.ts only checks the formatting of the epilogue. Nothing now checks that run() actually prints it after restarting or quitting following an update. A follow-up test that calls the exit path directly, without driving the full UI, would cover that wiring without the frame-timing flakiness.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The new commit looks fine: it only drops the 40-tab scroll step from the compact rail test, and the rest of that test still passes locally. Public API unchanged.

With that step gone, no test checks that an overflowing rail scrolls the active tab into view (session-tabs.tsx, around lines 665–667). A follow-up could cover it with a direct test that doesn't wait on a frame.

@opencode-agent opencode-agent Bot changed the title test(tui): remove flaky update-restart and session-tabs storage tests test(tui): remove flaky update-restart, session-tabs storage and tab-rail scroll tests Oct 26, 2026
@rekram1-node
rekram1-node merged commit cbe110e into dev Oct 26, 2026
14 checks passed
@rekram1-node
rekram1-node deleted the kill-flaky-tui-tests branch October 26, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant