Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
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.
| } | ||
| }) | ||
|
|
||
| for (const designs of [false, true]) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Issue for this PR
Closes #56103
Type of change
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
opencodeagain. 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:
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:
After:
Checklist
Added by the opencode bot (AI-generated).
Related: #52638, #49664