Repository navigation
test(tui): remove flaky update-restart, session-tabs storage and tab-rail scroll tests - #59400
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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, sincetuidepends on it.app-lifecycle.test.tsx:restarting after an update tells the user to start OpenCode againandquitting after a background update tells the user to start OpenCode again. Each drives a fullrun()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 unrelatedcompaction-cache-prefixPR. The restart message itself is still covered bytest/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 readstabs.jsonwhile the app is still writing it atomically, so the rename onto that file fails withEPERM.session-tabs-rail.test.tsx: the last step ofcompact rail renders and controls session tabsloads 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 unrelatedmedia-entrypointsPR. 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 typecheckand oxlint inpackages/tui.Requested by: @rekram1-node (Aiden Cline via Slack)