Skip to content

Descriptor renderer v2: instance selector, per-instance results, capability widgets, requirements gate - #11

Merged
mbreissi merged 1 commit into
mainfrom
feat/descriptor-renderer-v2
Jul 27, 2026
Merged

Descriptor renderer v2: instance selector, per-instance results, capability widgets, requirements gate#11
mbreissi merged 1 commit into
mainfrom
feat/descriptor-renderer-v2

Conversation

@mbreissi

Copy link
Copy Markdown
Contributor

Implements the console side of the shared industrial-adapter panel contract (core/docs/adapters/edge-console-panels.md §3.1/§3.2/§4/§4.1).

What's here

Foundation

  • PanelViewDescriptor.rendererRequirements (closed format: ≤32 unique sorted tokens, ^[a-z][a-z0-9-]*\.v[1-9][0-9]*$); gateway normalization validates and strips a malformed field, never the view.
  • Per-instance command-result partitioning: component::verb::instance slots with the instance captured from invoke args at request time — stale replies settle under the instance they were sent for.
  • Panel-tab instance selector: options from configured instances, ?instance= URL persistence, explicit unavailable state for a removed instance, component-scoped views never show it. Legacy zero/"main"-instance components keep the previous behavior.
  • Default viewer RBAC now includes read-only sb/signals (docs updated).

Widgets + gates (all console-owned; no component assets)

  • statusDashboard, actionBar, commandTable (schema-checked controls incl. integer-range and select/optionsSource), metricSeries (reads the Metrics store, never invokes), eventFeed (reads the Events store, bounded).
  • Generic descriptor-defined columns for treeBrowser/signalGrid, replacing the hard-coded OPC UA headings; signalsVerb preferred with subscriptionsVerb retained as the migration alias.
  • rendererRequirements gate: unknown token → one view-level "requires a newer edge-console" state, zero widgets mounted; absent field renders as before.
  • §4.1 availability consumption on every command-bound widget/action (disabled/unsupported with sanitized reasons; distinct unavailable/forbidden/timeout/malformed states).

Contract gaps filled (decisions to fold back into the panel contract doc)

  • statusMap: own-property map from the value's string form → closed tone vocabulary (ok/warn/error/info/neutral).
  • metricSeries.aggregation: closed set last (default)/avg/min/max/sum.
  • eventFeed.families match the event type exactly or by family./family/ prefix.
  • commandTable renders at most 500 rows with a "showing first N" note.
  • Boolean controls emit only true; unchecked omits the field (strictly narrowing).
  • Hierarchical-mode depth/maxRefs without ref, and bounds clamping, follow the four-template parity decisions in the core enablers PR.

Validation

  • npm run build clean (protocol → ui → gateway); npm test: protocol 83, ui 529, all green; cargo test -p edge-console-gateway: 75 green.
  • npm run coverage: 95.30% lines / 93.19% stmts / 83.85% branch / 92.39% funcs vs 90/80/85/90 thresholds.
  • npm run lint clean.

Not in scope (per the contract): the guarded-write flow (writeVerb UI), component asset/Web-Component runtime.

Companion PR: edgecommons/edgecommons feat/adapter-core-enablers (availability producer, scoped inbox registration, Sample extras/null, template panel/browse/metrics/schema fixes, SOUTHBOUND.md convention amendments).

🤖 Generated with Claude Code

https://claude.ai/code/session_014iQDskU2E1HLStYHoZrSTn

…ce results, capability widgets

Implements the shared adapter panel contract's renderer capabilities:

- Instance selector on the Panel tab (URL-persisted, explicit unavailable
  state, no silent first-instance fallback; legacy zero/"main"-instance
  components keep the old path).
- Per-instance command-result partitioning: results key on
  component::verb::instance, captured from invoke args at request time,
  so stale replies can never cross instances.
- New descriptor widgets: statusDashboard, actionBar (confirm/danger/
  role hints + optimistic lifecycle gates), commandTable (schema-checked
  controls incl. integer-range and select/optionsSource), metricSeries
  (Metrics store, never invokes), eventFeed (Events store, bounded).
- Generic descriptor-defined columns for treeBrowser and signalGrid
  (signalsVerb preferred; subscriptionsVerb kept as migration alias).
- rendererRequirements view gate: closed 9-token vocabulary; unknown
  token renders one "requires a newer edge-console" state, no partial
  mount. Gateway validates/strips a malformed field.
- Command availability consumption per the contract (disabled/
  unsupported states with sanitized reasons) on every command-bound
  widget and action.
- Default viewer RBAC now includes read-only sb/signals.

protocol 83, ui 529, gateway 75 tests green; ui coverage 95.3% lines;
lint clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014iQDskU2E1HLStYHoZrSTn
@mbreissi
mbreissi marked this pull request as ready for review July 27, 2026 16:56
@mbreissi
mbreissi merged commit cbd1153 into main Jul 27, 2026
2 checks passed
@mbreissi
mbreissi deleted the feat/descriptor-renderer-v2 branch July 27, 2026 16:56
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