Skip to content

fix(electron): detect available session path launchers - #73

Merged
Leeeon233 merged 1 commit into
LodyAI:mainfrom
Pleasurecruise:fix/editor-probe
Aug 30, 2026
Merged

fix(electron): detect available session path launchers#73
Leeeon233 merged 1 commit into
LodyAI:mainfrom
Pleasurecruise:fix/editor-probe

Conversation

@Pleasurecruise

@Pleasurecruise Pleasurecruise commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Related issue

Fix #138

Problem / pressure

The Session header advertised every platform-compatible path launcher, even when the corresponding editor or URL protocol was not installed on the local machine. Selecting one then failed only after the user tried to launch it.

Summary

  • Add a validated Electron IPC probe for path-launcher availability.
  • Resolve command candidates through the user's cached shell PATH, platform executable rules, known absolute fallbacks, macOS application lookup, and registered URL protocols.
  • Filter the Session header launcher button and menu to the launcher IDs confirmed by the main process.
  • Keep invalid stored custom launcher templates out of probe requests.

Before / after

Before After
Shows all supported editors, even if they are not installed. Shows only editors installed on this machine.
Before: all supported editors are shown After: only installed editors are shown

Test plan

  • node --disable-warning=MODULE_TYPELESS_PACKAGE_JSON --experimental-strip-types --test src/main/services/local-path-launcher-core.test.mjs — 5 tests passed.
  • Electron package test run reached 45 passing tests; the unrelated Loro data-plane test could not start because this worktree lacked the linked zod dependency.
  • The focused components test could not start because this worktree lacked its linked Vitest module.
  • No further tests were run after the final diff-only review, per the author-side user's instruction.

Context handoff

Instructions for reviewing agents

  • Review focus: Check the probe boundary in app-ipc.ts, cross-platform command discovery in local-path-launcher-service.ts, and filtering lifecycle in session-chat-interface.tsx.
  • Decisions to challenge: Verify that a five-minute per-command/protocol cache is the right balance for multiple mounted Session surfaces.
  • Plausible failures / evidence gaps: Windows and Linux discovery paths were reviewed but not exercised on those operating systems, and the components test runner was unavailable in the worktree.

Authoring context

  • User goal / directives: Make the Session header dynamically show only locally available editors and keep the uncommitted change small and necessary.
  • Constraints / non-goals: Do not broaden launcher behavior, add cloud dependencies, or retain temporary file moves and duplicate tests.
  • Risk-bearing decisions: Availability is determined in Electron main from commands, fallbacks, macOS application lookup, and registered URL protocols, then cached for five minutes.
  • Destructive or irreversible behavior: The change only probes local availability and filters UI options; it performs no destructive or irreversible action.
  • Deliberately not done or tested: No further tests were run after the author-side user requested diff-only review; Windows and Linux runtime probing was not exercised.
  • Unknowns / confidence: Confidence is high in the IPC and filtering flow; residual risk is platform-specific command and protocol discovery behavior.

@github-actions github-actions Bot added scope: desktop scope: shared scope: components status:needs-pr-body PR body does not meet the contribution template status:pr-too-large External PR over 200 changed lines needs a prior issue within seven days labels Aug 27, 2026
@github-actions github-actions Bot removed status:needs-pr-body PR body does not meet the contribution template status:pr-too-large External PR over 200 changed lines needs a prior issue within seven days labels Aug 28, 2026
@Leeeon233

Copy link
Copy Markdown
Contributor

This is a good feature! Thanks

@Leeeon233
Leeeon233 merged commit 1f9abeb into LodyAI:main Aug 30, 2026
9 checks passed
@Pleasurecruise
Pleasurecruise deleted the fix/editor-probe branch August 30, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Hide unavailable session path launchers

2 participants