Skip to content

fix(tui): restore slash suggestions from deferred runtime startup - #219

Merged
kingsword09 merged 1 commit into
mainfrom
fix/tui-lazy-startup-options
Oct 15, 2026
Merged

kingsword09 merged 1 commit into
mainfrom
fix/tui-lazy-startup-options

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

Summary

  • Fix missing /mcp, /help, /model, and custom-command suggestions with current upstream runtimes: they return commands from loadStartupOptions() rather than top-level options.
  • Paint a cancellable startup screen, call the loader once, and merge startup metadata before constructing the editor and session state; preserve compatibility with legacy top-level options.
  • Restore terminal state on startup failure or cancellation, ignore late resolution/rejection, and prevent user input from reaching a session before initialization.
  • Add isolated real-PTY regression coverage, a real-runtime /mc completion smoke assertion, and local validation documentation.

Validation

  • bun run typecheck — passed
  • env -u KITTY_WINDOW_ID TERM=xterm bun run test:unit — 852 passed, 2 skipped
  • bun run test:tui — 31 component + 34 PTY tests passed; the final startup tests also rerun separately (5 passed)
  • bun run test:runtime — 62 passed
  • bun run test:node — 20 passed
  • bun run sync:local and bun scripts/check-runtime.ts — passed against installed Desktop 3.15.3 / runtime 0.16.9
  • env -u KITTY_WINDOW_ID TERM=xterm-256color bun run check:tui — all smoke checks passed, including real-runtime slash completion and built-TUI focus checks
  • git diff --check — passed

Environment notes

  • Existing notification/fullscreen smoke assertions are sensitive to inherited Kitty detection. They pass with KITTY_WINDOW_ID removed; unrelated notification code/tests were not changed.
  • The package provenance check was attempted but rejects the locally synchronized macOS Desktop source because zcode-runtime.lock.json pins the Linux release artifact. The lock is unchanged; CI uses sync:locked for release validation.

Manual verification

  1. Run bun run sync:local on macOS with /Applications/ZCode.app installed (otherwise bun run sync:locked).
  2. Restart zcode; type /mc, /he, and /mod without submitting and verify runtime command suggestions appear.
  3. Submit /mcp and verify the configured server picker opens (or the empty configuration notice appears).
  4. Run bun test test/tui/startup.test.ts and bun scripts/smoke-tui.ts for isolated and real-runtime regression checks. These use temporary homes and do not make model API calls.

@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit e92e6b3796fde40f00ffbaeca88ab75cdbaac281.

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

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 985fda5 into main Oct 15, 2026
6 checks passed
@kingsword09
kingsword09 deleted the fix/tui-lazy-startup-options branch October 15, 2026 22:23
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.

1 participant