Skip to content

fix(session): persist named sessions and validate resume targets - #228

Merged
kingsword09 merged 1 commit into
mainfrom
fix/session-lifecycle-227
Oct 22, 2026
Merged

kingsword09 merged 1 commit into
mainfrom
fix/session-lifecycle-227

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

Summary

Fixes #227.

  • Retain lazy session persistence: untouched sessions remain unsaved, while explicit title writes use the native persistence entry point before saving the custom title, covering both TUI rename and host callers.
  • Print exit resume guidance only for persisted, non-deleted sessions; bound the lookup so an unavailable store cannot block shutdown.
  • Reject invalid startup and interactive resume targets before opening the TUI or replacing the active session, and surface clear missing-session errors through the launcher.
  • Settle failed foreground submissions even when execution-state projection is unavailable, preventing the endless spinner.
  • Add required, idempotent runtime compatibility patches, regression coverage, and documentation for the lifecycle behavior.

Validation

  • bun run build
  • bun run typecheck
  • bun scripts/check-runtime.ts
  • bun test test/*.test.ts — 889 passed, 2 skipped
  • node --test test/node/session-lifecycle.test.cjs — 3 passed
  • bun test test/runtime/session-lifecycle.test.ts test/tui/session-lifecycle.test.ts — 12 passed
  • bun test test/runtime/session-lifecycle.test.ts test/runtime/launcher.test.ts — 15 passed
  • bun scripts/smoke-tui-features.ts
  • git diff --check

Runtime integration tests use isolated home/data directories and local mock model endpoints. Generated runtime artifacts remain ignored and are regenerated by the build/sync pipeline.

@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit 7a4acf5e19f556e9bf0b30a19d29cf30deee5b94.

The preview build or publication failed. No new preview link is available from this run.

Workflow logs

@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit 7a4acf5e19f556e9bf0b30a19d29cf30deee5b94.

npx --yes https://pkg.pr.new/zcode-app-cli@7a4acf5

Full repository URL

This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with /pkg-pr-new.

Workflow logs

@kingsword09
kingsword09 merged commit 2ca9b32 into main Oct 22, 2026
5 checks passed
@kingsword09
kingsword09 deleted the fix/session-lifecycle-227 branch October 22, 2026 00:54
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.

Session row is created only on first input: rename fails on new sessions, and an empty session's --resume id opens a broken session

1 participant