Skip to content

fix(watch-providers): say which action failed and why, in the viewer's language - #4189

Merged
Quick104 merged 9 commits into
mainfrom
fix/accurate-localized-error-toasts
Nov 14, 2026
Merged

Quick104 merged 9 commits into
mainfrom
fix/accurate-localized-error-toasts

Conversation

@Quick104

@Quick104 Quick104 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: Apple N/A (no watch-provider settings); Android N/A (no watch-provider settings); Roku N/A (no watch-provider settings)

When connecting, syncing, saving, or disconnecting a watch provider (Simkl, MDBList) fails, the web toast shows only the raw failure text. It never says which action failed, and the text is often unreadable or untranslated:

  • A timeout, a dropped connection, or a proxy error page shows the request's English developer message, such as triggerWatchProviderSync: the server did not respond within 30 s, in every language.
  • Selecting I've entered it before approving the code on the provider's site shows watch sync plugin device authorization is pending in English. Every other language shows "That conflicts with something that already exists or just changed."
  • An expired code shows auth session has expired in English, with the same generic conflict line in other languages. A plugin that reports the code expired or was declined gets a 500 and "Watch-provider operation failed."
  • Selecting I've entered it again after a success whose answer was lost shows auth session is already completed, and the card stays "not connected" until a reload.

