Skip to content

perf: polish chat streaming and queue UX#177

Merged
yongkangc merged 1 commit into
cfal:mainfrom
0xSolarPunk:yk/codex-inspired-garcon-ui
May 30, 2026
Merged

perf: polish chat streaming and queue UX#177
yongkangc merged 1 commit into
cfal:mainfrom
0xSolarPunk:yk/codex-inspired-garcon-ui

Conversation

@0xSolarPunk
Copy link
Copy Markdown
Contributor

@0xSolarPunk 0xSolarPunk commented May 30, 2026

What changed

This brings a few Codex-style UI/perf ideas into Garcon chat without changing the server/API contract.

  • Streaming output: batches agent output received in the same WebSocket drain so chat message state is updated once per drain instead of once per tiny streamed chunk.
  • Composer drafts: debounces draft persistence so typing does less localStorage work, while still flushing pending drafts on teardown, submit, and chat changes.
  • Queue UI: replaces the plain queued-message list with a compact preview panel: count badge, up to 3 visible entries, long-text truncation, hidden-count text, and Queued inputs / Sending labels.
  • Safer queue controls: sending entries are visible but no longer show the remove button, because removing them would not cancel the already-dispatched run.

Review fixes

  • Flushed batched streamed output before same-drain stop/error transcript messages, preserving transcript order.
  • Added regression coverage for same-drain output ordering.
  • Added regression coverage for display-only sending queue entries.

Side effects / risk

  • Draft saves now happen after a short debounce instead of every keystroke; a hard tab crash inside that small window could lose the latest keystroke, but normal cleanup flushes it.
  • Streaming UI updates happen once per WS drain; this is the intended perf win and still flushes before lifecycle/error messages.
  • No backend, API, or WS contract changes.

Screenshots

Desktop: https://files.catbox.moe/aukqhf.png
Mobile: https://files.catbox.moe/b0jrmt.png

Validation

  • bun run check
  • bun run test
  • timeout 30s bun run start --port 0
  • GitHub checks green: server-tests, web-tests, build-exe

@0xSolarPunk 0xSolarPunk force-pushed the yk/codex-inspired-garcon-ui branch from 1c4151f to 75bdbd5 Compare May 30, 2026 01:25
@yongkangc yongkangc merged commit ee8bcb7 into cfal:main May 30, 2026
4 checks passed
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.

2 participants