Repository navigation
fix(web): removing a secret provider lists the Simlock tokens that read from it - #31754
MarcoDotIO wants to merge 1 commit into
Conversation
…ad from it The Remove dialog lists every setting that reads from the secret provider, since removing it unsets them. A Simlock agent token can name a secret provider, and the server unsets it on removal, but the list skipped Simlock hosts, so the dialog could say nothing reads from the provider and then silently clear the token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The removal confirmation now lists Simlock token references alongside other secret-provider dependencies. This only expands the warning display; it does not expose token values or change how removal works. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
Removing a secret provider in Settings → Secrets opens a confirmation that lists every setting reading from that provider, because removal unsets them. Since #31652 a Simlock host's agent token can come from a secret provider, and on removal the server unsets it (
withoutRemovedSecretProviderReferencesinapps/server/src/settingsSecrets.tscoverssimlockDeviceHoststhroughmapSettingsSecretValues). The dialog's list (secretProviderUsesinapps/web/src/components/settings/SecretsSettings.logic.ts, added in #31651, which merged alongside #31652) never looked atsimlockDeviceHosts. So if a Simlock token was the only thing using a provider, the dialog said "Nothing reads from …" and removal then cleared the token without warning. If other settings also used the provider, the Simlock token was left out of the list.Repro: turn on Simlock in Labs, add a Simlock host whose agent token comes from a 1Password provider, then click Remove on that provider in Settings → Secrets.
Change
secretProviderUsesnow lists Simlock hosts the same way it lists EAS hosts (<host label> · Agent Token). The server's other lists of secret references (invalidateSettingsSecrets,mapSecretFieldGroups) already include Simlock hosts. This list was the only one that didn't.Scope and approval
This is a small fix for an obvious gap: two PRs merged the same day, and the list one added didn't pick up the field the other one made referenceable. One function and its existing test change. No new behaviour. The dialog now lists everything the server already unsets.
This changes what the Remove dialog shows: one extra row when a Simlock token uses the provider.
Verification
Extended the existing
SecretsSettings.logic.test.tsfixture with a Simlock host whose agent token reads from thepersonalprovider.Before the fix (on
upstream/main):After:
vp lintandvp fmt --checkonapps/web/src/components/settingspass.effect-tsgo tsrs --noEmitinapps/webreports 0 errors.Real client: web dev server (with
T3CODE_FEATURE_SECRETS=1) on empty state, with a 1Password provider "Personal 1Password" and Labs Simlock on, and a Simlock host "Simlock Pool" whose agent token readsop://Shared/simlock/tokenfrom that provider. Nothing else uses the provider. Settings → Secrets → Remove:main)Not checked: desktop as a separate app (same web component). Mobile has no Remove-provider dialog.
Claude Opus 5.5 (Claude Code desktop app)
🤖 Generated with Claude Code