feat: add structured activity panel sidebar#72
feat: add structured activity panel sidebar#72bradfeld wants to merge 1 commit intodanshapiro:mainfrom
Conversation
- Add collapsible sidebar panel alongside terminal panes showing: - Tool activity feed with color-coded event types (ring buffer, 200 max) - Token usage meter with input/output/cached breakdown - Permission request actions with approve/deny buttons - Active task list from TaskCreate/TaskUpdate events - Wire activity panel events through global sdk-message-handler for both SDK (claude-chat) and coding CLI (terminal) session types - Add Redux slice with ring buffer storage and per-session state - Add toggle button in pane header with event count badge - Persist panel visibility preference in settings Fixes empty activity panel bug where codingcli.event messages were only handled in SessionView (headless sessions) but not for terminal panes. Refs FRE-16
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 837cbf9392
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const handleApprovePermission = codingCliSessionId | ||
| ? (requestId: string) => { | ||
| ws.send({ type: 'codingcli.approval', sessionId: codingCliSessionId, requestId, approved: true }) |
There was a problem hiding this comment.
Use supported WS message for coding CLI approvals
The new approve/deny handlers send type: 'codingcli.approval', but that message type is not accepted by the shared client schema (shared/ws-protocol.ts only includes codingcli.create, codingcli.input, and codingcli.kill) and there is no corresponding server handler in the codingcli.* switch (server/ws-handler.ts). When a user clicks these buttons, the server will reject the payload as an invalid message and the pending approval cannot be resolved from the panel.
Useful? React with 👍 / 👎.
| if (isActivityPanelRelevant(event)) { | ||
| dispatch(addActivityEvent({ sessionId: cliSessionId, event })) | ||
| } | ||
| if (event.type === 'token.usage' && event.tokens) { |
There was a problem hiding this comment.
Handle Claude
session.end tokens in activity totals
Token aggregation only runs for event.type === 'token.usage', but the Claude coding-CLI provider reports usage on session.end with a tokens payload (server/coding-cli/providers/claude.ts), not as token.usage. As a result, Claude terminal sessions never update the activity panel token meter even when usage data is present, so the totals shown to users are silently incomplete.
Useful? React with 👍 / 👎.
|
Thanks for the work on this, @bradfeld — the activity panel architecture is well thought out. Clean Redux slice with ring buffer, good component decomposition, and solid test coverage. We've consolidated this with the related PRs (#64, #67, #75) into a tracking issue: #83. The short version: the panel renders and toggles correctly, but the data pipeline only connects to Freshclaude ( The tracking issue has the full analysis and some questions about the intended architecture. We'd love your input there. Closing in favor of #83 — this isn't a rejection of the code, just a consolidation so we can track the full effort in one place. — Claude Code |
Summary
sdk-message-handler.tsfor both SDK (claude-chat) and coding CLI (terminal) session typescodingcli.eventmessages were only processed bySessionView(headless sessions), not terminal panesTest plan
npm testpasses (255 test files, 2 pre-existing WSL-only failures)🤖 Generated with Claude Code