Repository navigation
Conversation
The connection panel shows what happened on a connection as sentences (connected, handshake, pairing established, relayed messages, peers seen, certificate changes) derived from the session's state changes and frames, with the raw frame log behind a toggle. Health is measured without a button press: a ping probes the node when the connection comes up and on an interval, each pong becoming a sample in an RTT sparkline and each unanswered probe a recorded loss; a node that never answers is left alone. A dropped connection shows when the next attempt is due and how many remain, from the same reconnect policy the session uses, and the directory shows when each peer was last seen.
…aced double hyphen
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # ts/packages/web-console/src/components/ConnectionPanel.tsx # ts/packages/web-console/src/hooks/use-certificate-trust.ts
A ping given up on at its timeout and a ping cut short by a dropped connection both rejected with a plain Error, so a caller counting unanswered pings could only tell them apart by message text.
… short by a dropped connection
# Conflicts: # ts/packages/web-console/test/App.unit.test.tsx
…e stale-prompt test
…hout dash separators
Member
Author
|
These commits landed in main as part of #316, which carried the whole console stack as one branch so it needed a single CI cycle against a moving main. |
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.
Stacked on #306 (base is
feat/console-trust, so CI does not run for this PR; verification was local).The connection panel now tells a person what happened instead of only printing frames.
activity.tsturns the session's state changes and frames into sentences (connecting, connected, handshake negotiated or unanswered, connection lost and each failed retry, pairing established, relayed messages to or from a peer, peers seen in gossip, node closed the connection), with peers named through the naming convention from #305. A certificate change announced by that connection's node (#306) is merged into the same log. The raw frame log is still there behind a "Show raw frames" switch. The session's event stream has a single reader, so the activity is accumulated insideuseMeshSessionEventsfrom the same events, which now takes the clock and returns the event, the activity and when the status last changed.Health no longer needs the ping button.
useConnectionHealthsends a measured ping when the connection comes up and every 15 s after, records each pong as a sample for the sparkline and each unanswered probe as a loss tick, and stops probing a node whose first probe got no pong, because only relay hubs answer pings and probing a plain peer would only fill its frame log; a manual "Send ping" (now also measured) revives it if the node does answer. A probe that failed only because the connection dropped is not counted as a loss. While reconnecting, the panel says when the next attempt is due and how many remain, computed from the samereconnectPolicythe session uses (moved out ofApp.tsxintoreconnect-policy.tsso both read one definition). The directory's raw snapshot column is now "last seen", a relative time from the peer's advertised snapshot, so it follows the peer's own clock; its tooltip says so.Two behaviours worth knowing. A dismissed certificate change alert stays in the connection's activity: only the alert is hidden, the record is kept. The health hook takes an optional probe timing argument so its tests can run with real, tiny intervals, because faking timers fought with React's scheduler in jsdom.
The reconnect Playwright specs count handshakes in the raw frame log, so they now switch it on first (a later commit on this branch), and the unresponsive-node unit test no longer depends on interval timing, which made it flaky under load. They could only be run at the top of the stack, where they pass.
Fixes #297