Skip to content

fix(settings): say connecting Tailscale keeps the Silo password - #663

Merged
Quick104 merged 2 commits into
mainfrom
fix/tailscale-connect-keeps-password
Oct 7, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/tailscale-connect-keeps-password

Conversation

@Quick104

@Quick104 Quick104 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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 same network_sign_in capability, 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.connectFooter so 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

  • Not built or run locally: this was prepared on Linux without Xcode. CI is the build and test check.
  • Added a unit test. It covers decoding of network_link_keeps_password (true, and absent meaning false), checks that the field counts only while network_sign_in is served, and checks both network footer texts.
  • Searched the app and tests for copy that says or implies connecting a network provider replaces the password. The network footer was the only user-facing string.

Evidence

Copy change only, in the Connect sheet footer for a network provider (iOS and macOS Settings → Sign-in → Connect Tailscale):

  • Server reports 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."
  • Any other server, text unchanged: "Enter your Silo password to confirm. This connects <name>, the Tailscale account this device belongs to. After connecting, you sign in with Tailscale instead of your password, and 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

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, git, gh
  • Model(s): claude-opus-5-5[1m]
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Fix Settings Connect sheet to say when Tailscale keeps the Silo password

  • Adds decoding of the optional network-link password capability in APIv2ExternalSignInCapabilities, exposed as true only when external sign-in is available and the server explicitly reports keeping the local password.
  • AccountSignInModel.load stores this state, defaulting to false for older servers or when external sign-in identities are unsupported.
  • Moves Connect sheet footer formatting from the inline ConnectProviderSheet.footer to the shared AccountSignInModel.connectFooter helper, which picks the network-link wording based on the server's answer.
  • Adds tests in NetworkSignInTests.swift covering both footer variants and capability decoding.
  • Behavioral Change: servers that keep the password after a network link now show different Connect sheet footer text; the connectable provider selection logic itself is unchanged.

Macroscope summarized 0f4e3e1.

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

silo-kody Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b2a8572c-4a15-426d-b9b1-377796029c00
📥 Commits

Reviewing files that changed from the base of the PR and between 4cead0c and 0f4e3e1.

📒 Files selected for processing (4)
  • iosApp/Tests/NetworkSignInTests.swift
  • iosApp/iosApp/Networking/APIv2/APIv2ExternalSignInModels.swift
  • iosApp/iosApp/Screens/Settings/AccountSignInModel.swift
  • iosApp/iosApp/Screens/Settings/AccountSignInView.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Network sign-in

Layer / File(s) Summary
Capability and account state
iosApp/iosApp/Networking/APIv2/APIv2ExternalSignInModels.swift, iosApp/iosApp/Screens/Settings/AccountSignInModel.swift, iosApp/Tests/NetworkSignInTests.swift
The capability model exposes whether network sign-in retains the password. The account model loads this value and resets it when capabilities are unavailable. Network-provider eligibility still requires network linking and a supported provider path.
Connection footer
iosApp/iosApp/Screens/Settings/AccountSignInModel.swift, iosApp/iosApp/Screens/Settings/AccountSignInView.swift, iosApp/Tests/NetworkSignInTests.swift
The account model selects footer text by provider type and password-retention setting. The Connect sheet uses that text. Tests check capability values and the two network-provider footer outcomes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 0f4e3

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the Settings copy change and the password-retention behavior for Tailscale.
Description check ✅ Passed The description explains the capability-based footer wording, compatibility behavior, tests, and scope of the changes.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T21:15:02.617481Z 0f4e3e1 New commits
🔒 Security Review ✅ Completed 2026-10-06T21:14:25.306167Z 0f4e3e1 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

silo-kody Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Quick104
Quick104 merged commit 35360f8 into main Oct 7, 2026
6 checks passed
@Quick104
Quick104 deleted the fix/tailscale-connect-keeps-password branch October 7, 2026 01:26
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