Skip to content

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

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

Settings → Sign-in tells people that connecting a network sign-in provider such as Tailscale means they sign in with it "instead of your password". After Silo-Server/silo-server#2017, that is no longer true: connecting Tailscale keeps the account's Silo password, and the person can sign in either way. Anyone connecting Tailscale from the phone app on such a server would read that they are giving up their password when they are not.

Approach

The network-provider copy now depends on network_link_keeps_password, a field Silo-Server/silo-server#2017 adds to getExternalSignInCapabilities. The shared capabilities model reads it as networkLinkKeepsPassword, which is false when the field is absent or network sign-in isn't served. Older servers still turn the password off on a network link and report the same network_sign_in, so they keep the original text.

When the server reports the field as true:

  • Connect row: "After connecting, you sign in with Tailscale instead of your password. You'll confirm your password first." → "After connecting, you can sign in with Tailscale or your password. You'll confirm your password first."
  • Password prompt: "Enter this account's password to connect … After connecting, you sign in with Tailscale instead of your password." → "Enter this account's password to connect … You can then sign in with Tailscale or your password."

The Connect row for a network provider used the same description as OAuth providers, so it now has its own. OAuth and directory (LDAP) copy stays as it is, because connecting those still replaces the password. Link behavior is unchanged. The TV app has no Sign-in settings section, and no other phone, TV, or shared text says connecting a network provider turns the password off.

Validation

  • ./gradlew :androidApp:testDebugUnitTest for the settings tests: passed. They cover both copy branches and that the section carries the capability only when a network provider is offered.
  • ./gradlew :shared:testDebugUnitTest for ApiV2ContractTest and ExternalSignInApiTest: passed. A new contract test decodes network_link_keeps_password as true when present, false when absent, and false when network_sign_in is false.
  • The vendored capabilities fixture isn't re-synced yet; the decode test adds and removes the field on the current fixture. Re-sync after fix(auth): keep the password when an account connects Tailscale silo-server#2017 merges.

Evidence

Copy change on the phone app's Settings → Sign-in section. On a server that reports network_link_keeps_password, the "Connect Tailscale" row description and the password dialog that opens from it say the person can sign in with Tailscale or their password. On other servers, and for the OAuth and directory rows and dialogs, the text reads as before.

Risks

None identified for release order: the new text appears only on servers that report the capability, so this can ship before or after Silo-Server/silo-server#2017.

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, Gradle
  • Model(s): claude-opus-5-5[1m]
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Show that connecting Tailscale keeps the Silo password in sign-in settings

The sign-in network-provider row in SignInSection.kt now builds its description from the provider name and a server capability flag. When the server reports the account password is retained, the UI says either the network provider or the account password can be used; otherwise it keeps the old replacement-password wording. The confirmation dialog uses the same capability.

Macroscope summarized 2bb6c69.

Settings -> Sign-in told people that connecting a network sign-in
provider such as Tailscale means signing in with it instead of their
password. The server now keeps the account's password when a network
identity is connected, so the Connect row and the password prompt for a
network provider say the person can sign in with the provider or their
password. OAuth and directory copy is unchanged.

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 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:59.028046Z 2bb6c69 New commits
🔒 Security Review ✅ Completed 2026-10-06T21:15:54.630453Z 2bb6c69 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.

@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: db427c66-28c4-47b0-9a95-a9115a162db0
📥 Commits

Reviewing files that changed from the base of the PR and between 9343dde and 2bb6c69.

📒 Files selected for processing (6)
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SignInSection.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SignInSettingsViewModel.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/settings/SignInSettingsTest.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/auth/ExternalSignInModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/api/ExternalSignInApi.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/network/apiv2/ApiV2ContractTest.kt

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 shared sign-in capability model and API mapping now include whether a network identity link keeps the account password. Android settings carry that value into the network-provider description and prompt.

Changes

Network Sign-In Messaging

Layer / File(s) Summary
Password-retention capability contract
shared/src/commonMain/kotlin/org/siloserver/silo/model/auth/ExternalSignInModels.kt, shared/src/commonMain/kotlin/org/siloserver/silo/network/api/ExternalSignInApi.kt, shared/src/commonTest/kotlin/org/siloserver/silo/network/apiv2/ApiV2ContractTest.kt
The capability model adds a default-false password-retention field. The API maps the response field only when network sign-in is available and enabled. Contract tests cover supplied, absent, and disabled values.
Network sign-in descriptions and prompts
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SignInSettingsViewModel.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SignInSection.kt, androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/settings/SignInSettingsTest.kt
The settings state carries the capability when a network provider is available and resets it when no account scope is available. Network descriptions and prompts use the value to select their wording. Tests cover both capability values.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 2bb6c

This change updates the network sign-in wording only when the server reports that linking keeps the password. Older servers keep the original wording. I found no merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 6 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 describes the main user-facing change: sign-in settings now explain that connecting Tailscale can keep the Silo password.
Description check ✅ Passed The description explains the problem, capability-based copy changes, compatibility behavior, and validation. It is directly related to the changeset.
  • 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 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: 8944c1d60c

ℹ️ 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".


/** "Connect <provider>" for a network provider: the account keeps its password. */
fun connectNetworkDescription(providerName: String): String =
"After connecting, you can sign in with $providerName or your password. You'll confirm your password first."

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

When the app connects to a server release predating Silo-Server #2017 but already advertising network_sign_in, this promises that the password remains usable even though that server disables it after linking. ExternalSignInCapabilitiesV2 exposes only the existing networkSignIn Boolean and no indication of the new password behavior, so old and new servers follow the same UI path. Gate this promise on a new capability or use wording that is accurate for both behaviors; otherwise users can unexpectedly lose password access.

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 2bb6c69. The shared external sign-in capabilities now read network_link_keeps_password (added to getExternalSignInCapabilities by Silo-Server/silo-server#2017), defaulting to false when the field is absent or network sign-in isn't served. The network Connect row and password prompt say the password stays only when the server reports it; older servers keep the original "instead of your password" text.

Comment on lines +120 to +123
assertTrue(SignInSettingsViewModel.connectNetworkPrompt("Tailscale", null).contains("sign in with Tailscale or your password"))
assertFalse(SignInSettingsViewModel.connectNetworkPrompt("Tailscale", null).contains("instead of your password"))
assertTrue(SignInSettingsViewModel.connectNetworkDescription("Tailscale").contains("sign in with Tailscale or your password"))
assertFalse(SignInSettingsViewModel.connectNetworkDescription("Tailscale").contains("instead of your password"))

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 Remove the copy-only unit assertions

This is a small UI-copy change, but it adds four assertions that lock in fragments of the displayed prose. The repository explicitly says not to add tests for small or UI changes unless requested, so these assertions should be removed unless they were specifically required.

AGENTS.md reference: AGENTS.md:L29-L29

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.

Agreed. AGENTS.md says: "Do not add tests for small changes or UI changes unless requested. For shared logic changes, add focused tests only for critical or high-risk behavior." 2bb6c69 removes the assertions that pinned the new sentences. What's left covers behavior that was requested for the capability gating: the network copy says the password is replaced when network_link_keeps_password is false and doesn't when it's true, sectionOf carries the capability, and a contract test checks that the field decodes as true when present and false when absent or when network sign-in isn't served.

…assword off

Servers before the network_link_keeps_password capability still turn the
account's password off when a network identity is connected, and they
report the same network_sign_in capability. The shared external sign-in
capabilities now read network_link_keeps_password (false when absent or
when network sign-in isn't served), and the Connect row and password
prompt for a network provider say the password stays only when the
server reports it. Other servers get the original text.

The tests now cover that gating and the capability's decode default
instead of pinning the new sentences.

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: 2bb6c69700

ℹ️ 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".

val identities: Boolean = false,
@SerialName("credentials_linking") val credentialsLinking: Boolean = false,
@SerialName("network_sign_in") val networkSignIn: Boolean = false,
@SerialName("network_link_keeps_password") val networkLinkKeepsPassword: Boolean = false,

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 Add the server capability before gating the new copy

The companion server change Silo-Server/silo-server#2017 does not add network_link_keeps_password to the external-sign-in capability response, so its responses omit this member and deserialize to the default false; consequently, even against the new server, both network-link strings retain the old “instead of your password” wording and the intended fix never appears. Fresh evidence in this revision is the newly added decoder field, while the referenced server change updates the linking behavior and API descriptions but does not advertise that field; add the capability to the server contract/fixture or use a signal the server actually provides.

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 975df0d into main Oct 7, 2026
6 checks passed
@Quick104
Quick104 deleted the fix/tailscale-connect-keeps-password branch October 7, 2026 01:26
Quick104 added a commit that referenced this pull request Oct 7, 2026
Brings in #487, #492, #493, #495 and #496. Only #495 (server quality
menu) overlapped the restyle:

- Phone: the Quality pill opens the plan's quality menu whenever a plan
  exists. The file picker becomes the Version menu, reached from the
  settings menu, which gains a Version row. Both use the new player menu
  chrome, so the Quality menu docks on the right in landscape like the
  other player menus.
- TV: the options panel keeps the restyled layout and takes #495's
  Quality row (Auto first, bitrates as the row's trailing value).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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