chore: cleanup sprint — dead CSS, dedup helpers, handler refactor
Remove ~126 lines of orphaned CSS from tile slim-down and old detail layout. Consolidate 4 duplicate duration formatters into shared elapsed()/fmtElapsed() helpers. Break 160-line Result handler into focused sub-functions. Implement real Hub.Shutdown() (was a no-op). Standardize agent error responses to JSON. Replace panic() in router init with error return. Extract magic numbers as named constants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,10 @@ func TestSSE_EndToEnd(t *testing.T) {
|
||||
t.Fatalf("create host: %v", err)
|
||||
}
|
||||
|
||||
router := NewRouter(Deps{UI: ui, Agent: agent})
|
||||
router, err := NewRouter(Deps{UI: ui, Agent: agent})
|
||||
if err != nil {
|
||||
t.Fatalf("router: %v", err)
|
||||
}
|
||||
srv := httptest.NewServer(router)
|
||||
t.Cleanup(srv.Close)
|
||||
|
||||
@@ -178,7 +181,10 @@ func TestSSE_SubStepEvent(t *testing.T) {
|
||||
SpecDiffs: diffs, Runner: runner, EventHub: hub,
|
||||
}
|
||||
|
||||
router := NewRouter(Deps{UI: ui, Agent: agent})
|
||||
router, err := NewRouter(Deps{UI: ui, Agent: agent})
|
||||
if err != nil {
|
||||
t.Fatalf("router: %v", err)
|
||||
}
|
||||
srv := httptest.NewServer(router)
|
||||
t.Cleanup(srv.Close)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user