Skip to content

Composer: show ▶ N indicator while background tasks run#74

Merged
liftaris merged 2 commits into
devfrom
feat/background-indicator
May 21, 2026
Merged

Composer: show ▶ N indicator while background tasks run#74
liftaris merged 2 commits into
devfrom
feat/background-indicator

Conversation

@liftaris
Copy link
Copy Markdown
Owner

What

A /background task today produces one "started" toast and then nothing until completion — no way to confirm it's alive or see how many are in flight.

  • src/app/background.tsxBackgroundProvider holding a ReadonlySet of in-flight task ids, register/unregister with identity-preserving no-ops, useBackground() exposing count + ids.
  • slash.tsx registers the id when prompt.background resolves with a truthy task_id; useStream unregisters on background.complete. Toast and transcript-marker behavior unchanged.
  • Composer renders a ▶ N fragment between the queue-flush hint and the model label when count > 0, hidden at zero.

Tests

Provider semantics (register/unregister/dedup/reactivity), composer fragment presence/absence, and the full /background → register → background.complete → unregister lifecycle through MockGateway.

tsc clean, 995/995 pass.

liftaris added 2 commits May 20, 2026 22:48
A /background task today produces one 'started' toast and then nothing
until completion — no way to confirm it is alive or see how many are
in flight.

- src/app/background.tsx: BackgroundProvider holding a ReadonlySet of
  in-flight task ids, register/unregister with identity-preserving
  no-ops, useBackground() exposing count + ids.
- slash.tsx registers the id when prompt.background resolves with a
  task_id; useStream unregisters on background.complete. Toast and
  transcript marker behavior unchanged.
- Composer renders a '▶ N' fragment between the queue-flush hint and
  the model label when count > 0, hidden at zero.
- Tests: provider semantics, composer fragment presence/absence, and
  the full register → complete lifecycle through MockGateway.
@liftaris liftaris merged commit 7874683 into dev May 21, 2026
1 check passed
This was referenced May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@liftaris liftaris deleted the feat/background-indicator branch May 22, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant