fix(server): restore PR detection without HOME - #4985
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 99f6455. Configure here.
ApprovabilityVerdict: Approved 643f981 This is a straightforward bug fix that hydrates the HOME environment variable when missing, with defensive logic that preserves existing values. The changes are small, well-tested, and include proper error handling. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(mobile): support pre-Liquid-Glass iOS bottom toolbar by @gabrielelpidio in pingdotgg/t3code#4984 * fix(server): restore PR detection without HOME by @StiensWout in pingdotgg/t3code#4985 * fix(web): fill fast mode icon by @maria-rcks in pingdotgg/t3code#5004 * fix: cache project favicons across web and mobile by @gabrielelpidio in pingdotgg/t3code#4767 * perf(ci): cut stale runs and redundant setup by @t3dotgg in pingdotgg/t3code#4802 **Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260730.957...v0.0.32-nightly.20260730.958 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260730.958

Problem
T3 servers launched by service managers without
HOMEcannot letghlocate its existing credentials. Git status then silently omits pull request metadata, which leaves PR numbers blank for threads in worktrees and remote clients.Fix
Hydrate a missing or blank POSIX
HOMEfromos.homedir()during server startup before hydratingPATH, while preserving any explicitly configured value. Add focused coverage for missing, blank, and explicitHOMEvalues.Impact
PR numbers and statuses resolve across worktrees for web, desktop, and mobile clients connected to the updated server.
Validation
vp run --filter t3 typecheckpassed (existing Effect suggestions only).git diff --check upstream/main...HEADpassed.HOMEunset used the realghbinary and returned PR#4844.#4844in the thread footer and sidebar.#4981in the sidebar, footer, and View PR action.vp test run apps/server/src/os-jank.test.tsis blocked before collection by the existingVitest failed to find current suiterunner failure, which reproduces on unchanged tests.image
Created with GPT-5.6-Sol in the T3 Code Codex harness.
Note
Restore PR detection by hydrating HOME on POSIX when unset or blank
hydratePosixHomeinos-jank.tsthat setsenv.HOMEfromNodeOS.userInfo().homedirwhenHOMEis missing or blank.fixPathgenerator to callhydratePosixHomebeforehydratePosixPathon POSIX, wrapping failures withEffect.catchDefectto log a warning rather than crash.process.env.HOMEwill now be populated on POSIX systems where it was previously unset, which fixes PR detection flows that depend on a valid home directory.Macroscope summarized 643f981.
Note
Low Risk
Startup-only env repair on POSIX with early return when HOME is already set; failures are logged and do not block server startup.
Overview
Restores PR metadata when the server runs without
HOME(e.g. service managers) by hydratingenv.HOMEfrom the user account before existing PATH hydration on darwin/linux.Adds
hydratePosixHome, which fills missing or whitespace-onlyHOMEviaos.userInfo().homedirand leaves an explicit value untouched.fixPathinvokes it ahead ofhydratePosixPath, with the same defect logging pattern as PATH failures. Unit tests cover empty env, blankHOME, and preserved customHOME.Reviewed by Cursor Bugbot for commit 643f981. Bugbot is set up for automated code reviews on this repo. Configure here.