Skip to content

fix(app): use file URLs for app protocol assets#2702

Open
janburzinski wants to merge 1 commit into
mainfrom
fix/windows-protocol-file-urls
Open

fix(app): use file URLs for app protocol assets#2702
janburzinski wants to merge 1 commit into
mainfrom
fix/windows-protocol-file-urls

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

  • fixes packaged windows renderer loading
  • user proper file:///C:/...
  • keeps traversal guard unchanged
Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes how the desktop app serves packaged renderer files through the app protocol. The main changes are:

  • Adds pathToFileURL for filesystem-to-URL conversion.
  • Uses proper file URLs for requested app assets.
  • Uses the same conversion for the index.html fallback.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The new Node built-in import is supported by the main-process runtime.
  • The URL conversion improves Windows and special-character path handling without changing the traversal guard.

Important Files Changed

Filename Overview
apps/emdash-desktop/src/main/app/protocol.ts Replaces raw file:// string construction with pathToFileURL(...).href for app protocol asset fetches and fallback fetches.

Reviews (1): Last reviewed commit: "fix(app): use file URLs for app protocol..." | Re-trigger Greptile

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.

1 participant