Skip to content

fix(dcs): start with no gateway starts and waits for the board instead of being refused - #165

Merged
mottihoresh merged 1 commit into
fix/parkedfrom
fix/p159-start-waits
Oct 18, 2026
Merged

mottihoresh merged 1 commit into
fix/parkedfrom
fix/p159-start-waits

Conversation

@mottihoresh

Copy link
Copy Markdown
Contributor

What

In Bridge, and in Replay with Drive Gateway on, Start with no Gateway was refused (startBlocked, enforced in DcsRelay.start()): the pill flipped back to Stopped and main's reason never showed.

Start now always starts. With no board the relay runs and shows the waiting reason a driven Replay already shows after a drop: gold pill + "waiting for the Gateway" tooltip, the note under Start, the Overview's "relay waiting — resumes when it connects". When the Gateway connects, delivery begins with no further click.

Changes

  • src/main/dcs/dcs-relay.ts — start() no longer gated on the link; it just runs.
  • src/main/dcs/relay-rules.ts — startBlocked() and the startBlocked surface fact removed.
  • src/shared/dcs/ipc.ts — RelaySurfaces.startBlocked removed (type change only; noted in ipc.compat.test-d.ts header).
  • Renderer, now dead without the fact:
    • RelayPill.tsx — the "!" mark, aria-disabled, and the "Can't start the relay" callout + Connect button removed.
    • RelayControls.tsx — Start is never disabled.
    • relay-view.ts — startBlockedReason / startBlockedCallout removed; relayNote returns the text only, since its info flag was only set for the blocked reason.
    • styles.css — .pill--blocked, .devpop__hint, .waitnote--info removed (only those used them).
  • Still refused: Replay with no capture loaded ("No capture loaded"), plus a transport that throws on start. The store's take-back of a refused pending Start stays for those cases (comment updated).

Tests

New (they fail on the old code):

  • pushed-rules.seam.test.ts — Bridge with no board: Start → running, waiting: 'device', Overview waiting; the board arrives → delivering and export reaches the board. Same for a driven Replay with a capture.
  • t15-relay-pill.test.tsx — Bridge / driven Replay with no board: a click starts, the pill goes gold with the waiting-for-Gateway tooltip; the board arriving clears it with no further click.

Updated because they pinned the old refusal:

  • src/main/dcs/relay-rules.test.ts — "each side of the on/off": the stopped side carries no startBlocked.
  • src/main/app/app-services.test.ts — "refuses Start until the board is connected…" → "starts with no board … and waits for the board" (now also checks delivery once the board opens); "does not reconnect a released link on Start" now expects ok: true; the Monitor/Replay test expects a driven Replay to be refused only for having no capture.
  • src/main/app/pushed-rules.seam.test.ts — "Bridge with no board: Start blocked…" replaced (above); "toggle: … a refused Start pushes no relay state" now refuses with a Replay that has no capture.
  • src/renderer/src/gateway/link-view.test.ts — startBlocked / startBlockedReason describes removed; relayNote expectations are strings.
  • src/renderer/test/t15-relay-pill.test.tsx — the three blocked/callout tests ("blocked with '!'…", "the board arriving lifts the block…", "Esc closes the callout…") replaced by the start-and-wait test; aria-disabled checks removed.
  • src/renderer/test/t28-connection-relay-controls.test.tsx — "Drive Gateway … without a board it blocks Start" and "Bridge without a board: Start is greyed out" now start and show the waiting note.

Closes #159

…d of being refused

Bridge, and Replay driving the Gateway, refused Start with no board: the pill flipped back to
Stopped and the reason never showed. Start now always starts; with no board the relay runs and
shows the waiting reason a driven Replay already shows, and delivers once the Gateway connects.

The startBlocked rule and fact are removed, with the pill's blocked "!" and callout and the
greyed-out Start that only they used. A Replay with no capture is still refused.

Closes #159
@mottihoresh
mottihoresh merged commit 6f09c95 into fix/parked Oct 18, 2026
3 checks passed
@mottihoresh
mottihoresh deleted the fix/p159-start-waits branch October 18, 2026 02:25
mottihoresh added a commit that referenced this pull request Oct 18, 2026
…s, paused log keeps rows, can state reads ok (#167)

The four parked items kept from the fix track (#135), prioritized
2026-10-18. Item PRs squash-merged into `fix/parked`:
- #163 — a healthy CAN state reads "OK" instead of "error-active".
- #164 — Connection › Connected nodes says "N new board(s) on the bus —
add it/them from the Cockpit." when boards are on the bus but none is in
your cockpit, instead of "No nodes reported".
- #165 — Start with no Gateway (Bridge, or Replay driving the board)
starts and waits for the board with the waiting reason shown, instead of
being silently refused; delivery begins when the Gateway connects.
- #166 — Log › Stream holds rows that arrive while paused and shows them
on Resume (within the row cap), like Events.

Closes #159
Closes #160
Closes #161
Closes #162

BEGIN_COMMIT_OVERRIDE
fix(nodes): healthy CAN state reads "OK" instead of error-active
fix(nodes): connected nodes points to new boards on the bus instead of
saying none are reported
fix(dcs): start with no gateway starts and waits for the board instead
of being refused
fix(log): the stream keeps rows that arrive while paused and shows them
on resume
END_COMMIT_OVERRIDE
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