Skip to content

fix(mobile): show each project once in pickers - #368

Merged
nixuuu merged 1 commit into
devfrom
fix/mobile-project-duplicates
Nov 8, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/mobile-project-duplicates

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 8, 2026

Copy link
Copy Markdown
Member

Change

Mobile's Project picker now shows one “No project” and one choice per shared project identity, using the same global-id/Git-origin model as web. Distinct same-name projects show computer/workspace details. Worker choices have one row per worker and stable computer groups. The sidebar filter, thread defaults and project settings use the same projection; settings still edit the original local record.

Two causes were reproduced:

  • The standalone Project picker introduced in feat(mobile): redesign the new thread composer with files #229 rendered raw overview records. Those include a scratch project per computer and configuration replicas, even when only one computer has the directory.
  • Retention introduced in fix(computers): keep pages working when a linked computer stalls #348 can keep an old peer project after an aggregate starts representing it through a local alias. Both records can reference the same remote workspace. The prior projection concatenated that workspace twice; snapshots/retention also preserved repeated resource IDs. The critical-state regression failed before the fix and passes afterward, including preservation of the current aggregate's workspace metadata.

Shared reconciliation now enforces stable resource IDs, replaces a home's snapshot atomically and preserves other homes' workspaces. The shared projection deduplicates workspace and project references. Real two-gateway coverage replays phone subscriptions through aggregate snapshots, peer snapshots and compatibility upserts, then checks original home/workspace selection and routing. Existing owner-scoping and offline coverage remains intact.

The inspected gateway path serves peer RPCs through local-only handlers and qualifies home IDs; no A→B→A aggregation was found. This change requires no gateway update or protocol change. Mobile ships through OTA; web/desktop reconciliation hardening accompanies the next desktop update.

Verification

  • Passed: bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, and bun run --filter @canopy/web build.
  • Passed: bun run check:tmp --timeout 20000 — 1,822 passed, 161 skipped, 0 failed across 325 files; check:tmp: nothing left in the temp dir.
  • Focused checks: 8 state/project-identity tests and 5 linked-project integration tests passed. Multi-gateway files ran sequentially. Mobile's bun run lint also passed.
  • Manual device/browser visual checks were not run. The web edit changes state reconciliation; mobile reuses the existing picker/settings layout.

OTA compatibility

Only JS/TS and documentation changed. Native dependencies, app configuration and protocol descriptors are unchanged. No EAS builds or APKs were produced.

Ran bunx [email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive before editing and after the final commit. Full fingerprint JSON files compare byte for byte:

Platform Before = after
iOS 2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3
Android c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d

Copy audit (§8)

Before: repeated “No project”/project rows and worker names without their computer. After: one scratch choice, searchable aliases (“Also named …”), computer/path details for distinct same-name projects, and “Worker · Computer” in settings. Missing scratch workspaces use the existing web instruction: “No scratch directory. Configure this worker.”

Text follows sentence case and the existing glossary, with action verbs and accessible text cues. No new confirmations, error flows, glossary terms or humor. Details use existing compact text slots. Short/typical/long-name rendering at phone and wide widths remains unverified (§8.9); no visual verification is claimed.

Fixes: #348
Fixes: #229

Reconcile overview snapshots by stable resource ids and use shared project
choices throughout mobile. Keep one workspace across retained project aliases
and preserve the original home when creating a thread.

Fixes: #348
Fixes: #229
@nixuuu
nixuuu merged commit 9016d5a into dev Nov 8, 2026
10 checks passed
@nixuuu
nixuuu deleted the fix/mobile-project-duplicates branch November 8, 2026 20:32
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