Skip to content

Add a read-only Sprite Inspector pane as a Claude Code mod - #2

Merged
aezell merged 3 commits into
mainfrom
alex/sprite-inspector-pane
Oct 2, 2026
Merged

aezell merged 3 commits into
mainfrom
alex/sprite-inspector-pane

Conversation

@aezell

@aezell aezell commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds /sprites-inspector, a read-only pane for browsing Sprites from Claude Code, built as a Claude Code mod. It is the Claude Code counterpart of the Sprite Inspector that sprites-api serves to MCP App hosts (superfly/sprites-api#1297, used by the Codex plugin), and calls the same read-only tools over the plugin's own MCP connection, so it needs no new credentials or server changes.

  • Browse: filter by name prefix and page through Sprites (open_sprite_inspector), with a colored status dot per Sprite.
  • Inspect: select a Sprite to see its organization, creation date, status, and URL (get_sprite_info, which does not wake it).
  • Runtime: load services and checkpoints (service_list, checkpoint_list) and the last 100 lines of a service's logs (service_logs), only on request, with a warning when that would wake a cold Sprite.
  • Use in chat: appends a note Claude reads (not shown as typed) naming the Sprite and its sprite_id, so later calls are checked against that exact Sprite. The sprites skill now explains these notes.
  • Freshness: lists again when opened and when the pane regains focus (at most every 10 seconds), shows when it last listed, and never polls. Focus refresh restarts pagination from the first page while preserving the selection and runtime details, so rows that move between pages remain reachable. New searches clear the previous rows and cursor, including when the request fails.
  • Layout: stacked in a narrow pane, list and details side by side from 64 columns.
  • Fallbacks: where nothing draws a pane (VS Code chat panel, claude -p), the command answers with a text listing.

Compatibility

  • Mods need Claude Code 2.1.287+. I checked that 2.1.144 still installs and loads the plugin with the new modules and types entries (its MCP server registers as before), so older clients just don't get the pane.
  • types is required: 2.1.287's validator rejects the module's $.state key without the contract. Older validators reject or warn on types, so CI moves from 2.1.224 to 2.1.287 and now also runs claude plugin test ./plugins/sprites.
  • check_repository.py now checks .ts/.tsx files too, and a unit test asserts the mod is registered with its contract.

Known issues

  • Auto mode: Claude Code sends a mod's $.mcp.call through the auto-mode classifier, which has no request to judge a button press by and refuses it. The README documents allow rules for the five read-only tools. The mods docs say a plugin's call needs no permission prompt, so this looks like a Claude Code issue worth reporting.
  • Desktop first click: in the desktop Code tab, the first click on a button in an unfocused pane only focuses it. Once the pane has focus, clicks press first time; the mod keeps focus by never removing the focused element.
  • Status mismatch: get_sprite_info can report a running Sprite as cold while the listing (and sprite list) says running. The pane keeps the listing's status; the server fix is being worked on separately in sprites-api.

Test plan

  • python3 scripts/check_repository.py, python3 -m unittest discover -s tests (14 tests)
  • claude plugin validate ./plugins/sprites --strict and claude plugin validate . --strict on 2.1.287
  • claude plugin test ./plugins/sprites on 2.1.287: browse, select, runtime, logs, and refocus on terminal and desktop at narrow and wide widths, plus the sign-in message
  • Strict TypeScript check of the module and tests against the engine's declarations
  • Live in the desktop Code tab against real Sprites: listing, selection, refresh on focus, and Use in chat attaching the Sprite and its sprite_id
  • Live Load runtime (services, checkpoints) and service logs against a real Sprite

🤖 Generated with Claude Code

Pagination fixes and this description update were generated by OpenAI Codex.

aezell and others added 3 commits October 2, 2026 14:17
/sprites-inspector opens a pane in the terminal and the desktop Code tab
that browses Sprites, their services, checkpoints, and recent logs, and
attaches a selected Sprite (with its sprite_id) to the conversation. It
calls the same read-only MCP tools as the Inspector the hosted server
serves to MCP App hosts, over the plugin's own connection.

The mod lists again when opened and when the pane regains focus, never
polls, and keeps the listing's status over get_sprite_info's, which can
lag the live runtime state. CI moves to Claude Code 2.1.287, the first
release with mods generally available, and runs the mod's tests; older
clients still load the rest of the plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A long checkpoint comment pushed its date past the pane's edge. The date
now keeps its width, the comment truncates in the space left, and the id
column fits `Current`. Row cells that grow also shrink below their text,
so Sprite and service names truncate the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aezell
aezell merged commit 398d445 into main Oct 2, 2026
1 check passed
@aezell
aezell deleted the alex/sprite-inspector-pane branch October 2, 2026 19:35
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