fix(linux): register posthog-code scheme handler in AppImage builds#2628
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(linux): register posthog-code scheme handler in AppImage builds#2628posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
The MakerAppImage config omitted the `mimeType` option that the deb/rpm makers get via `sharedLinuxOptions`, so the generated AppImage `.desktop` file never declared `x-scheme-handler/posthog-code`. Without it, desktop integration can't route the OAuth callback (`posthog-code://callback`) back to the app and login times out, fully blocking AppImage users. Add `mimeType: ["x-scheme-handler/posthog-code"]` to the AppImage maker so the `.desktop` file declares the handler, matching deb/rpm. Also document, where `setAsDefaultProtocolClient` is called, that its `path`/`args` parameters are Windows-only and ignored on Linux — Linux relies on the packaged `.desktop` MimeType — so a future change doesn't try to "fix" AppImage routing by passing an exec path there (a no-op). Generated-By: PostHog Code Task-Id: f86f368b-dc7b-4da3-ba21-997a04b794ff
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(linux): register posthog-code scheme..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Users on Linux AppImage builds can't log in at all. The OAuth callback comes back via the
posthog-code://custom scheme, but the AppImage's generated.desktopfile never declared thex-scheme-handler/posthog-codehandler, so the OS couldn't route the callback to the app and login timed out — a complete login blocker for that segment. deb/rpm users were unaffected because those makers already declare the handler viasharedLinuxOptions.Changes
mimeType: ["x-scheme-handler/posthog-code"]to theMakerAppImageoptions inapps/code/forge.config.tsso the generated.desktopfile declares the scheme handler (matching the deb/rpm makers).setAsDefaultProtocolClientcall site that itspath/argsparameters are Windows-only and ignored on Linux — Linux registration relies on the packaged.desktopMimeType. This is a deliberate note: the originally-suspected part-2 fix (passing the AppImage exec path tosetAsDefaultProtocolClient) is a no-op on Linux, so the packaging change is the actual remedy.How did you test this?
pnpm --filter code typecheck— passes (confirms the AppImage maker acceptsmimeType).pnpm --filter code test deep-link— 129 passed.pnpm exec biome linton both changed files — clean.Automatic notifications
Created with PostHog Code from an inbox report.