Skip to content

feat: local dev observability — cockpit error boundaries + Sentry Spotlight with sentry_mode tool #97

Description

@Foxfire1st

Summary

Give agents-remember a code-level error/tracing layer for local development:

  1. Cockpit error boundaries — the dashboard currently has no React error boundary; one render crash white-screens the whole cockpit (precedent: the EnclosureCanvas node.landing.find crash). Add a reusable CockpitErrorBoundary grammar primitive at the root and around viewport panels, with a cockpit-styled fallback + retry.
  2. DSN-free Sentry Spotlight across all three runtime surfaces — MCP server (FastMCP instrumentation), FastAPI dashboard server, and the React cockpit send errors/traces to a local Spotlight sidecar. No DSN, no cloud; nothing leaves the machine.
  3. A sentry_mode MCP tool gates the whole thing: enable/disable persisted sentry mode, default off. No env-flag gating.

Series (master + 3 sub-tasks)

  • 01_cockpit-error-boundaries — standalone, no Sentry dependency; exposes an onError seam.
  • 02_python-sentry-mode-and-spotlight-wiringsentry-sdk in [dev] extras only; sentry_mode tool + persisted state; init seam called from MCP server + dashboard CLI entrypoints; Python-side docs + smoke.
  • 03_dashboard-spotlight-and-smoke-docs@sentry/react + @spotlightjs/spotlight as devDependencies behind DEV-gated dynamic imports; hooks the boundary seam; prod bundle proven unchanged; cross-layer smoke + dev workflow docs.

Invariants

  • No production telemetry, ever: dev extras / devDependencies only, sentry_mode default off, no DSN anywhere in the repo, prod dashboard bundle byte-identical.
  • Error boundaries never swallow silently (console + fallback always).
  • stdio MCP transport untouched (SDK speaks HTTP to the local sidecar only).
  • Sub-tasks never bump the version; the master owns any release decision at series end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions