- Add missing closing brace and #[test] attr between test functions in claude_code.rs
- Remove premature semicolon in TypeScript union type in client.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extend `WatcherEvent` to an enum with `WorkItem` and `ConfigChanged` variants
so the watcher can distinguish between pipeline-file changes and config changes
- Watch `.story_kit/project.toml` at the project root (ignoring worktree copies)
and broadcast `WatcherEvent::ConfigChanged` on modification
- Forward `agent_config_changed` WebSocket message to connected clients; skip
pipeline state refresh for config-only events
- Add `is_config_file()` helper with unit tests covering root vs. worktree paths
- Accept `configVersion` prop in `AgentPanel` and re-fetch the agent roster
whenever it increments
- Increment `agentConfigVersion` in `Chat` on receipt of `agent_config_changed`
WS event via new `onAgentConfigChanged` handler in `ChatWebSocket`
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The coverage script parses "All files" from vitest text table output, but
vitest was only configured with json-summary reporter. This caused frontend
coverage to show as 0%, pulling overall coverage below threshold.
Frontend line coverage is 68.4%, making overall coverage 66.4% vs 64.60% threshold.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds log_buffer ring buffer and slog! macro for in-memory server log
capture, plus get_server_logs MCP tool for agents to read recent logs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set reuseExistingServer:true in playwright config so acceptance gates
don't fail when port 41700 is already occupied by a prior test run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add `hiddenRosterAgents: ReadonlySet<string>` to LozengeFlyContext:
- Derived from pipeline: any agent currently assigned to a work item
- `flyingOutAgents` state keeps badge hidden for 500 ms during the
fly-out animation so the returning clone lands before the badge reappears
- Union of both sets exposed as `hiddenRosterAgents` in context
- Update AgentPanel: wrap each RosterBadge in a collapsing div
controlled by `hiddenRosterAgents`. The div transitions max-width
0→300px / opacity 0→1 so the roster gap closes/opens smoothly.
- Add tests covering:
- `hiddenRosterAgents` is empty when no agents are assigned
- Badge hidden immediately when agent appears in pipeline
- Badge hidden during fly-out (0–499 ms) and visible after (≥500 ms)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep master's quiet system/rate_limit_event handlers while preserving
the story-62 permission_request handler (the core feature).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the "agents-at-work" list section from AgentPanel. The roster
badges with flying lozenge animations already convey which agents are
active, making the redundant list unnecessary.
- Remove StatusBadge, DiffCommand, EditorCommand components
- Remove expandedKey, logEndRefs, fade-timer state and effects
- Remove handleStop (no more Stop buttons)
- Keep agents state + SSE subscriptions (roster badges still need it)
- Delete diff-command and fade-out tests (feature removed)
- Add test asserting no agent-entry divs are rendered
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add data-testid="roster-dot-{name}" to both active and idle dot spans for testability
- Change idle badge from grey (#888, #555, #333) to green (#3fb950, #3fb95015, #3fb95040)
- Update idle label from "idle" to "available" to reinforce positive availability signal
- Update tooltip from "— idle" to "— available" for consistency
- Active/running agents retain blue (#58a6ff) pulsing dot styling unchanged
- Add 4 new Vitest tests covering green idle dot, green badge styling, blue active dot, and blue active badge
Closes story 81: Agent roster badges show availability state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolves conflict in AgentPanel.test.tsx between story 73 (fade-out)
and story 74 (lozenge fly animation) - kept both the assertion and
the comment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
waitFor's internal polling setInterval is itself faked when vi.useFakeTimers()
is active, causing it to hang indefinitely. Replace the affected assertions
with act + multiple Promise.resolve() to flush React state updates, and a
direct assertion after act+vi.advanceTimersByTime instead of a second waitFor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements Story 74: agent lozenges now animate as fixed-position overlays
that fly from the roster badge in AgentPanel to the story slot in StagePanel
(and back when the agent is removed), satisfying all acceptance criteria.
Key changes:
- LozengeFlyContext.tsx (new): coordinates FLIP animations via React context.
LozengeFlyProvider tracks pipeline changes, hides slot lozenges during
fly-in (useLayoutEffect before paint), then creates a portal-rendered
fixed-position clone that transitions from roster → slot (or reverse).
z-index 9999 ensures the clone travels above all other UI elements.
- AgentPanel.tsx: RosterBadge registers its DOM element with the context
so fly animations know the correct start/end coordinates.
- StagePanel.tsx: AgentLozenge registers its DOMRect on every render via
useLayoutEffect (for fly-out) and reads pendingFlyIns to stay hidden
while a fly-in clone is in flight. Added align-self: flex-start so the
lozenge maintains its intrinsic width and never stretches in the panel.
- Chat.tsx: right-column panels wrapped in LozengeFlyProvider.
- LozengeFlyContext.test.tsx (new): 10 tests covering fixed width,
fly-in/fly-out clone creation, portal placement, opacity lifecycle,
and idle vs active visual distinction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove tdd-gates, story-todos, and test-protection e2e specs that
tested deleted GatePanel, TodoPanel, and ReviewPanel. Rename the
surviving boot smoke test from review-panel.spec.ts to smoke.spec.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add notify-based filesystem watcher for .story_kit/work/ that
auto-commits changes with deterministic messages and broadcasts
events over WebSocket. Push full pipeline state (Upcoming, Current,
QA, To Merge) to frontend on connect and after every watcher event.
Strip dead UI: remove ReviewPanel, GatePanel, TodoPanel,
UpcomingPanel and all associated REST polling. Replace with 4
generic StagePanel components driven by WebSocket. Simplify
AgentPanel to roster-only.
Delete all 11 workflow HTTP endpoints and 16 request/response types
from the server. Clean dead code from workflow module. MCP tools
call Rust functions directly and need none of the HTTP layer.
Net: ~4,100 lines deleted, ~400 added.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate Claude Code provider into the chat UI alongside regular
Ollama/Anthropic providers. Updates AgentPanel and Chat components.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Server detects .story_kit/ in cwd or parent directories at startup and
automatically opens the project. MCP tools work immediately without
manual project-open step. Falls back to cwd when no .story_kit/ found.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>