Files
claude-nova/docs/features/sidebar.md
T
2026-08-11 12:38:02 -03:00

1.7 KiB

Sidebar

Status: Implemented · Code: Scripts/sidebar.js

Four TreeView sections under one sidebar (claude). Sections are declared in extension.json; each is backed by a TreeDataProvider whose identifier matches the section id.

Section Rows
claude.session Status, Account, Model, Permissions, Usage
claude.approvals Pending requests, each expanded with its choices as child rows
claude.activity Tool calls, newest first, capped at 120
claude.changes Files Claude actually modified

Approvals are hierarchical

The parent row is the request; children are the actions from actionsFor(approval) in permissions.js. Selecting a child and activating it runs claudenova.approvalAction, which reads approvalsView.selection[0] and calls broker.decide(row.approval, row.id).

This is what makes a decision possible without any panel being open — dismissing a notification never strands the session.

Action rows are generated, so they follow state: a plan shows Write Feedback… until a feedback tab exists, then Send Feedback.

Row plumbing

  • TreeItem.command fires on double-click, not single click. Context menus in extension.json mirror the same commands, gated on contextValue.
  • TreeItem.path gives a file row its filetype icon and reveal behaviour.
  • getParent() must return the parent for reveal() to work; action rows return their approval.
  • Reloads are throttled to 200ms — every streamed token changes the session.

Labels

friendlyToolName() renames the interaction-surface tools: ExitPlanModePlan, AskUserQuestionQuestion. modeLabel() maps permission modes; note the CLI reports default for the mode its own flag calls manual.