Skip to content

feat(output): add Output panel with ctx.log API and grouped channel selector#142

Merged
davideweaver merged 1 commit into
mainfrom
feat/output-panel-and-log-api
Jun 29, 2026
Merged

feat(output): add Output panel with ctx.log API and grouped channel selector#142
davideweaver merged 1 commit into
mainfrom
feat/output-panel-and-log-api

Conversation

@davideweaver

Copy link
Copy Markdown
Contributor

Summary

  • Output panel (core.output) — new dock panel with channel selector (grouped into host channels, Built-in Extensions, and Extensions), level filter, text search, clear, and auto-scroll
  • ctx.log / LogService — structured per-extension logging API wired into every extension context; core.* share the silo:application channel, others get their own ext:<id> channel that is auto-created and auto-removed with the extension lifecycle
  • Grouped channel dropdown — uses a builtin flag threaded from registerChannel through OutputChannelState; key prefix alone is insufficient because runtime-loaded silo.* extensions from the external repo share the same prefix as bundled ones
  • Application channel lifecycle eventscore.workspaces logs workspace activated/created/closed/reopened; core.themes logs theme changes
  • Notifications mirrored to Outputctx.ui.notify now also writes to silo:notifications so dismissed toasts are reviewable
  • Git command logging (silo.git) — read-only commands at debug, write commands at info, non-zero stderr at error
  • Extension host logging — all console.* calls in builtins-registry and extension-loader replaced with extHostLog.* (the silo:extension-host Output channel)
  • openSingletonPanel layout API — focuses an existing panel instead of opening a duplicate; used by ctx.log.show()
  • Status bar ordering fix — right-side items now sort descending so lower priority anchors to the right edge; corrected priorities for updates/theme/settings/panel-toggles and documented the convention in SDK types

Test plan

  • Open Output panel via menu or ctx.log.show(); confirm channel dropdown shows host channels at top (no header), then Built-in Extensions group, then Extensions group
  • Switch workspaces — "Workspace activated: <name>" appears in Application channel
  • Create / close / reopen a workspace — corresponding events appear
  • Switch themes — "Theme changed: <name>" appears in Application channel
  • Trigger a notification — entry appears in Notifications channel
  • Open a git diff or status — git commands appear in the Git channel (read-only at debug, write at info)
  • Install a runtime extension — its channel appears under Extensions, not Built-in Extensions
  • Status bar right cluster reads: Updates → Theme → Settings → Panel Toggles (left to right)
  • pnpm test green

🤖 Generated with Claude Code

…elector

Introduces the core.output dock panel and the ctx.log logging API so
extensions can write structured, per-channel output visible in the UI.

**Output panel (core.output)**
- New `OutputPanel` dock panel with channel selector, level filter, text
  search, clear button, and auto-scroll toggle
- Channel dropdown groups entries into three sections: host channels
  (Notifications, Application — no header), Built-in Extensions
  (first-party silo.* extensions, trusted), and Extensions (third-party)
- Grouping is driven by a `builtin` flag threaded from `registerChannel`
  through `OutputChannelState`; key-prefix alone is insufficient because
  runtime-loaded silo.* extensions from the external repo share the same
  `ext:silo.*` prefix

**ctx.log / LogService SDK API**
- New `LogService` type (`packages/sdk/src/output-service.ts`) with
  `debug/info/warn/error/show/clear`; exported from the SDK barrel
- `createContext` wires `ctx.log` for every extension: `core.*` share the
  `silo:application` channel; all others get a per-extension `ext:<id>`
  channel that is auto-removed on deactivation
- `registerChannel` now accepts an optional `builtin` flag so the panel
  can correctly group first-party vs third-party channels

**Host / extension loader logging**
- `extHostLog` (`silo:extension-host` channel) replaces all `console.*`
  calls in `builtins-registry.ts` and `extension-loader.ts`
- Activation, deactivation, enable/disable, load/unload, and dispose
  errors now appear in the Extension Host output channel

**Notifications mirrored to Output**
- `ctx.ui.notify` now also writes to the `silo:notifications` channel so
  users can review dismissed toasts in the Output panel

**Application channel lifecycle events**
- `core.workspaces` subscribes to workspace state and logs activated,
  created, closed, and reopened events to the Application channel
- `core.themes` logs theme-change events to the Application channel

**Git command logging (silo.git)**
- Read-only git commands (status, log, diff, show) log at `debug`; write
  commands log at `info`; non-zero stderr logs at `error`

**openSingletonPanel layout API**
- New `LayoutService.openSingletonPanel` creates at most one panel per
  kindId (focuses existing if present); used by `ctx.log.show()`

**Status bar ordering fix**
- Right-side status items now sort descending so lower priority anchors
  to the right edge (mirrors the left-side ascending convention)
- Corrected priorities: updates (-2), theme (-5), settings (-10),
  panel-toggles (-20); documented the convention in SDK types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@davideweaver davideweaver merged commit 52d1848 into main Jun 29, 2026
3 checks passed
@davideweaver davideweaver deleted the feat/output-panel-and-log-api branch June 29, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant