Skip to content

feat(self-inspect): add shared state viewer/editor#240

Merged
antfu merged 1 commit intomainfrom
antfu/self-inspect-state-view
Mar 23, 2026
Merged

feat(self-inspect): add shared state viewer/editor#240
antfu merged 1 commit intomainfrom
antfu/self-inspect-state-view

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented Mar 23, 2026

Description

Add a new "Shared State" view in self-inspect that lists all registered shared states and allows inspecting/editing them on-demand using visual-json's JsonEditor.

Changes

  • New RPC function get-shared-state-keys to list all registered shared state keys
  • New page and component for split-panel UI: state key list on left, JSON editor on right
  • On-demand state loading via existing server-state:get/set RPC functions
  • Checkbox to show/hide internal states (defaults to hidden, filters devtoolskit:internal:* and __* prefixes)
  • Added @visual-json/vue as a dev dependency

Technical Details

The implementation reuses existing core RPC functions for get/set operations rather than introducing new ones, keeping the API surface minimal. Internal state keys are hidden by default to reduce noise.

Add a new "Shared State" view in self-inspect that lists all registered shared states and allows inspecting/editing them on-demand using JsonEditor. Includes a checkbox to show/hide internal states (defaults to hidden).

- New RPC function get-shared-state-keys to list all state keys
- New page state.vue with SharedStateView component
- SharedStateView with split-panel UI: state key list + visual JSON editor
- Filter internal states by default (devtoolskit:internal:* and __* prefixes)
- On-demand loading using existing server-state:get/set RPC functions

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@antfu antfu merged commit 3a6f337 into main Mar 23, 2026
8 of 9 checks passed
@antfu antfu deleted the antfu/self-inspect-state-view branch March 23, 2026 02:26
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