Skip to content

fix: paint finished async jobs without waiting for a key - #17

Merged
nooga merged 1 commit into
mainfrom
fix-drain-before-paint
Sep 19, 2026
Merged

nooga merged 1 commit into
mainfrom
fix-drain-before-paint

Conversation

@nooga

@nooga nooga commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Drain realized async jobs before painting, so a finished vibe (or Acme Execute) lands on screen without waiting for a keystroke.
  • Extract bufs/loop-wait (:quit / :pending-task / :poll / :read-key) so that idle decision is testable without a TTY.
  • Cover the paint-then-drain-then-block bug: after drain of a delivered job, lines update, the job is gone, and wait is :read-key.

Test plan

  • lg -e "(require '[test :refer [run-tests]] '[test.buffers-test]) (run-tests)"
  • lg test/run.lg (341 tests, 1502 pass)
  • Confirm in the editor that a (vibe "...") splice appears when the request finishes, without pressing a key, and the vibing... indicator clears

Made with Cursor

The loop drained after painting and then blocked on read-chord, so a
completed vibe sat on screen until the next keystroke.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nooga
nooga merged commit 1b50275 into main Sep 19, 2026
1 check passed
@nooga
nooga deleted the fix-drain-before-paint branch September 19, 2026 01:26
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