Repository navigation
Conversation
…sal (#181) The computer's hello carries the account session when signed in. After the Relay refuses with signed_out or plan (close 4006 or 4007, at hello or on its hourly check), the daemon doesn't try it again until the account signs in or out or a read of the account finds the Paid plan; unavailable (close 1013) backs off like any refusal. /v1/status reports why as device.relay_refused, and both Apps' Device tab says "Sign in to use the Relay.", "The Relay needs the Paid plan." or that it can't check the account right now, while the box is away. docs/relay-protocol.md describes the session, the three refusals and what the daemon does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Closes #181. Part of second-state/vibebuddy-cloud#16 (ADR-0020, #179).
Based on
claude/plan-ui(#188, itself on #178): it uses the plan the daemon reads in #188. Retarget once those merge.What changes
Daemon.
relay.rs: the computer'shellocarries"session"when signed in (outside the signature).signed_outandplan, as an error at hello or as close 4006/4007, are a newRelayError::Account; close 1013 reads asRefused("unavailable").signed_outorplanthe daemon doesn't try the Relay again until the account changes. The account has a counter (relay_chance) that goes up on signing in or out and on each read of the account (sign-in,POST /v1/account/refresh) that finds the Paid plan. A refusal records the counter, andRelayConfig::waits_for_accountholds while it hasn't moved; the serial worker skips the Relay meanwhile. A read that still finds Free doesn't count.unavailablebacks off as any refusal does now (60 s, doubling to 5 min)./v1/statusgainsdevice.relay_refused(signed_out|plan|unavailable) while the refusal holds, and the status stream pushes when it changes.main, so the Relay can read its session.Apps (Mac and Linux). While the box is away, the Device tab's link section says "Sign in to use the Relay.", "The Relay needs the Paid plan.", or "The Relay can't check the account right now. VibeBuddy tries again later." Strings are in the shared zh-Hans table.
Docs. docs/relay-protocol.md covers hello's
session, the three refusals with their close codes and the hourly check, and what the daemon does after each. docs/app.md covers the Device tab text.Checked
cargo test --workspace: all pass. New relay tests run against a fake Relay that checks plans:planit waits, a read that finds Free changes nothing, and a read that finds Paid lets the next try link: two connections in all;signed_outwaits until sign-out;unavailabledoesn't wait and backs off ≥ 60 s;There's also a Linux status test for the wording.
cargo clippy --all-targets --workspace: no warnings in the touched files.swift build --package-path appandswift run --package-path app SelfTestpass, with arelay_refuseddecoding check.python3 tools/check-localization.py: ok, 335 keys.Not checked
waits_for_account) and by counting the fake Relay's connections, not by running the serial worker. Its loop scans real serial ports, so it isn't run in tests. The worker change is one condition and one match arm.🤖 Generated with Claude Code