Add observable query diagnostics page#11
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
- Upgrade @cratis/arc.react to ^20.28.0 - Add captureObservableQueryDiagnosticsForActiveTab() to arc-context.ts: injects a page-world script that traverses the React fiber tree to find the ArcContext value and calls observableQueryDiagnostics.getSnapshot() - Export ObservableQueryDiagnosticsSnapshot and related types - Add 'observable-query-diagnostics' to PopupTab union type - Create ObservableQueryDiagnosticsView with 2-second live polling showing health, transport, multiplexer, cache, and ownership diagnostics sections - Add CSS styles for the diagnostics view - Add new tab in LensPopup (disabled when not an Arc application)
Copilot
AI
changed the title
[WIP] Add a page for real time observable query diagnostics
Add observable query diagnostics page
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a live Query Diagnostics tab to the Lens popup that surfaces real-time observable query state from the inspected Arc application via
ArcContext.observableQueryDiagnostics.Approach
The diagnostics object lives inside the Arc application's React fiber tree. Rather than a WebSocket bridge, the extension injects a page-world script (same technique as Arc context detection) that traverses the fiber, finds the
ArcContextprovider node, and callsobservableQueryDiagnostics.getSnapshot()— returning a plain serializable object over the structured-clone boundary.The popup polls this every 2 seconds for live updates.
Changes
@cratis/arc.react— bumped to^20.28.0arc-context.ts— addscaptureObservableQueryDiagnosticsFromPage(page-world injected fn) andcaptureObservableQueryDiagnosticsForActiveTab(extension-side async API); re-exports all snapshot sub-types from@cratis/arc/queriesstorage.ts— adds'observable-query-diagnostics'toPopupTabObservableQueryDiagnosticsView.tsx(new) — polls every 2 s; renders Health, Transport, Multiplexer (with per-connection breakdown), Cache (with per-entry subscriber/listener/size detail), and Ownership sections; tab is disabled when the active page is not an Arc applicationlens-popup.css—oqd-*styles for the diagnostics layoutLensPopup.tsx— registers the newpi-chart-linetab, disabled when!hasArcContext