Skip to content

fix: support project opening on headless hosts - #337

Merged
danyaberezun merged 8 commits into
mainfrom
inspect-issue-328
Sep 1, 2026
Merged

fix: support project opening on headless hosts#337
danyaberezun merged 8 commits into
mainfrom
inspect-issue-328

Conversation

@danyaberezun

@danyaberezun danyaberezun commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • distinguish native folder-picker cancellation from display and execution failures
  • recover headless and remote project opening with an in-browser host-path dialog and an always-available manual action
  • accept absolute host paths plus ~ while rejecting ambiguous relative paths

Closes #328

Changes

Host picker

  • detect Linux hosts without DISPLAY or WAYLAND_DISPLAY before launching a graphical picker
  • classify picker results from exit code and diagnostics instead of treating every non-zero Linux exit as cancellation
  • fall through to another picker after execution failure while preserving genuine cancellation as { path: null }
  • keep the existing wire shape and surface failures through the existing rejected-request path

Browser recovery

  • add an Open project from host path dialog with the host failure reason, autofocus, and keyboard submission
  • add Enter host path… to both Add Project entry points
  • ignore late replies from superseded native pickers so an invisible host dialog cannot later switch projects
  • reuse the existing open/inspect/init orchestration for manual paths

Host path handling

  • resolve exact ~ and ~/… against the host account
  • apply one path policy across project open, inspect, and initialization
  • reject other relative paths instead of interpreting them against the host process cwd

Specs and coverage

  • update the dialog, projects, panels, and e2e specs
  • cover headless preflight, cancellation, diagnostic failure, picker fallback, path expansion, relative-path rejection, explicit manual opening, and automatic browser recovery

Testing

  • bun run check:deps — passed
  • bun run check:seams — passed
  • bun run lint — passed
  • bun run typecheck — 11/11 package tasks successful
  • bun run test — 11/11 package tasks successful
  • THINKRAIL_E2E_SHARDS=4 bun run e2e — 300 passed across 4 shards
  • bun run e2e -- --last-failed — 2/2 unrelated timing failures from the initial 8-shard run passed in isolation before the complete 4-shard run

Screenshots

Add Project menu

Before After
Before: Add Project menu without a remote host-path action After: Add Project menu with Enter host path

Headless picker result

Before After
Before: picker failure returns silently to Welcome After: picker failure opens host-path recovery with its reason

@jetbrains-air jetbrains-air 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.

Approved — ready to merge.

@rsolmano Rinat S (rsolmano) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two issues to address before merge.

Comment thread apps/web/src/panels/useOpenProject.tsx Outdated
Comment thread e2e/projects.spec.ts Outdated
ThinkRail-Todo: 01a04548-102b-7818-9ce5-dd6120f81590/t_ec7eae16767f
ThinkRail-Todo: 01a04548-102b-7818-9ce5-dd6120f81590/t_e6c5958c80c4
ThinkRail-Todo: 01a04548-102b-7818-9ce5-dd6120f81590/t_c1d131422b70
ThinkRail-Todo: 01a04548-102b-7818-9ce5-dd6120f81590/t_69240aa4e5a1
ThinkRail-Todo: 01a05d22-3e90-77fd-93fe-3112b2b3f731/t_3e3c43938d33
ThinkRail-Todo: 01a05d22-3e90-77fd-93fe-3112b2b3f731/t_0f70fe270bb0

@jetbrains-air jetbrains-air 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.

Approved — ready to merge.

@jetbrains-air jetbrains-air 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.

Approved — ready to merge.

@danyaberezun
danyaberezun added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit dff3f51 Sep 1, 2026
6 checks passed
@danyaberezun
danyaberezun deleted the inspect-issue-328 branch September 1, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Open project" button fails silently on headless / remote Linux hosts (zenity failure swallowed as cancellation)

2 participants