GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): discover editors on the hydrated PATH by Christos-Ioannou · Pull Request #12501 · pingdotgg/t3code

Conversation

@Christos-Ioannou

@Christos-Ioannou Christos-Ioannou commented Sep 18, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

What Changed

externalLauncher now reads its env (PATH/PATHEXT and the browser-launch vars) from HostProcessEnvironment instead of Effect Config. Tests provide the env through HostProcessEnvironment accordingly, plus one regression test.

Two files, server only: apps/server/src/process/externalLauncher.ts and its test.

Why

On macOS, when the desktop app is launched from the Dock/Finder, the Open in picker only offers Finder. Cursor, VS Code, Antigravity, IntelliJ etc. are all missing even though their CLIs are installed.

Root cause:

  1. A Dock/Finder launch gives the server the bare launchd PATH: /usr/bin:/bin:/usr/sbin:/sbin.
  2. fixPath() correctly hydrates process.env.PATH from the login shell (provider child processes do get the full PATH).
  3. Editor discovery did not read process.env though - it read Config.String("PATH"). The default ConfigProvider is fromEnv(), which copies { ...process.env } the first time it is used. That happens while ServerConfig resolves, which is before fixPath() runs in makeServerLayer. So discovery kept seeing the pre-hydration PATH forever.
  4. On that PATH only open (in /usr/bin) resolves, so file-manager is the single available editor.

The snapshot behaviour is easy to confirm in isolation:

process.env.PROBE = "before";
const first = yield* Config.String("PROBE");   // "before"
process.env.PROBE = "after";
const second = yield* Config.String("PROBE");  // still "before"

Launching the same build from a terminal ("/Applications/T3 Code (Alpha).app/Contents/MacOS/T3 Code (Alpha)") makes every editor show up, because the inherited PATH is already complete and the stale snapshot happens to be right. That is also why this is easy to miss in dev.

HostProcessEnvironment is the object fixPath() mutates, so reading it at call time is the smallest change that makes discovery and hydration agree. Empty values are still treated as absent, matching the previous Config behaviour.

The new test fails on main and passes here. It asserts an exact editor list on purpose: on main the lookup falls through to the ambient process PATH and reports whatever editors the host machine has installed.

Verified locally: vp test run src/process/externalLauncher.test.ts (25 passed, 1 skipped), tsc --noEmit clean for the touched files, vp fmt and vp lint clean.

Not in this PR, to keep it focused: apps/server/src/provider/providerMaintenance.ts has the same Config.String("PATH") reader and is likely affected the same way. Happy to follow up if wanted.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (no UI code changed; before = picker shows only Finder, after = Cursor / VS Code / Antigravity / IntelliJ IDEA / Finder)
  • I included a video for animation/interaction changes (n/a)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved editor and command discovery when environment variables, including PATH, become available after application startup.
    • Browser launches and command lookups now more reliably use the current host environment.
    • Empty or unavailable environment variables are handled more consistently.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Christos-Ioannou @claude
fix(server): discover editors on the hydrated PATH
5948f68
Editor discovery read PATH through Effect Config. The default
ConfigProvider copies process.env the first time it is used, which
happens while ServerConfig resolves - before fixPath() hydrates PATH
from the login shell. Discovery therefore kept looking at the bare
launchd PATH (/usr/bin:/bin:/usr/sbin:/sbin) of a Dock/Finder launch,
where only `open` resolves, so the Open-in picker offered Finder and
nothing else. Launching the app from a terminal hid the bug because the
inherited PATH was already complete.

Read the launcher's env from HostProcessEnvironment instead, which is
the object fixPath() mutates.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 18, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 18, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Sep 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 5948f68

Macroscope's review found this PR approvable — This is a small, self-contained server bug fix that makes existing editor and browser discovery observe the hydrated host environment. Production behavior changes only within the existing launcher paths, with regression coverage added and no product-default, schema, security, or deployment changes.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1ffc6c0d-d144-4275-a11d-f1734b9740d1

📥 Commits

Reviewing files that changed from the base of the PR and between 93e0416 and 5948f68.

📒 Files selected for processing (2)
  • apps/server/src/process/externalLauncher.test.ts
  • apps/server/src/process/externalLauncher.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The external launcher now reads environment variables through HostProcessEnvironment instead of Config. Tests provide environment values through the service and verify editor discovery after PATH changes after layer construction.

Changes

External launcher environment

Layer / File(s) Summary
Host environment reads
apps/server/src/process/externalLauncher.ts
Browser and command lookup environment variables now come from HostProcessEnvironment. Empty values are omitted, and command lookup checks PATH, Path, path, and PATHEXT.
Environment test coverage
apps/server/src/process/externalLauncher.test.ts
Tests provide HostProcessEnvironment directly. A new test verifies editor discovery after PATH is hydrated after layer construction. Existing cache and interrupted-discovery tests use the new environment service.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 5948f

The launcher now observes the hydrated host PATH, preserving editor discovery for desktop launches. No actionable current-head risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary fix: editor discovery now uses the hydrated PATH on the server.
Description check ✅ Passed The description explains what changed, why the change is required, the affected files, testing performed, and checklist status. It is focused and substantially matches the repository template. The UI …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sheehanmunim added a commit to munimtechnologies/mtcode that referenced this pull request Sep 19, 2026
@sheehanmunim @claude
port(upstream pingdotgg#12501): discover editors on the hydrated PATH
af3e95b
From pingdotgg#12501 by @Christos-Ioannou. Environment reads go
through HostProcessEnvironment (hydrated by fixPath) for the fork's macOS
bundle lookup and pingdotgg#12439's install-root lookup too.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 1, 2026 07:27

Dismissing prior approval to re-evaluate 5948f68

macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 1, 2026
View reviewed changes
@maria-rcks

maria-rcks commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Hi! We are cleaning up open PRs, and this one names a harness (Claude Code) but not which model version created it. If this change is really important, we recommend rebuilding the PR with a newer model and noting the model in the PR description.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks maria-rcks closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Christos-Ioannou @maria-rcks @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.