Skip to content

feat(console): json-render views lens + activity sparkline#197

Open
Lanzelot1 wants to merge 2 commits into
mainfrom
feat/console-views
Open

feat(console): json-render views lens + activity sparkline#197
Lanzelot1 wants to merge 2 commits into
mainfrom
feat/console-views

Conversation

@Lanzelot1

@Lanzelot1 Lanzelot1 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Consolidates the console-TUI work (previously scattered across feat/console-json-render and uncommitted local iterations) into one reviewable branch, rebased onto current main.

  • View parts on the wire (@cotal-ai/core): a peer can publish a renderable view — a json-render flat spec — as a { kind: "view", spec } part on an ordinary message via endpoint.publishView(spec, { channel | to | toService }). No new subject; rides all three delivery modes with a plain-text label part alongside. SPEC.md gains the third core Part shape; spec/cotal.schema.json regenerated.
  • Views lens in the console (V): renders peer-published views through a fixed @json-render/ink component catalog — declared components only, validated props, never code; an invalid spec shows its rejection reason. The golden-signal tiles strip now renders through the same catalog (dogfoods the guardrail).
  • Activity sparkline: MeshView keeps a 15-bucket / 60s message-volume series; the status bar draws it next to msgs/s.

Verified

  • pnpm typecheck + pnpm test green; view/connect/spawn-from-anywhere smokes pass.
  • Live TUI against a running mesh: publishView → V lens renders the panel; a spec naming an unknown component (Script) is rejected with the reason; sparkline animates with traffic.

Notes

  • Supersedes branch feat/console-json-render (same feature, pre-drift base) — that branch can be deleted after merge.
  • Overlaps feat/tmux-extension only on the identical Sparkline.tsx; merges cleanly either order.

(The example-02 demo assets that previously rode along were split into #212 to keep this PR focused on the feature.)

Comment thread examples/02-self-improving-console/replay.ts Fixed
…nt.publishView

A peer can publish a renderable view (a json-render flat spec: root key +
flat element map) as a { kind: "view", spec } part on an ordinary message —
no new subject, all three delivery modes. Core owns the structural wire
shape (ViewSpec, assertViewSpec); the viewer's component catalog is the
render-side guardrail. SPEC gains the third core Part shape; schema regenerated.
@Lanzelot1 Lanzelot1 force-pushed the feat/console-views branch 2 times, most recently from 9db360e to 61a33a9 Compare July 8, 2026 09:07
The console renders peer-published views through a fixed @json-render/ink
component catalog (unknown components rejected with a reason); the
golden-signal tiles strip now renders through the same catalog, dogfooding
the guardrail (Tiles.tsx → tilesSpec + SpecView). MeshView captures view
parts (deduped, windowed) and a 15-bucket / 60s message-volume series that
the status bar draws as a sparkline next to msgs/s. Text-only surfaces
(join, connector inbox) show a [view] placeholder.
@Lanzelot1 Lanzelot1 force-pushed the feat/console-views branch from 61a33a9 to 16e5570 Compare July 8, 2026 09:42
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