You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): t3 service restart no longer calls an installed service not installed - #45014
When the installed service unit names a T3 home that T3 Code can't read, t3 service restart skips the restart and prints "T3 Code service is not installed." A service is installed. The message sends people to t3 service install, which rewrites the unit.
One real way to get there: edit the unit with systemctl --user edit --full and quote the whole assignment, Environment="T3CODE_HOME=/path". That's systemd's documented form, and systemd still runs the service with the right home, but T3 Code's unit parser doesn't read it.
Change
When restart skips and the status read says a unit is installed but names no home, it now says so and points at the unit file:
A T3 Code service definition was found, but its T3 home could not be determined, so it was not restarted. Check ~/.config/systemd/user/t3code.service.
It still says "not installed" when there's no unit. The other-home case from #29848 is already on main (status.otherBaseDir), so this carries the remaining piece from that PR.
Scope
Supersedes #29848 by @saphid (rebased onto current main, which already has the other-home message), keeping the unknown-home fix from its second commit. Both are credited as co-authors.
Verification
On a fresh Ubuntu 24.04 VM with a real per-user systemd service, commit 3b20b6b2000:
t3 service install --base-dir ~/t3-proof-home, service active.
systemctl --user edit --full t3code.service, quoting the assignment to Environment="T3CODE_HOME=/home/user/t3-proof-home". After a restart, systemctl --user show -p Environment still shows T3CODE_HOME=/home/user/t3-proof-home.
t3 service restart --base-dir ~/t3-proof-home:
# origin/main 29886e21597
T3 Code service is not installed.
# this branch
A T3 Code service definition was found, but its T3 home could not be determined, so it was not restarted. Check /home/user/.config/systemd/user/t3code.service.
In both runs, the service's MainPID and start time were unchanged, so the service was not restarted, as before.
vp test run apps/server/src/cli/service.test.ts: the new case fails on main (restart says a service whose home it cannot determine was not restarted) and 19/19 pass on this branch.
vp run check:changed passes.
Not shown: launchd on macOS. The message change is platform-neutral, but I only installed a real systemd unit.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
… installed
When the installed service unit names no T3 home that T3 Code can read,
`t3 service restart` skipped it and printed "T3 Code service is not
installed." It now says the service's home could not be determined and
points at the unit file.
Co-authored-by: Alex Southwell <4596216+saphid@users.noreply.github.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewing files that changed from the base of the PR and between 3b20b6b and 4bd0055.
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
No actionable comments were generated in the recent review.
Walkthrough
The restart command now reports when an installed service was not restarted because its T3 home could not be determined. The message includes the service unit path. A CLI test covers this outcome.
Changes: Service restart outcome
Layer / File(s)
Summary
Report a skipped restart apps/server/src/cli/service.ts, apps/server/src/cli/service.test.ts
The restart command reports the unit path when it skips restarting an installed service whose T3 home cannot be determined. The test helper accepts the "skipped" outcome, and a CLI test checks the message. The not-installed message remains the fallback.
pingdotgg/t3code#29848: This PR also changes the restart skip message for services with an unknown T3 home.
Suggested labels:bugfix
Suggested reviewers:only21mil, macroscopeapp
Merge Risk: Minimal · previous review 3b20b
The restart command now reports clearly when an installed service is skipped because its home cannot be determined, instead of saying it is not installed. The change is small and tested, with no merge-blocking risk identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: restart no longer treats an installed service as not installed. It uses the conventional commit format and the fix(cli) scope. The raw summary and objectives both desc…
Description check
The description follows the template's main sections: Problem, Change, Scope, and Verification. The Problem section gives the reproduction steps and the expected behavior. The Change section explains …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: restart no longer treats an installed service as not installed. It uses the conventional commit format and the fix(cli) scope. The raw summary and objectives both describe the same change, which adds an unknown-home message that points to the unit file. The title is specific and accurate, so it passes.
Full details: Description check
Explanation
The description follows the template's main sections: Problem, Change, Scope, and Verification. The Problem section gives the reproduction steps and the expected behavior. The Change section explains the new message and the unchanged not-installed path. The Scope section links the superseded PR #29848 and credits its co-author. The Verification section gives concrete manual steps with before and after output, the focused test results, and the platform not tested (launchd). The description meets the template's requirements.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between ddeb226 and 3b20b6b.
Files selected for processing: 2
apps/server/src/cli/service.test.ts
apps/server/src/cli/service.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Ran both built CLIs against a real, isolated Linux systemd user service. Installed t3@0.1.13, confirmed baseline restart, quoted the entire T3CODE_HOME assignment, reloaded/restarted through systemd, then ran CLI restart and status. Systemd accepted the assignment and reported the service active. The restart timestamp remained unchanged on both sides.
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
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
3 participants
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
When the installed service unit names a T3 home that T3 Code can't read,
t3 service restartskips the restart and prints "T3 Code service is not installed." A service is installed. The message sends people tot3 service install, which rewrites the unit.One real way to get there: edit the unit with
systemctl --user edit --fulland quote the whole assignment,Environment="T3CODE_HOME=/path". That's systemd's documented form, and systemd still runs the service with the right home, but T3 Code's unit parser doesn't read it.Change
When restart skips and the status read says a unit is installed but names no home, it now says so and points at the unit file:
It still says "not installed" when there's no unit. The other-home case from #29848 is already on main (
status.otherBaseDir), so this carries the remaining piece from that PR.Scope
Supersedes #29848 by @saphid (rebased onto current main, which already has the other-home message), keeping the unknown-home fix from its second commit. Both are credited as co-authors.
Verification
On a fresh Ubuntu 24.04 VM with a real per-user systemd service, commit
3b20b6b2000:t3 service install --base-dir ~/t3-proof-home, service active.systemctl --user edit --full t3code.service, quoting the assignment toEnvironment="T3CODE_HOME=/home/user/t3-proof-home". After a restart,systemctl --user show -p Environmentstill showsT3CODE_HOME=/home/user/t3-proof-home.t3 service restart --base-dir ~/t3-proof-home:In both runs, the service's MainPID and start time were unchanged, so the service was not restarted, as before.
vp test run apps/server/src/cli/service.test.ts: the new case fails on main (restart says a service whose home it cannot determine was not restarted) and 19/19 pass on this branch.vp run check:changedpasses.Not shown: launchd on macOS. The message change is platform-neutral, but I only installed a real systemd unit.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code