Scoped-commands wave: scope-driven addressing UI, keepalive instance state, pause-aware miss-detection - #13
Merged
Merged
Conversation
…state
Adopts the core 0.5.0 scoped-commands release (DESIGN-scoped-commands.md).
Gateway
- Builds against edgecommons 0.5.0; Cargo.lock records the bump. The gateway
registers no command handlers of its own, so the breaking (verb, scope,
handler) registration surface needed no call-site migration.
- Descriptor normalization keeps command entries verbatim, so each verb's new
`scope` reaches the browser; tests pin that for both the array and the
{verbs: []} wrapper form.
- The state keepalive's per-instance `state` token is forwarded through
instance-status normalization (it was dropped before), blank/non-string
tokens excluded.
Protocol
- CommandCapability.scope widens to component | instance | both.
- InstanceStatus gains the optional `state`, plus instanceState() /
isPausedInstance() for the CONNECTING/ONLINE/BACKOFF/PAUSED vocabulary;
unknown tokens resolve to undefined so consumers fall back to `connected`.
UI
- The Panel tab derives its addressing from each verb's declared scope:
`instance` mounts the selector and always sends the selected instance;
`component` never involves the selector and never sends one; `both` adds an
explicit "Whole component" option that sends no instance. A verb with no
declared scope keeps today's widget-scope heuristics. "Whole component" is
offered only when every instance-addressable widget in the view declares
`both`, and is dropped when the operator opens a view that requires an
instance.
- The Instances tab renders the keepalive state with badge/tone mapping and
marks PAUSED as expected quiet; the instance selector shows it too.
- Pause-aware quiet handling: the console's miss-detection ladder keys on the
component keepalive, never on instances, so a paused instance cannot trip it.
The surface that did read a pause as a fault was the Health tab's aggregate
connection state, which now excludes paused instances from the connected
ratio and reports an all-paused component as Paused rather than Disconnected.
- Absent/unknown state keeps the connectivity-only rendering everywhere.
Docs: data-types (InstanceStatus state table, command-capability shape and the
addressing it drives), messaging-interface (how an instance is addressed, state
class), explanation (why a pause never trips staleness), user guide (Instances
and Panel tabs), and the Phase-3 descriptor design.
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.
edge-console's leg of the core 0.5.0 scoped-commands wave
(
edgecommons/edgecommonsdocs/platform/DESIGN-scoped-commands.md, §2.3 + §6).Closes #12
Gateway — 0.5.0 adoption
rust-lib/v0.5.0;Cargo.lockrecords the
edgecommonsbump (0.3.0 → 0.5.0). CI checks out core's default branch, whoseHEAD is the 0.5.0 release, so no workflow change was needed.
(it is a command client), so the breaking
(verb, scope, handler)registration surfacedoes not reach this repo.
scopefield survivesto the browser — now pinned by tests for both the array and the
{"verbs": [...]}wrapper form.statetoken was being dropped by instance-statusnormalization. It is now forwarded verbatim (blank/non-string tokens excluded) — the plumbing
D-SC-8 needs.
Protocol
CommandCapability.scopewidens to"component" | "instance" | "both".InstanceStatusgains the optionalstate, plusinstanceState()/isPausedInstance()forthe
CONNECTING/ONLINE/BACKOFF/PAUSEDvocabulary. An unknown token resolves toundefined, so consumers fall back toconnectedalone.UI — scope-driven addressing (§2.3)
The Panel tab derives its addressing UI from each verb's declared scope, which is authoritative
over the widget-level
scopemarkers:instancecomponentinstancebothinstance"Whole component" is offered only when every instance-addressable widget in the view declares
both— offering it while a widget requires an instance would let the operator put that widgetinto an addressing its verb rejects. A whole-component choice is dropped when the operator opens a
view that requires an instance.
UI — keepalive instance state (D-SC-8)
connecting/blue, backoff/red, paused/gray), marking PAUSED as expected quiet. The panel
instance selector shows it too.
The staleness ladder (gateway
Model::sweep, andfleetIssueson the client) keys on thecomponent's own
statekeepalive, which keeps ticking while one of its connections is paused —so a pause cannot trip staleness, and no gate is needed there. The surface that did read a
deliberate pause as a fault is the Health tab's aggregate connection state; it now excludes
paused instances from the connected ratio, reports them separately, and reads an all-paused
component as Paused rather than Disconnected.
Docs
reference/data-types.md(theInstanceStatusstate table + a new command-capability sectiondocumenting
scopeand the addressing it drives),reference/messaging-interface.md(how aninstance is addressed on a command, and what the
stateclass carries),explanation.md(why a pause never trips the ladder),user-guide.md(Instances and Panel tabs),and
docs/design/PHASE3-DESCRIPTOR-PANELS.md.Validation
cargo test -p edge-console-gatewaynpm test— protocolnpm test— uinpm run coverage(90/80/85/90 thresholds)npm run lintnpm run build(protocol → ui → gateway)