Skip to content

refactor(runtime): extract typed TUI background task bridge - #172

Merged
kingsword09 merged 1 commit into
mainfrom
codex/extract-runtime-tui-bridge
Sep 24, 2026
Merged

kingsword09 merged 1 commit into
mainfrom
codex/extract-runtime-tui-bridge

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

The TUI bridge previously embedded background-task recovery, projection merging and message routing as long JavaScript strings in bundle patches. Move these operations into typed TypeScript modules compiled into the existing cli-config.cjs helper; the patches now capture the active app and delegate.

Preserve task restoration, error handling, routing, trace context and stop-before-send behavior. Read optional recovery metadata asynchronously and share in-flight restoration per app so concurrent sends wait for task registration. Existing patch execution tests now call the same helpers, with additional direct tests for restart, stale task fields and restoration races.

Validation:

  • bun run typecheck
  • Locked Desktop 3.14.3 extraction, build and idempotent patch application
  • bun run test:unit (654 passed before the additional concurrency case; that case also passed)
  • bun scripts/check-runtime.ts
  • bun run check:tui
  • git diff --check

Independent of #171; this PR changes the runtime adapter, not TUI refresh policy.

@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/zcode-app-cli@c6cfe37

commit: c6cfe37

@kingsword09
kingsword09 merged commit cc10e09 into main Sep 24, 2026
7 checks passed
@kingsword09
kingsword09 deleted the codex/extract-runtime-tui-bridge branch September 24, 2026 11:41
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