feat: Support structured background tasks with clean REPL rendering#151
feat: Support structured background tasks with clean REPL rendering#151harvisaiagent-bot wants to merge 2 commits intodgarana:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #151 +/- ##
===========================================
- Coverage 100.00% 99.04% -0.96%
===========================================
Files 21 23 +2
Lines 1689 2094 +405
===========================================
+ Hits 1689 2074 +385
- Misses 0 20 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Update: Enhanced Task Name Display in REPL ToolbarThis update implements the full requirements from issue #150 by making background tasks clearly visible in the REPL UX. What ChangedThe REPL bottom toolbar now displays individual task names alongside the count:
Implementation Details
TestingAdded 3 new unit tests:
All 13 background manager tests and 39 integration tests pass ✅ Conventional CommitThe implementation now fully addresses issue #150's requirement for active background tasks to be visible in the UX itself. |
UX Fix: Live UI Refresh for Background Task OutputThis update addresses the follow-up issue where background task output was not rendered immediately in the REPL. Previously, output was queued correctly but only displayed when the user interacted (typed another command). ChangesCore Implementation:
User Experience:
TestingAll tests pass:
Example Behavior🌋 test_live interval=1 ticks=5
Background task started! Watch output appear live without typing anything.
[task_0] Live output tick 0 - should appear immediately! # ← appears after 1s automatically
[task_0] Live output tick 1 - should appear immediately! # ← appears after 2s automatically
[task_0] Live output tick 2 - should appear immediately! # ← appears after 3s automatically
[task_0] Live output tick 3 - should appear immediately! # ← appears after 4s automatically
[task_0] Live output tick 4 - should appear immediately! # ← appears after 5s automatically
🌋 [1 task running: live_test_5] # ← toolbar updates liveThe user doesn't need to type anything - output appears live as tasks emit it! |
092fbcc to
3ded1c3
Compare
Previously, background task output in direct CLI mode was buffered and only displayed after all tasks completed. This fix adds a background polling thread (cli_output_renderer) that continuously checks for and displays queued output every 50ms during CLI execution. The fix ensures: - CLI mode remains alive until all background tasks finish - Background output streams progressively while tasks run - REPL behavior and toolbar support remain intact - Thread cleanup happens properly via try/finally Addresses follow-up bug in issue dgarana#150 / PR dgarana#151. Co-Authored-By: Oz <oz-agent@warp.dev>
ce23229 to
f27cbd7
Compare
Summary
This PR implements issue #150 by adding comprehensive support for structured background tasks with clean REPL rendering and task status tracking.
Changes
Core Implementation
New
BackgroundTaskManagerclass (vulcano/app/background.py):VulcanoApp Integration:
background_tasksattribute to all app instancesKey Features
Updated Examples
examples/async_output_example.pynow demonstrates structured background task usageTests
BackgroundTaskManagerclasses_test.pyExample Usage
Testing
Resolves
Closes #150
Conversation: https://app.warp.dev/conversation/ab6f3eba-df43-4232-8333-f926bc27a1d5
Run: https://oz.warp.dev/runs/019d4b16-5873-7a65-820a-05a57bed5353
This PR was generated with Oz.