Skip to content

fix(tui): clarify manual reopening after updates - #56118

Open
HootRock wants to merge 2 commits into
anomalyco:devfrom
HootRock:update-exit
Open

HootRock wants to merge 2 commits into
anomalyco:devfrom
HootRock:update-exit

Conversation

@HootRock

@HootRock HootRock commented Oct 16, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #56103

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The update dialog promises a restart and automatic session resume, but its action exits. #47364 intentionally removed self-relaunch.

Label the action “Quit” and explain that users must run opencode again. This corrects the dialog without changing update or exit behavior.

How did you verify your code works?

Native Windows, Bun 1.4.2, frozen dependencies:

  • Removed the added four-case render matrix after review. The unchanged owning test passes ten repeats (10 passes); independent review reran it successfully.
  • TUI typecheck, scoped lint and formatting pass on the revised tree.
  • Before removing the test matrix, base/head OpenTUI rendering verified the three text changes in both designs; the production edits are unchanged. Those earlier full TUI runs were not clean: they included shared baseline failures and a head-only Windows temporary-directory cleanup failure. Root checks stopped at Turbo's package-manager lookup. The full suite and root checks were not rerun for this test deletion.

No real update installation, OS exit/relaunch or session-preservation validation was run. Implementation and review were AI-assisted.

reviewed and tested locally.

Screenshots / recordings

Actual OpenTUI renderer captures, rasterized from text/color spans; each shows legacy and new designs.

Before:

Before: Restart and automatic resume copy

After:

After: Quit and manual reopening copy

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #52638, #49664

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This corrects the dialog text to match what the action actually does: after an update it exits and does not relaunch. I rendered the dialog in tests on the base and with this PR (legacy and new designs). The base shows "Restart" and "sessions will be resumed automatically"; with this change it shows "Quit" and tells users to run opencode again. Exit behaviour is unchanged, and the TUI type check passes.

Public API: unchanged. The change is UI text only, and the restart prop and function names stay the same.

The only thing I'd change is the test (see the inline comment): it adds about 60 lines and four rendered cases to check three strings, and the fix doesn't need it.

Related: #52638, #49664

}
})

for (const designs of [false, true]) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a copy-only fix, and this block adds four full render cases (2 designs × 2 widths) with a custom Open helper to assert a few strings. The widths add no coverage, because word-wrap is collapsed with replace(/\s+/g, " ") anyway, and the exit-callback check covers behaviour this PR doesn't change. Please drop it so the change stays minimal. If you want to keep a check, one case asserting the installed-state copy is enough.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed the four-case render matrix in 534a7d0; the test file now matches base, leaving only the three production text edits. The unchanged owning test passes ten repeats, TUI typecheck and scoped lint/format pass, and an independent rerun passes. Exit behavior is unchanged.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks. I checked 534a7d0: the test file now matches the base, so the change is just the three text edits in dialog-update.tsx, which I already reviewed. That resolves this point, and I have no further concerns.

This branch has not been deployed

No deployments
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.

tui: "Restart" after /update exits to the shell instead of restarting OpenCode

1 participant