Skip to content

fix(tui): avoid repeated history reads during streaming - #171

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

kingsword09 merged 1 commit into
mainfrom
codex/reduce-tui-runtime-refresh

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

Streaming session events could schedule a full conversation read every 80 ms, even when only text changed. Filter presentation-only events in the persistent subscription and reuse a compact token/cache summary during activity polling.

Completed requests, changed usage, prompt results and history changes invalidate the summary. Session switches discard it, and late reads cannot overwrite a newer revision. The cache retains statistics rather than message bodies or tool output.

Validation:

  • bun run typecheck
  • bun run sync:locked with Desktop 3.14.3
  • bun run test:unit (657 passed)
  • bun run test:tui, including a real-PTY regression for streaming, tool progress, completion and resume
  • bun scripts/check-runtime.ts
  • bun run check:tui
  • git diff --check

@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2026

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

commit: a6667b4

@kingsword09
kingsword09 merged commit b44b6e2 into main Sep 24, 2026
7 checks passed
@kingsword09
kingsword09 deleted the codex/reduce-tui-runtime-refresh branch September 24, 2026 11:28
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