Skip to content

fix(settings): group thread sync status by computer - #560

Merged
nixuuu merged 5 commits into
devfrom
fix/thread-sync-diagnostics-ux
Nov 12, 2026
Merged

nixuuu merged 5 commits into
devfrom
fix/thread-sync-diagnostics-ux

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Settings → Diagnostics repeated the computer hostname once per mirrored thread, making dozens of rows indistinguishable. Thread sync now shows one row per linked computer, using its display name and complete thread totals. Expanding a row loads only threads that need attention, with titles, remaining records, pause reasons and links. When reachable computers are caught up, one calm status replaces the list and zero counters.

Fixes: #543

The additive RPC returns local computer summaries separately from bounded attention pages. Every join is owner scoped; message bodies are never read. A migration records the last committed range time without inventing historical timestamps. Web and mobile share grouping/status copy, poll summaries every 5 seconds while visible/foreground, and fetch detail pages only for expanded computers. Mobile changes are JS-only; native configuration and dependencies are unchanged. The Diagnostics page only loses its obsolete subtitle; its layout and other sections are unchanged.

Validation:

  • Generated contracts with bun run gen.
  • Changed-file oxfmt and oxlint passed at nice -n 19.
  • Added gateway gRPC integration coverage for aggregation, attention pagination, failure-only threads, identical computer/thread IDs across owners, title isolation, message-body exclusion, committed timestamps and duplicate ranges.
  • Rebased on dev through fix(mobile): expand turn summaries smoothly without scroll jumps #554, including fix(files): resolve and preview files from remote threads #546 and feat(threads): inherit access mode for subagents and bot threads #547. Resolved the generated-contract conflict by regenerating the merged proto; bun run gen:check passed again. Migration registry and schema expectations contain 0124, 0125 and 0126 in order. bun install passed locally.
  • Latest focused migration run passed: 25 tests / 105 assertions across packages/db/test/inherited-access-upgrade.test.ts, packages/db/test/thread-sync-upgrade.test.ts and packages/db/test/schema.test.ts. The feat(threads): inherit access mode for subagents and bot threads #547 test now checks the contiguous 0124 → 0125 upgrade before applying later migrations, preserving every explicit owner choice. Earlier gateway/schema run passed 26 tests / 157 assertions. The full check:tmp was deliberately left to GitHub CI during the host measurement window.
  • Manual Chromium review of the real Settings → Diagnostics route against an isolated gateway/database with synthetic presence: caught up, catching up, paused with reason, unreachable; 126 threads across three computers; long names/titles; light/dark; desktop 1280×800 and phone 390×844. Verified 25+5 attention pagination, qualified thread link targets, automatic transition to the calm caught-up state, icon refresh/tooltip and absence of zero counters. Fixed a phone overflow found during this review. No web UI tests added.
  • EAS CLI 27.4.1, production profile: fingerprints match origin/dev exactly on both platforms (iOS 6ddec9ef559ee0095ac33e94ff9418a942053b17; Android 5f6eae3ab278f1cd543e9ed763f923a319b65ec9). Compared against a clean archive with its own matching dependency install.

Copy audit (§8):

  • Repeated hostname + “Up to date” → display name + “2 of 42 catching up · 1 paused · 15 records to go”: identifies the computer and actionable work.
  • “Remaining / 0 to go” and “Threads / 0 / 0” → “All threads are up to date” with last sync time: removes empty metrics.
  • Two explanatory descriptions → “Sync with linked computers.”; removed “Check sync progress without opening thread content.”
  • “Refresh” → icon button labelled/tooltipped “Refresh sync status”. Pause reasons use the existing shared vocabulary; recovery says “Retrying automatically.” or “Check the linked computer.”
  • Reviewed sentence case, length, plurals, glossary, actions, error recovery and textual status cues. No humour or new glossary terms. Short, typical and long-name/title layouts checked in Chromium at desktop and phone widths in light and dark modes.

@nixuuu
nixuuu force-pushed the fix/thread-sync-diagnostics-ux branch from ce87896 to 3c6889f Compare November 12, 2026 09:32
@nixuuu
nixuuu force-pushed the fix/thread-sync-diagnostics-ux branch from a33bdc4 to 8489f15 Compare November 12, 2026 12:06
@nixuuu
nixuuu marked this pull request as ready for review November 12, 2026 12:13
@nixuuu
nixuuu force-pushed the fix/thread-sync-diagnostics-ux branch from ee7f780 to 09a3ff1 Compare November 12, 2026 12:25
@nixuuu
nixuuu merged commit bb65f9d into dev Nov 12, 2026
10 checks passed
@nixuuu
nixuuu deleted the fix/thread-sync-diagnostics-ux branch November 12, 2026 12:35
nixuuu added a commit that referenced this pull request Nov 12, 2026
The same thread now exposes its home connector access and scheduled
tasks from either linked computer. A dedicated display DTO omits
credentials, headers, endpoints and account errors. Connector grants,
schedule creation, edits and cancellation run at home with owner and
revision checks. Worker grants affect every thread on that worker;
inherited All workers and account administration show a compact
home-management hint.

Verified panel responses survive a restart and remain visible as stale
when the home or panel read is unavailable. The archived sidebar now
pages local rows together with committed linked metadata: the previous 7
vs 31 counts came from intentionally local-only archive reads.

The three-gateway move regression now reconnects with a saved thread
cursor and requires a removal from the old home. The runtime exemption
for mirror subscriptions and range acknowledgments is already present in
the rebased dev branch; individual thread operations still follow their
redirects, and ACKs retain peer/subscription/cursor validation.

Gateway-to-gateway regression coverage exercises safe metadata, schedule
create/list/edit/cancel, home enforcement after grant changes, owner
isolation, cached stale reads, restart/unlink and archive
totals/pagination. Mobile changes are JavaScript/TypeScript only; native
configuration and dependencies are unchanged.

Validation:
- `bun install`, `bun run gen:check`, package-db typecheck and
changed-file oxfmt/oxlint passed. No full local `check:tmp` was run, as
requested; CI runs the full checks and test shards.
- Focused gateway-to-gateway panel tests, schema and upgrade tests
passed. The three-gateway move regression passed 20 consecutive runs.
After rebasing onto migration 0126, the panel/schema/inherited-access
tests passed; the staged sync upgrade exposed an ordering assumption,
was repaired and passed its focused rerun (17 assertions).
- Real-browser review used two linked gateways in light/dark at desktop
and phone widths. Both views show Connectors and Scheduled tasks. Remote
grant revoke/restore was reflected at home; remote schedule
create/edit/cancel worked. Disconnecting home retained connectors and
schedules with explicit stale/unreachable text and disabled actions.
Both archive counts were 38 (7 + 31), including offline. Short, typical
and long labels remained readable without horizontal overflow; removed a
duplicate offline hint that compressed schedule rows on phones.
- Native fingerprints match the tested dev base (`a79d316c`) for both
platforms: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`; Android
`5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. Mobile changes remain JS/TS
only. Subsequent rebases include JS/TS-only mobile changes from dev;
fresh CI runs on the final head.

Copy audit (§8): hidden sections → visible Connectors and Scheduled
tasks; Manage → scoped connector-access dialog with “Changes apply to
every thread on this worker.” This states the grant's actual scope.
Stale metadata → explicit last-known-details status; account-wide
changes → “Manage accounts on <computer>”. New actions use verbs,
sentence case and text status cues; no humorous copy. Existing controls
provide keyboard/focus behavior and name truncation. Browser review
covered short, typical and long names in light/dark at desktop and phone
widths, including offline states and dialog scrolling.

Related: #543, #539

Migration coordination: rebased onto `580a4815`, including #562 = 0124,
#547 = 0125, #560 = 0126 and #557 = 0127. This PR registers
`0128_thread_panel_cache`; the loader and schema expectations list 0124
through 0128 in order. The staged thread-sync upgrade test reads the
migration tail dynamically after the explicit 0126 stage, including 0127
and 0128, checks that durable sync state survives, and verifies that
repeating the full migration is a no-op. It does not assume 0128 is the
latest migration. Focused schema and staged/inherited-access upgrade
tests passed again after this rebase (25 tests, 107 assertions); all 6
remote-panel integration tests also passed (63 assertions). `bun
install` and `gen:check` passed. An initial panel test launch resolved a
workspace package to another checkout; refreshing installation corrected
the local alias before the successful rerun.
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