Skip to content

fix(tui): surface bg job completions as alert notes with attention - #64

Merged
jkyberneees merged 1 commit into
mainfrom
fix/bg-completion-visibility
Sep 2, 2026
Merged

fix(tui): surface bg job completions as alert notes with attention#64
jkyberneees merged 1 commit into
mainfrom
fix/bg-completion-visibility

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Problem (observed live)

A background gh pr checks --watch job finished; the operator noticed nothing. Root cause: the jobs watcher's exit note was transient tier (3s dwell) on a 10s poll cadence, with no command context and no bell/notification — a ~3s visibility window starting up to 10s late.

Changes

  • J1 — alert-tier exit notes: terminal transitions post 10s notes that include the sanitized command head: ✓ bg_… · gh pr checks 63 --watch — exited 0 · 1m44s
  • J2 — attention on completion: new attentionJobDone / attentionJobFailed kinds — window-title flash + bell (--bel gate) + OSC 9 desktop notification (--notify gate), same machinery as approval/turn-done. failed/timeout/killed → ✗, clean exit → ✓
  • README jobs bullet synced

Not here (by design)

Output tail in the exit note — /api/jobs exposes no output_bytes and output cursors only read forward from byte 0, so clients can't reach the tail without following the stream. Spec written for an odek session: TEMP_ODEK_JOBS_TAIL_TASK.md (untracked, bodek-writes-specs convention).

Testing

  • 4 new RED-first tests (jobs_notify_test.go): alert-tier dwell, command context, attention-on-transition (nil on steady state), kind mapping + user gates
  • All 13 existing jobs tests green; go vet clean; full go test -race ./... green

A finished background job surfaced as a 3-second transient note on a
10-second poll cadence — practically invisible, as demonstrated live
when a GoReleaser watch completed unnoticed. Exit transitions now post
alert-tier notes (10s dwell) that name the command head, and fire the
attention layer (bell / OSC 9 desktop notification, user-gated as for
turns) so the operator is actually told. Clean exits announce '✓ bg job
done'; failed, timed-out, and killed jobs announce '✗ bg job failed'.
@jkyberneees
jkyberneees merged commit 809fd56 into main Sep 2, 2026
7 checks passed
@jkyberneees
jkyberneees deleted the fix/bg-completion-visibility branch September 2, 2026 12:21
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