Repository navigation
fix(providers): restore an instance's connection as one change - #706
Merged
Merged
Conversation
Restore of a "Changed on two computers" notice wrote kind or proxy alone.
A native instance then kept the proxy id, the worker sync copied the
proxy's address onto it and Postgres refused the row
(provider_instances_endpoint). The guard turned that into the pairing
message "Check the address, code and Network access settings".
- Kind, proxy, endpoint and key of an instance are one notice
("Connects with") and are restored or chosen together.
- A native instance never gets a proxy_id.
- Notices say whose value they keep (ConfigNotice.own_value).
- Unexpected failures outside pairing name what failed.
Related: #164, #696
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Share notice formatting and actions with web, including saved connection values and ownership. Refresh settings after partial bulk resolution and show an actionable apply error. Related: #706
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Mobile configuration notices previously showed serialized values and internal field names. They now use the same domain presentation as web: readable fields and values, value ownership, connection summaries, and the corresponding restore, choice, deletion and dismissal actions. Failed actions show an actionable apply error; bulk actions refresh settings even after partial success. Related: #706 Validation: - 35 domain tests cover all 12 notice kinds, saved-value ownership, choices, deletion/resurrection, connection summaries and redacted credentials. - Passed with `nice` and temporary files under `/var/tmp`: install, gen:check, typecheck, lint, format:check, web build, Android export and iOS export. - Fingerprints unchanged: iOS `138e0c6b171c82b4933e86808cdfef56da73b8c6`; Android `906dc944f94eb8333fa384ed9f198834fdd30d13`. No native configuration or dependency changes. OTA delivery uses the normal release workflow after merge. Copy audit (§8): - Raw JSON/internal field names → shared readable field/value text; users can identify the changed setting. - Node/reason strings → the web descriptions, including “Replaced when this computer linked with …” and whose saved value is shown. - Generic Restore/Dismiss → the same context-specific verbs as web, including “Restore this computer’s”, “Use the other’s” and “Keep current”. - Generic save failure → “Could not apply this value on this computer. Try again, or change it in its settings.” No transport details or secrets. - Checked sentence case, punctuation, glossary, verb-led actions, non-colour cues, no duplicate facts, no new empty states or humour. Reviewed source layout for short/long names: text wraps and actions wrap within their container. Rendered light/dark and device-width acceptance remains unverified; no UI suites or E2E were run.
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Settings → Providers → Grok on two linked computers showed Changed on two computers with two rows: "Connects with" (Endpoint) and "Proxy" (A different proxy). Restore failed with "Computer link operation failed. Check the address, code and Network access settings." The link itself was fine.
Root cause
Not #696. The remote policy and the device-login refusal are not involved: Restore runs locally (
manageConfigNotice).kindorproxyalone (one history row per field). For example, the instance ended upnativewhile still pointing at the proxy.applyInstancestoredproxy_idon a native instance.instanceSyncthen copied the proxy's base URL and key onto it (UPDATE provider_instances … FROM proxies), and Postgres refused the row:provider_instances_endpoint(non-endpoint instances must have no base URL and no key).computerGuardturned every error that is not aConnectError(here aSqlError) into the pairing message.The field-by-field Restore of instance records comes from #164 (already on stable), so this PR uses
Related:and notFixes:. Linking #164 would hold everything merged since 2026-11-05.Change
kind,proxy,baseUrlandapiKeythat were lost in the same merge with the same computer are one notice,field = "connection". Its value is a JSON object (the key shows only as "A different key"). Restore, Use the other’s and Keep this computer’s write those fields together, taking the newest lost version of each.applyInstancesetsproxy_idonly on endpoint instances. A record that combinesnativewith a proxy (from Restore or from a field-by-field merge) can no longer break the worker sync.ConfigNotice.own_value = 11: the kept value was set on this computer.computerGuard(run, failure): only pairing and the link service keep "Check the address, code and Network access settings". The other actions name what failed (see the copy audit).StartProviderLoginstays out ofSERVED/WORKER_SETTINGS.docs/linked-computers.md(notices).Verification
tests/integration/config-sync-connection.test.ts(two linked gateways):connectionnotice (choice,own_value=false). Restore on B: both computers are endpoint through the proxy, both workers get its address and key, and no notices are left on either computer.mergedconnection in A's history (as left by an earlier link): one notice (own_value=true, "Studio B"). Restore: both converge, no notices are left. Keep current (Dismiss) clears it and leaves both on device login.provider_instances_endpointviolation, which the user saw as the generic link message.config-sync-workers(a linked computer can't startStartProviderLoginthrough its API or directly over the link), 9/9.config-sync-connection2/2,-workers9/9,-providers7/7,-intent3/3,-identity4/4,-recovery6/6,-bootstrap4/4,config-sync7/7,-environment8/8.bun install,gen:check,typecheck,lint,format:check, web build: clean.check:tmp(full run) was not run; only the focused files above.break-words,flex-wrapbuttons). Mobile still shows its plain notice list (field name and raw value); theconnectionfield shows there as raw JSON, as other fields already do.Copy audit (docs/copy.md §8)
Connects with+Proxy(two rows) →Connects with(one row)Endpoint/A different proxy→This computer’s value: Endpoint through a different proxy(alsoDevice login,Endpoint at <url>,… with a different key)Merged with <computer>.→Replaced when this computer linked with <computer>./Not used when this computer linked with <computer>.Restore→Restore this computer’s/Use the other’sDismiss→Keep currentComputer link operation failed. Check the address, code and Network access settings.→Could not apply this value on this computer. Try again, or change it in its settings.Could not load linked computers. Try again.,Could not change this linked computer. Try again.,Could not move the threads. Check that the other computer is online, then try again.,Could not load moves. Try again.,Could not load workers of linked computers. Try again.,Could not read thread sync diagnostics. Try again.Computer link operation failed→Could not update linked computers. Try again.Glossary: "instance", "proxy", "computer" used as defined; no new terms; no "soul" sentences. Long computer names wrap (
break-words).Related: #164, #696