Skip to content

feat(computers): merge linked projects by git origin - #149

Merged
nixuuu merged 1 commit into
devfrom
feat/linked-projects-by-origin-1
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/linked-projects-by-origin-1

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

Stage 1 of 2 (data and protocol).

  • Reading the origin: the worker reads remote.origin.url of each workspace through the process governor, with a 2 s timeout and a 30 s cache. Only the normalized identity reaches the gateway; the raw URL does not.
  • Normalization: SSH, HTTPS and SCP forms are treated as the same origin. Host case, a trailing .git and slashes are normalized. The case of the repository path still matters.
  • Storage: migration 0072_workspace_origin stores the origin, so it is known while the worker is offline.
  • Merge rule: projects on different linked computers merge only when every workspace reports the same known origin. Missing or different origins stay separate. Two projects on the same gateway with the same origin leave the whole group unmerged, rather than matching arbitrarily.
  • Protocol: the new command is additive and capability-gated, so protocol versions are unchanged.

Tests: origin normalization, merge rules, owner scoping, offline metadata, and creating a thread on the second gateway's right project.

Read normalized workspace origins through a capability-gated worker query and persist owner-scoped metadata for offline overviews. Keep original project records and conservative cross-computer presentation identities.
@nixuuu
nixuuu added this pull request to stack #151 November 5, 2026 08:14
@nixuuu
nixuuu marked this pull request as ready for review November 5, 2026 08:17
@nixuuu
nixuuu merged commit 6fe7f2e into dev Nov 5, 2026
10 checks passed
@nixuuu
nixuuu deleted the feat/linked-projects-by-origin-1 branch November 5, 2026 08:17
nixuuu added a commit that referenced this pull request Nov 5, 2026
…168)

Stage 3 of 7 of shared configuration across linked computers. The design
is in `docs/linked-computers.md`.

**What changes**
- **Shared:** projects (name, kind, archived, origin as identity),
project settings without the workspace, and worktree settings for the
account and each project, without `location`.
- **Stays local:** workspaces, worktrees, worktree location, and
worker-scope worktree settings. Worker records come in stage 6.
- **Identity:** projects merge by known git origin, the same rule the
picker uses since #149, and get aliases. Routed calls translate aliased
`project_id`. Projects without an origin merge only by global id.
- **Old mechanism removed:** the remaining 0050 opt-in project data is
migrated. Its tables (`computer_shared_*`), its sync loop and its UI
(`ShareSetting`, `ShareScope`, `SharedConfigOverview`) are removed, and
so is a broken query in `moves-preview.ts`.
- **UI:** shared project fields have no label. Workspaces show their
computer and worker. Project fields have conflict notices with Restore.

**Migration:** `0075_config_projects`. Proto (additive):
`Project.global_id = 801`.

**Tests:** gateway↔gateway integration covers:
- project rename and settings sync;
- worktree policy syncs while `location` stays local;
- origin merge with aliases, and routed calls with an aliased project
id;
- concurrent edits with Restore;
- delete with Restore;
- sharing off;
- the migration from 0050;
- owner scoping.

Full suite: 1195 passed, 0 failed.

Copy audit (`docs/copy.md` §8):
- "Workers" became "Workspaces".
- The description is shortened to one sentence.
- Scope tags are removed.
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