Repository navigation
fix(nodes): new boards counted on every tab, grace from coming online, one log of the physical bus - #154
Merged
Conversation
…e log of the physical bus Fix-track chunk 4 (#133), part one: new boards and the event log. - D1 / X3 / R2: one newState (node-model.ts) feeds the Cockpit, the Overview and Connection; all three count a stray (a new board that can't be adopted, or still unidentified 5 s after it came online). - S6: the roster tracks onlineSince, reset on each offline -> online; the identify grace counts from it, not from first sighting. - X8 / C6: one newReason: a registry board waiting to be added is "from NODE_IDS.md" on its flag, fault box and log row; a probe test fails if the old wording is back anywhere in src. - D8 / S5 / C4: the log is the physical bus. Rows about a board outside your cockpit are info, labelled "not in your cockpit"; the baseline says how many are not yours. "New on the bus" reads newState (so telemetry-identified boards and strays get it too) and is cleared when the board joins your cockpit, so Forget then re-plug logs it again. Boards online by PDU pages alone update last seen and get online / offline rows. Degraded is logged once per episode.
mottihoresh
added a commit
that referenced
this pull request
Oct 18, 2026
…of the physical bus, safe add all and un-hide all (#155) Chunk 4 of the fix track (#135): new boards, event log and cockpit actions. Closes #133. Item PRs squash-merged into `fix/chunk-4`: - #153 — one fault order (bus-off → fault → overheat → error-passive) in the Log and the Cockpit; Add all can't double-run (dialog busy flag + main re-entry guard); Un-hide all goes on past a failure and lists every board it couldn't un-hide; Reset preview refetches only when the mapping changes; Adopt opens on the board asked for and its count matches the button; an older node model or cockpit snapshot never replaces a newer one. - #154 — one `newState`: the unidentified warning counts on Cockpit, Overview and Connection after 5 s; the 5 s grace counts from when a board comes online (reset on each offline → online); "from NODE_IDS.md" wording everywhere (one `newReason`, probe test); the event log is the physical bus — boards outside your cockpit logged at info with "· not in your cockpit", a telemetry-only board gets its "new" row and online/offline rows, "new" is worked out once and cleared on Forget, degraded is logged once per episode. Tested on the rig before merge (checklist in #133). BEGIN_COMMIT_OVERRIDE fix(nodes): one fault order, add all and un-hide all can't double-run or stop early, dialogs show the current board fix(nodes): new boards counted on every tab, grace from coming online, one log of the physical bus END_COMMIT_OVERRIDE
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.
Fix-track chunk 4 (#133), the new-boards and event-log items. Behaviour changes on purpose (decided 2026-10-16); nothing else does. Rebased on
fix/chunk-4after #153 (one fault order); its changes are kept as they are.1. D1 / X3 / R2: strays on every tab
newState(entry, now, live)innode-model.ts:news(adoptable),identifying(withstrayAt),stray, or none.isReportableNewis built on it, andattention.ts strayNewreads it.buildCockpitSnapshothands the samestraystooverviewSummaryandnodesSummary. The Cockpit, the Overview (tile and banner) and Connection (counts plus a stray row with chip… · can’t be adopted, no zone) all count it after 5 s.NodesSummary.knownis the band's total, so a lone stray isn't hidden behind "No nodes reported".IDENTIFY_WAIT_MSandstrayKindmoved intonode-model.ts.strayFlagisstrayKindin capitals.2. S6: grace from coming online
firstSeenAt, which an absent roster row also sets. A board listed absent and coming online later was flagged at once.NodeRosterkeepsNodeSeen.onlineSince: set on a present row after an absent one (or the first present row), cleared when the board goes absent (delta or END). The model copies it onto new entries (NodeModelEntry.onlineSince), andnewStatecounts the grace from it.3. X8 / C6: "from NODE_IDS.md" wording
nodeHealthflagNOT IN REGISTRY, thenodeFaultBoxesbox "Not in registry", log detailin NODE_IDS.md/not in registry. The Overview already said "from NODE_IDS.md".newReason(entry)innode-model.ts:from NODE_IDS.md/not in NODE_IDS.md. The flag isFROM NODE_IDS.md/NOT IN NODE_IDS.md. The box title isFrom NODE_IDS.md(a registry board's text no longer says it isn't listed). The log's "new on the bus" detail reads the same.A probe test (
main/nodes/phase0-probes"X8 / C6") scans every.ts/.tsxinsrcfornot in registry(any case) and the old log literal'in NODE_IDS.md', and fails on a hit. It was shown to fail when// NOT IN REGISTRYwas appended toviews.ts.Left alone:
AdoptDialog.tsx's queue label<name> · in NODE_IDS.mdis the renderer's own wording for a registry board in the Adopt queue. It was out of scope (that dialog was another PR's file), so it isn't in the probe.4. D8 / S5 / C4: the log is the physical bus
not in your cockpit(onerow()in the tracker). A stray gets onenew on the bus · <unidentified | second Gateway | unknown board type> · can’t be adoptedrow at info oncenewStatesaysstray. If it later identifies as adoptable, it gets itsnewrow then.· K not in your cockpitwhen some aren't yours.isNew: not known and an adoptablekindOf). Only checked on status rows, so a board identified only by telemetry got no row until its next roster row.announce()readsnewStatefrom the model entry, built at most once per line, so it isn't re-derived. It is checked on status and telemetry lines: a PDU identified by its pages gets its row at those pages.NodeEventTracker.cockpitChanged()runs after every successful mapping change. It drops the record for boards now in your cockpit, so a forgotten board that returns is new again.busTransitions(wasrosterTransitions) usesonBusIds: the oneavailabilityOfrule over roster ∪ telemetry. It runs on roster changes and on page takes, so last seen and un-hide follow pages too.pagesOnline()gives a board online by its pages alone (onlineByPages)online/offline · no telemetryrows. If the roster later lists it, no secondonline.degradedrow.Tests changed on purpose
the Overview does not count the same stray (X1 today)1 node needs attention — 1 warning (NODE_ID 9)the 5 s grace counts from firstSeenAt … (F26 today)onlineSincethe Overview doesn’t count a stray (X1 today)—/ "no nodes known"1 / 1, banner names NODE_ID 9a board still identifying, or one that can’t be adopted, is not mentioned4 / 7, Connection 2/2/2 with the stray's row; next push6 / 7, 5/1/0)on-the-bus.testlink upknown 2, rows[2]known 3, warn 1, rows[2, 9]overview-summary.test… without straysstrayspassed; plus a new stray caselookup()stub (and the #153faults.teststub, call-site only)isNew/unmapped/inRegistryoutside/entry(the model entry)newStatein NODE_IDS.md/not in registryfrom NODE_IDS.md/not in NODE_IDS.mdreports a new node once per app run…roster: 1 node online… · 1 not in your cockpita new node coming back in a later port session…online [info],offline · no heartbeat [error]… · not in your cockpit [info]degraded … a new fault id is a new rownode-hub.seamB33phase0-probesC4phase0-probesD1, S6, C6node-hub.testS1 kind stored{ added, kind }after PDU pageslastSeennode-status-wire.testseen{ firstSeenAt, reportedAt }onlineSince(reset on coming back)detail: 'in NODE_IDS.md'from NODE_IDS.mdInputs only, assertions unchanged:
scenarios.newBoardalso setsonlineSince(its doc already said "online since firstSeenAt"), and theadopt.test/cockpit-host.test/on-the-bus.teststray fixtures setonlineSince.nodesSummary/overviewSummarygained thestraysargument ([]in the old cases).The NODE_ID 0 overview cases (
takes / treats NODE_ID 0 like any other node) are unchanged and still pass. Nothing here changes how the summaries treat a NODE_ID 0 entry, and the model has excluded node 0 since #344.New tests
node-model.test:newState(news / stray / identifying withstrayAt, none off the bus or unplugged),onlineSinceon the model,newReason,strayKind,onlineByPages.node-status-wire.test:onlineSincecleared by absent row or END, reset on coming back.adopt.test: grace fromonlineSince.overview-summary.testandconnection-summary.test: a stray counted with its row.cockpitChanged;pagesOnline.main/nodes/new-boards.seam.test.ts, throughmakeServices()over the fake serial port:FROM NODE_IDS.mdflag and log row;How verified
npm run lint,npm run lint:deps,npm run typecheck,npm test: all green (1434 tests).API guard: header note only.
NodeModelEntryandNodeSeengained optionalonlineSince; there is no channel or intent change.