Repository navigation
feat: report the state changes worth interrupting a user for - #40
Merged
Merged
Conversation
The desktop app decides whether to raise a system notification, so what it needs from core is state transitions, each reported once and again when it recovers. Three signals were missing, and the reason they were missing is the same in every case: nothing in core was in a position to notice. - ProxyChanged: a request that cannot connect through a named proxy now checks that proxy once (the L1 handshake, not a poll), and a failure is reported against the proxy rather than against every upstream behind it. Re-checks are spaced 30s apart and a success through the proxy reports that it is back. - AuthChanged: a 401 or 403 from an upstream is not a failure for the circuit breaker (retrying elsewhere would be rejected too), so a stale key never trips it and never reaches the user. It is reported on the transition, and again when the upstream accepts the credential. - StorageChanged: the disk level already changed the recorder's behaviour and only wrote a log. A request with no body is otherwise indistinguishable from a bug. ConfigRejected now carries the origin, so the interface can tell a typo in the user's editor from a write it just made itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for the PR. One thing before review: this targets
No need to close and reopen: click Edit next to the PR title and change the base branch to See CONTRIBUTING.md and CONTRIBUTING.md for the branch contract. |
Merged
fylorn
added a commit
that referenced
this pull request
Sep 17, 2026
The state changes worth interrupting a user for (#40): a dead proxy, an upstream that rejects the credential, and the disk level. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
3 tasks done
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.
Summary
Groundwork for desktop notifications. The desktop app decides whether to raise one, so what it needs from core is state transitions — reported once when they happen, and again when they recover. Three were missing, and for the same reason each time: nothing in core was in a position to notice.
ProxyChangedAuthChangedStorageChangedConfigRejectedalso carriesoriginnow, so the interface can tell a typo in the user's editor from a write it just made itself — the second one is a failed save, and that path reports itself.Notes
Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --no-fail-fasttw-gateway/tests/notices.rs: an upstream that rejects the credential is reported once and again on recovery; a proxy that drops connections is named as the cause and reported again when it comes back (a fake proxy that speaks both absolute-form and CONNECT, so the same process serves forwarding and the check)tw-store: a level change is announced once, not repeated within a level, and announced again on the way backtw-control: the rejection carriesexternalwhen the file was edited outside the app./scripts/smoke.sh: 48 passed, 0 failed🤖 Generated with Claude Code