Repository navigation
fix(settings): say connecting Tailscale keeps the Silo password - #663
Conversation
The Connect sheet for a network sign-in provider said that after connecting, you sign in with the provider instead of your password. The server now keeps the password when a network identity is connected, so the sheet says you can sign in with either, and still notes that provider sign-in works only at the provider's address. OIDC and LDAP copy is unchanged because those links still replace the password. Two code comments that gave "linking turns password sign-in off" as the reason for hiding unusable network providers now give the reason that still holds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe iOS app now reads the server’s network-link password-retention capability and tracks it in the account sign-in model. The Connect sheet displays connection notes based on provider type and whether the server reports that password sign-in remains available. ChangesNetwork sign-in
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The Connect sheet preserves the earlier wording unless the server reports that password sign-in remains available. No issue identified here prevents merging after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da46902e4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if item.method == .network { | ||
| let who = item.provider.networkIdentity?.name.map { "\($0), " } ?? "" | ||
| return "Enter your Silo password to confirm. This connects \(who)the \(item.name) account this device belongs to. After connecting, you sign in with \(item.name) instead of your password, and only when you open this server at its \(item.name) address." | ||
| return "Enter your Silo password to confirm. This connects \(who)the \(item.name) account this device belongs to. You can then sign in with \(item.name) or your password. \(item.name) sign-in works only when you open this server at its \(item.name) address." |
There was a problem hiding this comment.
Gate the retained-password promise by server capability
On servers predating Silo-Server#2017, connecting a network identity still disables password sign-in, but those servers expose the same network_sign_in capability that makes this sheet available; the current capability model has no field that distinguishes the new behavior. A newer client connected to such a server therefore explicitly assures users they can keep using their password immediately before disabling it, potentially leaving them unable to sign in outside the provider network. Keep the copy neutral or gate this promise on a versioned server capability.
AGENTS.md reference: AGENTS.md:L19-L22
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 0f4e3e1: the new copy now shows only when the server reports network_link_keeps_password (added by Silo-Server/silo-server#2017); other servers keep the old text.
…assword Servers without network_link_keeps_password still turn local password sign-in off when a network identity is linked, and they report the same network_sign_in capability. The Connect sheet now reads the new external sign-in capability and says the password stays only when the server reports it; otherwise it shows the earlier text. The footer copy moves into AccountSignInModel.connectFooter so a test covers both network branches and the capability's decoding. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f4e3e1ad6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var supportsIdentities: Bool { state == "available" && identities == true } | ||
| var supportsCredentialsLinking: Bool { state == "available" && credentialsLinking == true } | ||
| var supportsNetworkSignIn: Bool { state == "available" && networkSignIn == true } | ||
| var keepsPasswordOnNetworkLink: Bool { supportsNetworkSignIn && networkLinkKeepsPassword == true } |
There was a problem hiding this comment.
Gate copy on a capability the server actually publishes
The companion server PR #2017 does not add network_link_keeps_password to the external-sign-in capability response, so production decoding leaves this value nil and keepsPasswordOnNetworkLink remains false even after the server starts preserving passwords. Consequently, the sheet continues telling users that connecting Tailscale disables their password, and the new true branch is only exercised by a test that injects a field no server sends. Fresh evidence beyond the earlier comment is the companion server PR's API diff: coordinate a server capability there or gate on a signal it already publishes.
AGENTS.md reference: AGENTS.md:L19-L22
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is out of date. Silo-Server/silo-server#2017 adds network_link_keeps_password to getExternalSignInCapabilities in 6ea2e6fb5. internal/apiv2/external_sign_in.go declares the field and sets it to true whenever identities are available, and the committed OpenAPI spec and the get_external_sign_in_capabilities_ok.json fixture both include it. Servers with #2017 send true, so the new text shows there; older servers omit it and keep the old text.
Problem
Related issue: Silo-Server/silo-server#2017
Validation tasks: none
On iOS and macOS, the Connect sheet for a network sign-in provider (Tailscale) in Settings → Sign-in tells people that after connecting they sign in with Tailscale instead of their password. Silo-Server/silo-server#2017 changes the server so connecting a network identity keeps the Silo password. On those servers the sheet describes the wrong outcome and may put people off connecting Tailscale for fear of losing their password.
Approach
The sheet now reads
network_link_keeps_password, a field that Silo-Server/silo-server#2017 adds to the external sign-in capabilities (getExternalSignInCapabilities). When the server reports it as true, the network footer says the person can sign in with Tailscale or their password, and keeps the note that Tailscale sign-in works only at the server's Tailscale address. When the field is false or absent, the sheet keeps the old text. Older servers still turn the password off on a network link while reporting the samenetwork_sign_incapability, so only this field can tell the two apart.The OIDC and LDAP footers are unchanged, because connecting those providers still replaces the password. The footer copy moved from the view into
AccountSignInModel.connectFooterso a unit test can check it. The disconnect and "only way to sign in" messages are generic and stay correct, so they are unchanged.Two code comments gave "linking turns password sign-in off" as the reason the app hides network providers the login screen can't use. They now give the reason that still holds: such a connection would not let you sign in from this app.
tvOS has no Connect sheet. Android likely needs the same change; that is not part of this PR.
Validation
network_link_keeps_password(true, and absent meaning false), checks that the field counts only whilenetwork_sign_inis served, and checks both network footer texts.Evidence
Copy change only, in the Connect sheet footer for a network provider (iOS and macOS Settings → Sign-in → Connect Tailscale):
network_link_keeps_password: true, new text: "Enter your Silo password to confirm. This connects <name>, the Tailscale account this device belongs to. You can then sign in with Tailscale or your password. Tailscale sign-in works only when you open this server at its Tailscale address."Risks
None identified. The new text appears only when the server reports the new field, so this can merge before or after Silo-Server/silo-server#2017. If that PR renames the field before it merges, this app would keep showing the old text until it is updated.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Fix Settings Connect sheet to say when Tailscale keeps the Silo password
APIv2ExternalSignInCapabilities, exposed as true only when external sign-in is available and the server explicitly reports keeping the local password.AccountSignInModel.loadstores this state, defaulting to false for older servers or when external sign-in identities are unsupported.ConnectProviderSheet.footerto the sharedAccountSignInModel.connectFooterhelper, which picks the network-link wording based on the server's answer.Macroscope summarized 0f4e3e1.