Skip to content

fix(tui): preserve exit epilogue during scoped shutdown#31805

Open
tobwen wants to merge 1 commit into
anomalyco:devfrom
tobwen:fix/tui-exit-epilogue
Open

fix(tui): preserve exit epilogue during scoped shutdown#31805
tobwen wants to merge 1 commit into
anomalyco:devfrom
tobwen:fix/tui-exit-epilogue

Conversation

@tobwen

@tobwen tobwen commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #31803

Type of change

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

What does this PR do?

Fixes a TUI exit bug where scoped cleanup cleared the session epilogue before it was printed.
The fix snapshots the epilogue and exit reason before cleanup, then prints from that snapshot after shutdown.
It also keeps terminal title cleanup outside the renderer destroy guard.

How did you verify your code works?

  • bun test ./test/app-lifecycle.test.tsx ./test/util/renderer.test.ts
  • bun typecheck
  • bun run build --single --skip-install

Screenshots / recordings

image

Checklist

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

@tobwen tobwen force-pushed the fix/tui-exit-epilogue branch from 2eddbad to e077cfc Compare June 11, 2026 02:37
Snapshot exit output before scoped cleanup clears session state.

Keep title cleanup guarded and cover app.exit with a lifecycle test.
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.

[BUG] session summary/epilogue is gone [HAS FIX]

1 participant