Descriptor renderer v2: instance selector, per-instance results, capability widgets, requirements gate - #11
Merged
Conversation
…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
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.
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.component::verb::instanceslots with the instance captured from invoke args at request time — stale replies settle under the instance they were sent for.?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.sb/signals(docs updated).Widgets + gates (all console-owned; no component assets)
statusDashboard,actionBar,commandTable(schema-checked controls incl.integer-rangeandselect/optionsSource),metricSeries(reads the Metrics store, never invokes),eventFeed(reads the Events store, bounded).treeBrowser/signalGrid, replacing the hard-coded OPC UA headings;signalsVerbpreferred withsubscriptionsVerbretained as the migration alias.rendererRequirementsgate: unknown token → one view-level "requires a newer edge-console" state, zero widgets mounted; absent field renders as before.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 setlast(default)/avg/min/max/sum.eventFeed.familiesmatch the event type exactly or byfamily./family/prefix.commandTablerenders at most 500 rows with a "showing first N" note.true; unchecked omits the field (strictly narrowing).depth/maxRefswithoutref, and bounds clamping, follow the four-template parity decisions in the core enablers PR.Validation
npm run buildclean (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 lintclean.Not in scope (per the contract): the guarded-write flow (
writeVerbUI), component asset/Web-Component runtime.Companion PR:
edgecommons/edgecommonsfeat/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