Skip to content

Add remote server updates and standalone service management#4286

Merged
juliusmarminge merged 14 commits into
mainfrom
t3code/enable-remote-environment-updates
Jul 22, 2026
Merged

Add remote server updates and standalone service management#4286
juliusmarminge merged 14 commits into
mainfrom
t3code/enable-remote-environment-updates

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep connected T3 Code clients and servers on the same version with capability-aware update actions.
  • Add standalone host service management through t3 service install, update, status, and uninstall.
  • Make T3 Connect onboarding reuse the service lifecycle without owning it; Connect logout now leaves the host service installed.
  • Harden GitHub pull-request status discovery and Git remote matching across SSH and HTTPS URL forms.

User-facing behavior

  • Version mismatches appear in conversations and Settings → Connections.
  • Published CLI servers can offer a one-click server update and reconnect flow.
  • Desktop-managed servers direct users to update the desktop app on the host.
  • Unsupported or older servers provide an exact command to copy and run manually.
  • Linux hosts can manage the systemd user service directly, including updating it with npx t3@latest service update.
  • User guides cover server updates, background service management, remote access, expected restarts, and recovery steps.

Server update architecture

  • Advertise boot-service, respawn, or desktop-managed update capabilities in the environment descriptor.
  • Add an operate-scoped server.updateServer RPC and shared client-runtime command.
  • Install exact npm versions into a pinned runtime with serialized install and cleanup, completion sentinels, and exact-version preflight checks.
  • Atomically rewrite and reload the managed systemd unit with rollback on activation failures.
  • Hand foreground macOS and Linux CLI servers off to a verified detached replacement.
  • Keep UI attempt ownership, interruption handling, and reconnect timeouts safe across slow installs and server restarts.
  • Require the exact CLI package to be published before a client release can request it.

Host service lifecycle

  • Add t3 service install, update, status, and uninstall independently of T3 Connect configuration.
  • Reuse one reconciliation path from both the direct CLI and optional Connect onboarding.
  • Preserve the service when users unlink or log out of T3 Connect.
  • Keep the service entry point stable by pinning ephemeral npx, pnpm dlx, or bunx runtimes before systemd uses them.

Supporting VCS fixes

  • Cache GitHub PR lookups while retaining the last known result across transient failures.
  • Support older gh repository response fields.
  • Normalize equivalent SSH, SCP-style, and HTTPS Git remotes to avoid duplicate remote registration.
  • Route refreshes through full VCS status invalidation.

Verification

  • Focused server, pinned-runtime, CLI, web component, and version-skew tests cover the new behavior and failure paths.
  • Targeted lint, formatting, and server type checks pass.
  • GitHub CI Check, Test, Release Smoke, and Mobile Native Static Analysis pass.
  • Cursor Bugbot, Macroscope correctness, and Effect service convention checks pass with no unresolved review threads.

Operational notes

  • Updating restarts the server and can interrupt active agent work or terminal commands.
  • Managed background services currently require Linux with systemd.
  • Desktop-managed backends remain owned and updated by the desktop app.

- Cache GitHub PR lookups while preserving the last known result on failures
- Support older gh repository response fields
- Reuse remotes across SSH and HTTPS URL variants
- Route refreshes through full VCS status invalidation
- Install and preflight pinned npm runtimes before restarting
- Expose server update RPC and client update controls
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e726e751-bde8-459b-95a5-87502b791317

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/enable-remote-environment-updates

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
Comment thread apps/server/src/cloud/pinnedRuntime.ts Outdated
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
Comment thread apps/server/src/ws.ts Outdated
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature for remote server self-updates, adding new CLI commands (t3 service), new RPC endpoints, process management logic (systemd unit rewriting, detached process spawning), and new UI components. New capabilities with significant runtime behavior changes warrant human review.

You can customize Macroscope's approvability policy. Learn more.

Base automatically changed from t3code/audit-sidebar-git-queries to main July 22, 2026 15:49
Comment thread apps/server/src/vcs/GitVcsDriverCore.ts Outdated
Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated

@macroscopeapp macroscopeapp 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.

Effect service review: one error-wrapping convention violation in the new self-update service.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
Comment thread apps/web/src/components/ServerUpdateAction.tsx
Co-authored-by: codex <codex@users.noreply.github.com>
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
juliusmarminge and others added 2 commits July 22, 2026 18:46
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Comment thread apps/server/src/cloud/selfUpdate.ts
Comment thread apps/web/src/components/ServerUpdateAction.tsx Outdated
Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Jul 22, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/server/src/cloud/selfUpdate.ts Outdated
Comment thread apps/web/src/components/ServerUpdateAction.tsx
Comment thread apps/server/src/cloud/selfUpdate.ts
Comment thread apps/server/src/cloud/selfUpdate.ts
Comment thread apps/server/src/cloud/selfUpdate.ts
juliusmarminge and others added 2 commits July 22, 2026 19:06
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Comment thread apps/web/src/components/ServerUpdateAction.tsx
Comment thread apps/web/src/components/ServerUpdateAction.tsx Outdated
Co-authored-by: codex <codex@users.noreply.github.com>
Comment thread apps/web/src/components/ServerUpdateAction.tsx Outdated
juliusmarminge and others added 3 commits July 22, 2026 19:23
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge changed the title Enable remote server self-updates Add remote server updates and standalone service management Jul 22, 2026
@juliusmarminge
juliusmarminge merged commit ab4a883 into main Jul 22, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/enable-remote-environment-updates branch July 22, 2026 21:49
UNN-Devotek pushed a commit to unn-corp/t3code that referenced this pull request Jul 23, 2026
…g#4286)

Co-authored-by: codex <codex@users.noreply.github.com>
jetblk added a commit to jetblk/t3code that referenced this pull request Jul 23, 2026
…r refresh (#7)

* feat(web): copy branch name via right-click in the branch selector (pingdotgg#4275)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* Add remote server updates and standalone service management (pingdotgg#4286)

Co-authored-by: codex <codex@users.noreply.github.com>

* Refine light-mode sidebar surfaces (pingdotgg#4268)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: codex <codex@users.noreply.github.com>

* fix(mobile): don't mark Android VPN/Tailscale as offline when connected (pingdotgg#3949)

* improve and prevent silent thread branch drift and PR fetching (pingdotgg#2284)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>

---------

Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Rushikesh Gaikwad <81632222+Wraient@users.noreply.github.com>
Co-authored-by: legs <145564979+justsomelegs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant