Full pipeline flow through web interface with live updates
API:
POST /api/tasks/{id}/run — sets task to in_progress immediately,
launches subprocess with error handling and logging.
GET /api/tasks/{id}/running — checks pipelines table for active run.
Fixed --db flag position in subprocess command.
TaskDetail (live pipeline):
- Run button starts pipeline, auto-starts 3s polling
- Pipeline cards update in real-time as agent_logs appear
- Pulsing blue dot on header while in_progress
- Spinner on run button during execution
- Auto-stops polling when status changes from in_progress
- Cleanup on component unmount (no leaked timers)
ProjectView (run from list):
- [>] button on each pending task row
- Confirm dialog before starting
- Pulsing blue dot for in_progress tasks
- Click task row → /task/:id with live view
Dashboard (live statuses):
- Pulsing blue dot next to active task count
- Auto-poll every 5s when any project has active tasks
- Stops polling when no active tasks
5 new API tests (running endpoint, run sets status, not found).
141 tests total, all passing. Frontend builds clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ab693d3c4d
commit
db1729730f
5 changed files with 145 additions and 33 deletions
|
|
@ -135,6 +135,44 @@ def test_task_pipeline_not_found(client):
|
|||
assert r.status_code == 404
|
||||
|
||||
|
||||
def test_running_endpoint_no_pipeline(client):
|
||||
r = client.get("/api/tasks/P1-001/running")
|
||||
assert r.status_code == 200
|
||||
assert r.json()["running"] is False
|
||||
|
||||
|
||||
def test_running_endpoint_with_pipeline(client):
|
||||
from core.db import init_db
|
||||
from core import models
|
||||
conn = init_db(api_module.DB_PATH)
|
||||
models.create_pipeline(conn, "P1-001", "p1", "debug",
|
||||
[{"role": "debugger"}])
|
||||
conn.close()
|
||||
|
||||
r = client.get("/api/tasks/P1-001/running")
|
||||
assert r.status_code == 200
|
||||
assert r.json()["running"] is True
|
||||
|
||||
|
||||
def test_running_endpoint_not_found(client):
|
||||
r = client.get("/api/tasks/NOPE/running")
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
def test_run_sets_in_progress(client):
|
||||
"""POST /run should set task to in_progress immediately."""
|
||||
r = client.post("/api/tasks/P1-001/run")
|
||||
assert r.status_code == 202
|
||||
|
||||
r = client.get("/api/tasks/P1-001")
|
||||
assert r.json()["status"] == "in_progress"
|
||||
|
||||
|
||||
def test_run_not_found(client):
|
||||
r = client.post("/api/tasks/NOPE/run")
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
def test_project_summary_includes_review(client):
|
||||
from core.db import init_db
|
||||
from core import models
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue