Skip to content

feat(web): open projects in px0 when installed - #10

Merged
donnes merged 2 commits into
mainfrom
feat/px0-editor
Sep 25, 2026
Merged

donnes merged 2 commits into
mainfrom
feat/px0-editor

Conversation

@donnes

@donnes donnes commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

The "Open" picker had no way to open a project or file in px0, a browser-based code review IDE.

px0 is added as an editor in packages/contracts/src/editor.ts, so it appears in the picker whenever the px0 CLI is on the server's PATH. It launches as px0 <path>. px0 accepts path:line directly, so opening a file at a line from chat works too. The picker gets a small [0] brand icon.

Notes:

  • px0 starts its own local server and opens the browser. Each launch starts a new server on the next free port, and that server keeps running after the tab closes, the same as running px0 from a terminal. px0 has no CLI option to reuse a running server.
  • There's no SSH deep-link scheme, so px0 isn't offered in remote-links mode. Mobile has no Open picker.

Works on macOS, Linux and Windows. On macOS and Windows, px0 is found on the PATH that server startup already fills in: from the login shell on macOS, and from known CLI folders such as %USERPROFILE%\.local\bin on Windows. On Linux it's also found in ~/.local/bin when that isn't on PATH.

Tested: externalLauncher.test.ts has new cases that discover px0 on PATH on macOS and Windows and in ~/.local/bin on Linux, and check that the path:line:col target is passed unchanged. The launcher, editor label and contracts tests pass. Checked px0 v0.1.4's CLI by hand; the change hasn't been clicked through in a running app.

Before After
before-full after-full

Done by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Px0 as an option in the editor picker.
    • Added support for opening paths in Px0 on macOS, Windows, and Linux. On Windows, the app uses px0.exe.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@donnes donnes closed this Sep 25, 2026
@donnes
donnes deleted the feat/px0-editor branch September 25, 2026 13:45
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 25, 2026
@donnes
donnes restored the feat/px0-editor branch September 25, 2026 13:47
@donnes donnes reopened this Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −6 B (−0.0%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +2 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.5 KiB 6.4 KiB −8 B (−0.1%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.3 KiB 56.2 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB +3 B (+0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −3 B (−0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +6 B (+0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: 1147aab · PR result: c4bf8eb · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: codemode-studio/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3cbedfa4-5935-4aa5-b779-919cfc617f2b

📥 Commits

Reviewing files that changed from the base of the PR and between 1147aab and c4bf8eb.

📒 Files selected for processing (4)
  • apps/server/src/process/externalLauncher.test.ts
  • apps/web/src/components/Icons.tsx
  • apps/web/src/components/chat/OpenInPicker.tsx
  • packages/contracts/src/editor.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The editor registry now includes Px0 with direct-path launching. The chat editor picker displays Px0 with its icon when available. Launcher tests cover the Linux installation path and PATH discovery on macOS and Windows, including non-shell launches.

Changes

Px0 editor support

Layer / File(s) Summary
Register and test Px0 launching
packages/contracts/src/editor.ts, apps/server/src/process/externalLauncher.test.ts
The editor registry adds Px0 with the px0 command and direct-path launch style. Tests cover Linux installation-path arguments and PATH discovery on macOS and Windows.
Add Px0 to the editor picker
apps/web/src/components/Icons.tsx, apps/web/src/components/chat/OpenInPicker.tsx
The picker adds a Px0 option with its icon. The option is included when availableEditors contains px0.

Priority: ➖ Normal

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

Change: Feature

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to c4bf8

No actionable issue is established for this change; it is mergeable after normal checks. Px0 may leave a server running after its browser tab closes.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to c4bf8

Opening a project in px0 can leave a server running after the launch completes. The application does not manage that server’s lifetime, and the available evidence does not establish how its listener is protected. No exploitable exposure has been verified.

Retained concerns

  • Medium · security · inferred: The new px0 option can initiate a separate browser-backed server on each launch, while the existing launcher unreferences the process and retains no lifecycle handle. Repeated or interrupted launches may leave servers outside application cleanup; their listener exposure and authentication remain unverified.
Security review details

Security Blast Radius

  • inferred — The supported scope is a host on which px0 is installed and a caller able to invoke the authorized launch RPC. Each successful launch starts an external process with a caller-supplied target; network reachability beyond that host is unknown.

Security Findings and Attack Paths

  • inferred — An authorized caller can supply a non-empty target path that the launcher forwards to px0. Whether px0 then makes that path available to another party depends on unverified listener and authentication behavior; this is an exposure question, not a verified vulnerability.

Trust Boundaries and Controls

  • observed — Server-side command resolution and availability checks remain in the launch path. The checked px0 launches use a non-shell command, and the picker’s remote-link branch does not invoke this server launch for px0.

Resilience and Maintainability Implications

  • inferred — Because availability discovery tracks executables rather than running children, it does not bound repeated px0 servers; cancellation, post-spawn failure, and recovery are not controlled by the inspected launcher path.

Hardening Proposals

  • proposed — Before relying on this integration for sensitive projects, verify px0’s bind address, authentication, and path-serving behavior in the supported installation; establish an owner or documented cleanup and reuse policy for servers left running after launch.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
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.
Title check ✅ Passed The title clearly identifies the primary change: adding support to open projects in px0 when its CLI is installed.
Description check ✅ Passed The description clearly explains what changed, why px0 was added, platform behavior, limitations, tests, and UI changes with before-and-after screenshots. It does not reproduce the template headings o…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

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

@donald-purpose donald-purpose left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed c4bf8eb against main at 1147aab.

Standards

One PR evidence item: please add before/after images showing the Open picker with px0 installed. Both AGENTS.md under Pull requests and CONTRIBUTING.md require images for UI changes. This PR adds a visible picker option and icon, but the description has no images. This is an evidence gap, not a functional defect.

No actionable code-standard violations found. The change follows the existing registry and picker patterns and includes focused launcher tests.

Spec

No actionable deviations from the PR description found. Discovery, labels, preferences, and launch arguments use the existing shared paths. Web and desktop share the picker; px0 stays excluded from remote-links mode because it has no remote scheme. Mobile and provider adapters need no changes for this picker addition.

Validation: launcher and editor-label tests passed, with 45 passed and 1 skipped. I also inspected px0 v0.1.4's target parser, which accepts file:line:column. No browser or real Windows launch verification was performed.

Standards: 1 evidence item, missing UI images. Spec: 0 findings.

Reviewed by GPT-6-Astra through the Codex harness.

@donnes
donnes merged commit a29e9f9 into main Sep 25, 2026
20 of 22 checks passed
@donnes
donnes deleted the feat/px0-editor branch September 25, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 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.

2 participants