Each failure toast now names the action as its title ("Failed to start sync", in the viewer's language) and gives the reason below it, also in the viewer's language.

A community report showed "No operation is registered at this path." after Sync now inside the roughly hourly manual-sync limit. That is the API router's answer for an unknown path. I couldn't reproduce it. On this branch and on main, Sync now inside the limit answers 429, and the page shows "Sync available in 18m". This PR doesn't explain that report. It does mean such a failure would read "Failed to start sync" with the reason below, not a bare router message.

Approach

  • Web (watchProviders.ts): each of the six failure toasts uses its existing action key as the title, with the reason as the description. A problem's text is already localized by the v2 client. A timeout, failed fetch, or failed sign-in refresh reads "The server isn't responding. Try again in a moment.", and a response that isn't a problem document reads the shared internal-error line. Errors whose message is developer text get no description rather than leaking it. The Sync now cooldown toast is unchanged.

  • Web, finishing a device-code connection: a code not approved yet and a declined connection get their own lines. After an expired, used, declined, or unknown code (410, 403, 404), the card clears the code so it offers Connect again; a code not approved yet stays. The shared conflict and not_permitted texts were written for other flows and would read "That conflicts with…" and "That isn't allowed."

  • Server (device-code poll): a code not yet approved stays conflict, with an English detail a person can act on. An expired code, or a used one whose connection is gone, is device_login_expired (410). Declined is not_permitted. Polling a session that already completed returns the connection again, so a retry after a lost answer succeeds. The plugin adapter maps a plugin's EXPIRED and DENIED answers to the same outcomes. A failure to save the provider's pending challenge now reads as a server error, not as "not approved yet". The poll operation now declares 410. No other client calls these endpoints.

  • Catalog: two new keys, for the not-approved and declined lines, from feat(catalog): add the web watch-provider lines for an unapproved or declined connection silo-translations#32 (merged), synced from release 2026.11.14-295ae4b. That release also carries five keys from [codex] keep plugin auto-provision passwords bcrypt-safe #33 that nothing here uses yet.

  • Contract gate: removes the six updateDownloadSubscription breaking-change approvals from fix(apiv2): stop documenting the monitor patch fields as nullable #3535, which already merged. Against the current base they match no change, so the gate failed on them. The new 410 on the poll counts as an info-level change and needs no approval.

Validation

  • Live, on a Silo dev deployment with the Simkl plugin installed: Sync now after the connection disappeared server-side. Before, English showed only the server detail and German only "Das wurde nicht gefunden…". After, the toast reads "Failed to start sync" / "Synchronisierung konnte nicht gestartet werden" with the reason below.
  • Live, API: polling an expired session returns 410 device_login_expired. Polling a completed session returns 200 with the connection. Sync now inside the limit still returns 429 with Retry-After, and the page still shows the cooldown.
  • The Go tests for the poll outcomes and the completed-session retry, and the web sync-timeout toast test, fail on main and pass here. The web poll-outcome tests fail on main only because their catalog keys are missing there.
  • A component test, not committed, rejected the poll with 409, 410, 403, and 404. Before the review fix, the code stayed on the card after 410, 403, and 404. After it, only 409 keeps the code.
  • Not checked live: a plugin's DENIED answer (needs a real provider sign-in); a Go test covers its mapping.
  • go test ./internal/apiv2/... ./internal/watchsync/, make lint-changed, make verify-apiv2-openapi, make verify-apiv2-web-types, web typecheck, eslint, and prettier pass.
  • Not reproduced: the router-level 404 from the report.

Evidence: https://evidence.siloserver.org/r/silo-server/watch-provider-toasts/

Risks

Poll answers change: an expired code goes from 409 to 410, a completed session from 409 to 200 (or 410 when its connection is gone), and a plugin's expired or declined answer from 500 to 410 or 403. The web is the only caller. A timeout, failed fetch, or any other TypeError reads "The server isn't responding", so a client-side bug that throws TypeError would read the same. Before, it showed the raw English message.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code; Codex CLI (plan review); silo-translations make translate
  • Model(s): claude-opus-5-5 (implementation, plan cut, code review); gpt-6.1-sol (plan attack); claude-sonnet-5-5 (code-review cleanup finder and validation check)
  • Involvement: Fully AI-generated, human verified (maintainer verification pending)
  • Adversarial review: Plan round before implementing: gpt-6.1-sol (attack) and claude-opus-5-5 (cut). Opus dropped a new "unreachable" key and a shared helper. Sol's findings added the completed/pending split, separate wording for malformed responses, handling for a failed sign-in refresh, and the plugin EXPIRED/DENIED mapping. Code review at high (three finders, validation check, claude-opus-5-5 and claude-sonnet-5-5) added the completed-session retry, the declined line, and the pending-save failure. Simplify ran on both commits. Background review (gpt-6.1-sol, reviewed 1d2ffd9) found nothing beyond Kody's finding that a failed connection read on a repeated poll was reported as an expired code. That's fixed in 1de3403.

🤖 Generated with Claude Code

Note

Improve watch-provider failure toasts with distinct, translated reasons

  • Watch-provider mutation failures now show a toast with the action name as the title and a translated reason as the description, via a shared toastFailure helper in watchProviders.ts. Poll failures get dedicated reasons for pending (conflict) and denied (not_permitted) authorization problems.
  • The API maps pending, expired/completed, and denied device authorization to distinct problem types in watchProviderProblem, and documents a new 410 Gone response in the poll contract. Retrying a completed poll returns the connected connection when it exists.
  • Adds new sentinel errors ErrDeviceAuthDenied and ErrAuthSessionExpired in types.go so the plugin adapter and service return distinguishable outcomes.
  • Adds toast translations for declined and not-yet-approved authorization across all locales, and updates the settings card to clear the authorization session on success or 403/404/410 poll responses.
  • Behavioral Change: pending, expired, completed, and denied authorization errors no longer expose raw provider error messages; unrecognized failures show no reason text. Also, persistence failures during a pending-auth update are no longer treated as pending results.

Macroscope summarized 61754e4.

Quick104 and others added 2 commits November 14, 2026 15:48
…s language

Watch-provider toasts showed only the raw failure text: a request's English
developer message for a timeout, a failed fetch, or a proxy page, and the
generic conflict line in other languages when connecting before the code was
approved. Each failure now names the action as the toast title and explains it
below in the interface language.

The poll answer now tells its outcomes apart: an expired code is
device_login_expired (410), an authorization already completed is
already_linked, a declined one is not_permitted, and a code not approved yet
stays conflict with an English detail a person can act on. A plugin's EXPIRED
and DENIED answers map to the same outcomes instead of a 500.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…explain a declined one

Finishing a device authorization again after its first answer was lost now
returns the connection that answer created, instead of an error while the card
still shows "not connected". A used code with no connection left reads as
expired. A declined authorization gets its own line on the web rather than the
shared "That isn't allowed." text, and a failure to save the provider's pending
challenge reads as a server error rather than "approve the code first".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Nov 14, 2026
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2a0ec00-c4ab-4af8-b61a-356bca67301a
Commits

Reviewing files that changed from the base of the PR and between e7a8af5 and 61754e4.

Files selected for processing: 22

  • .silo-translations
  • contracts/api/v2/openapi.json
  • internal/apiv2/request_lifecycle.go
  • internal/apiv2/request_lifecycle_test.go
  • internal/watchsync/plugin_provider.go
  • internal/watchsync/service.go
  • internal/watchsync/types.go
  • web/src/api/v2/schema.ts
  • web/src/hooks/queries/watchProviders.test.ts
  • web/src/hooks/queries/watchProviders.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/de.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/fr.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/pt-BR.json
  • web/src/locales/zh-Hans.json
  • web/src/pages/settings/WatchProvidersSettings.tsx
Walkthrough

Device-authorization polling now distinguishes pending, denied, expired, and completed sessions. Completed sessions can return an existing connection. API contracts and frontend error handling were updated to reflect these outcomes, with localized messages for authorization errors.

Changes: Watch-provider authorization flow

Layer / File(s) Summary
Provider authorization outcomes
internal/watchsync/types.go, internal/watchsync/plugin_provider.go, internal/watchsync/service.go
Provider polling now wraps denied and expired outcomes with sentinel errors. A denial sentinel was added. Pending-session persistence failures return the persistence error alone.
Polling responses and API contract
internal/apiv2/request_lifecycle.go, internal/apiv2/request_lifecycle_test.go, contracts/api/v2/openapi.json, web/src/api/v2/schema.ts
The handler returns an existing connection for a completed session. Pending, expired, completed, and denied outcomes map to distinct problem responses. The API contracts and tests cover the updated behavior.
Translated watch-provider error handling
web/src/hooks/queries/watchProviders.ts, web/src/hooks/queries/watchProviders.test.ts, web/src/locales/*, web/src/locales/keys.ts, .silo-translations
Watch-provider mutations use shared translated failure handling. Polling errors distinguish pending approval and declined authorization. Tests and locale entries cover the messages. The translation generator identifier was updated.

Breaking-approval records

Layer / File(s) Summary
Clear breaking-approval records
contracts/api/v2/breaking-approvals.json
The six approval records for updateDownloadSubscription request-property nullability changes were removed.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant PollEndpoint as POST /api/v2/watch-providers/{provider}/auth/poll
  participant PollDeviceAuth
  participant ConnectionLookup
  Client->>PollEndpoint: Poll device authorization
  PollEndpoint->>PollDeviceAuth: Check authorization status
  PollDeviceAuth-->>PollEndpoint: Completed-session result
  PollEndpoint->>ConnectionLookup: Read existing connection
  ConnectionLookup-->>PollEndpoint: Connection status and data
  PollEndpoint-->>Client: Return connection or problem response
Loading

Suggested reviewers: rhainland, blurbery

Merge Risk: Low · previous review e7a8a

The change makes watch-provider failure toasts and device-authorization poll outcomes clearer and localized. Before merging, replace the local translation pin with a released catalog version that includes the two new message keys. Otherwise a later translation sync could remove them and break the web build.

Security architecture risk: Minimal · up to e7a8a

The authorization outcomes and retry behavior change, but the inspected changes preserve user, profile, and provider ownership checks. Completed-session retries read existing connection state rather than create or restore authorization. No introduced or worsened security or failure-containment issue was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new recovery branch does not expand access beyond the caller's existing user, profile, and provider scope. Supplying another scope's authorization-session identifier fails the ownership comparison before recovery, and the connection lookup uses the caller's scope rather than trusting session-supplied identity.

Trust Boundaries and Controls

  • observed — The six breaking-approval records are removed, but enforcement is not disabled. The unchanged policy rejects unapproved breaking changes and stale approvals; locked contracts reject breaking changes regardless of approvals. The inspected OpenAPI delta contains the poll description and added 410 response, not the unrelated nullable-field changes named by the removed approvals.

Resilience and Maintainability Implications

  • observed — A failed pending-session persistence no longer retains the pending-authorization error in its error chain. This prevents a storage failure from being reported as a normal approval-and-retry conflict. The web changes preserve the existing settings-precondition and sync-cooldown branches while replacing arbitrary developer-error text with categorized feedback.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change in the watch-provider failure toasts: the failed action is named and the reason is shown in the viewer's language. It matches the main change in the changeset (localized, ac…
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.
Description check Passed The description states the problem (watch-provider connect, sync, save, and disconnect toasts show raw English developer text and no action title), the approach across the web toast handling, locale k…
Full details: Title check

Explanation

The title names the change in the watch-provider failure toasts: the failed action is named and the reason is shown in the viewer's language. It matches the main change in the changeset (localized, action-specific failure toasts plus backend poll-outcome classification). It is a conventional-commit style title, 79 characters, and specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description states the problem (watch-provider connect, sync, save, and disconnect toasts show raw English developer text and no action title), the approach across the web toast handling, locale keys, and server device-code poll outcomes, the contract changes, validation steps, and risks. It is directly related to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T22:44:16.305030Z 61754e4 New commits
🔒 Security Review ✅ Completed 2026-11-14T22:46:20.377484Z 61754e4 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.

@silo-kody

silo-kody Bot commented Nov 14, 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 ❌

@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 14, 2026
Comment thread .silo-translations Resolved
Comment thread internal/apiv2/request_lifecycle.go Resolved
…d-error-toasts

# Conflicts:
#	.silo-translations
#	web/src/locales/keys.ts
@silo-triage silo-triage Bot added size/L 200–499 added + deleted lines (all files); change volume, not priority. and removed size/XL 500–999 added + deleted lines (all files); change volume, not priority. labels Nov 14, 2026

@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: a71c9c8dc0

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

Comment thread .silo-translations Resolved
…oll as a server error

A completed session's retry read the connection and treated any failure as an
expired code; a database or provider status failure now answers as itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 14, 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 ❌

The six updateDownloadSubscription entries were approved in #3535 and match no
change against the current base, so the contract gate fails every pull request
until they go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e47eb740-4457-4ec5-a0af-11e1933b6816
Commits

Reviewing files that changed from the base of the PR and between e36fc62 and e7a8af5.

Files selected for processing: 22

  • .silo-translations
  • contracts/api/v2/breaking-approvals.json
  • contracts/api/v2/openapi.json
  • internal/apiv2/request_lifecycle.go
  • internal/apiv2/request_lifecycle_test.go
  • internal/watchsync/plugin_provider.go
  • internal/watchsync/service.go
  • internal/watchsync/types.go
  • web/src/api/v2/schema.ts
  • web/src/hooks/queries/watchProviders.test.ts
  • web/src/hooks/queries/watchProviders.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/de.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/fr.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/pt-BR.json
  • web/src/locales/zh-Hans.json

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

Comment thread .silo-translations Resolved
@silo-triage silo-triage Bot added size/XL 500–999 added + deleted lines (all files); change volume, not priority. and removed size/L 200–499 added + deleted lines (all files); change volume, not priority. labels Nov 14, 2026
@silo-kody

silo-kody Bot commented Nov 14, 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 ❌
⚠️ 5 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility
  • Retain distributed firing claims through their own validity windows

…d-error-toasts

# Conflicts:
#	.silo-translations
#	web/src/locales/keys.ts
@silo-triage silo-triage Bot added size/L 200–499 added + deleted lines (all files); change volume, not priority. and removed size/XL 500–999 added + deleted lines (all files); change volume, not priority. labels Nov 14, 2026

@Quick104 Quick104 left a comment

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.

🤖 Claude Code (claude-opus-5-5)

Review of 23498c2. One finding.

Low: an expired, declined, or missing code stays on the card after the poll says it can't finish. handlePoll in web/src/pages/settings/WatchProvidersSettings.tsx clears the code only on success. This PR's server change now gives terminal answers their own statuses: 410 for an expired or used code, 403 for a declined one, and 404 for an unknown session. After any of them, the toast says to start again, but the old code and its I've entered it button stay on screen. Selecting the button again sends the same request and gets the same refusal. I reproduced this on this head with a component test that renders the card, starts a connection, and rejects the poll with each status. The code stays visible after 410, 403, and 404.

Fix: on a 410, 403, or 404 problem, clear the code the same way Cancel does, so the card goes back to Connect. A 409 (not approved yet) keeps it. I'm fixing this in a commit on this branch, so there's no need to change it yourself.

An expired, used, declined, or unknown code (410, 403, 404) stayed on the
card with its "I've entered it" button, so selecting it again repeated the
same refusal. Clear it like Cancel does so the card offers Connect again.
A code not approved yet (409) stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 14, 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 ❌

@Quick104
Quick104 merged commit e2611dc into main Nov 14, 2026
8 checks passed
@Quick104
Quick104 deleted the fix/accurate-localized-error-toasts branch November 14, 2026 22:43
@Quick104

Copy link
Copy Markdown
Contributor Author

🤖 Claude Code (claude-opus-5-5)

Review summary

Reviewed head: 61754e4

Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green)

Addressed

  • 61754e4: an expired, used, declined, or unknown device code (410, 403, 404) is now cleared from the card, the same way Cancel clears it, so the card offers Connect again. Before this, the old code and its I've entered it button stayed visible, and selecting the button again got the same refusal. A code that isn't approved yet (409) stays. I checked this with a component test that renders the card, starts a connection, and rejects the poll with each status. It failed for 410, 403, and 404 on 23498c2 and passes on 61754e4. I didn't commit it, because the page's existing tests and type checks cover the rest of the handler. While a poll is in flight, Connect is disabled, so a late refusal can't clear a newer code.
  • The branch was merged with main (feat(profiles): let a household manager block a profile from requests #2612). The only conflicts were .silo-translations and keys.ts. The branch's release 2026.11.14-295ae4b already contains every key on main, so it stays pinned.

Verified

  • TestWatchProviderLifecycleErrors and TestWatchProviderPollCompletedSession fail on main and pass here. On main, a completed session answers 409 instead of 410, and a retry after completion answers 409 instead of 200. One table row names the new ErrDeviceAuthDenied; it was dropped for the main run so the file builds.
  • A second-provider review (gpt-6.1-sol) of 61754e4 found nothing.
  • Every caller of watchProviderProblem, the poll sentinels, and the v2 error classes was traced. Only the plugin adapter produces the expired and denied outcomes. No built-in provider implements device polling. The completed-session path runs after the user, profile, and provider match check, so it can't return another profile's connection. The web is the only caller of this endpoint: Apple and Android have no watch-provider settings, and jellycompat has no equivalent.

Left for maintainers

  • Disclosed in Risks: any TypeError reads as "The server isn't responding." That includes the one v2() throws on purpose when a caller passes a session header through options.headers, which is a programming error.
  • Two gaps predate this PR, and this PR changes only their wording. Concurrent polls aren't coalesced, so a second tab can be told the code expired while the first one connects. A failure between saving the connection and marking the session complete makes a retry poll an already-exchanged code. Both now read "start again" instead of a server error. Neither is reachable in normal use.

Validated features: unavailable. The board query needs the read:project scope, which this account's token lacks. The Validation tasks: none line is unconfirmed.

User manual: unaffected. The watch-sync page doesn't describe failure toasts or the device-code steps after Copy code.

Other clients: N/A as the body says. Only the web has watch-provider settings.

Evidence: the published page still matches. Its captures show Sync now toasts and poll API answers, and 61754e4 changes neither.

Scores. Fit 9: this is UX polish on an existing flow. Its one contract change, 410 on the poll, uses an existing problem type and is declared in the contract. Readiness 9: the tests that cover the server change failed on main, the author showed the toasts live, and no defect remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/L 200–499 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant