fix(desktop): ship a bundle that parses on WebKit without lookbehind (Intel/macOS 12) - #5547
arielhauter wants to merge 4 commits into
Conversation
|
Confirming this PR's diagnosis against the current release, on Intel hardware different from the ones already in the thread. I have not built the PR, so this confirms the analysis and its mapping onto the current tag, not the fix itself. Environment
The last confirmation against a release DMG in #3295 was v0.5.5 (7 Aug). The four changes still map exactly onto
|
|
Hi! I have a MacBook Pro 13" Early 2015, Intel i5, 8 GB RAM, running macOS 12.7.6. The official Buzz 0.5.23 x64 DMG opens to a blank window, and older releases have the same issue. I saw that you successfully tested the WebKit fix on Intel Monterey. Would you be able to share the patched x64 DMG or a downloadable build artifact? I’m not a developer, and building from source on this old Mac requires a large toolchain that I’m struggling to install. Thank you! |
|
@arielhauter a practical question, as one of the people waiting on this. GitHub now reports the branch as conflicting with Since maintainers generally skip conflicted PRs during triage, the rebase looks like the real blocker right now rather than reviewer attention. Are you still planning to pick this back up? If not, would you mind saying so, so someone else can carry the same four commits forward rather than leaving it stalled? State of things as of today, for whoever looks next: |
Hi @aurelie-brebant yes I'll revisit this tomorrow and get it up-to-date! Appreciate your shared focus on it... @XIII-EOG I'll see if I can get you a downloadable build tomorrow... |
Signed-off-by: Ariel Hauter <arielhauter@gmail.com>
Signed-off-by: Ariel Hauter <arielhauter@gmail.com>
Signed-off-by: Ariel Hauter <arielhauter@gmail.com>
Signed-off-by: Ariel Hauter <arielhauter@gmail.com>
8d26fac to
189e502
Compare
🔐 Codex Security Review
|
|
"@XIII-EOG I'll see if I can get you a downloadable build tomorrow..." Hello, sir! Sounds perfect, waiting forward. Huge thank you!!! |
|
@XIII-EOG CI on this PR needs maintainer approval before it runs, so no CI artifact yet. I've published my rebased build as a release on my fork (so you can download the DMG from there, if have any issues, just let me know and I'll send it another way): https://github.com/arielhauter/buzz/releases/tag/v0.5.23-macos12-webkit-fix SHA-256 and install steps are in the release notes. It's built from |
|
@tlongwell-block — tagging you since #748 added the Intel x64 DMG release target and this PR fixes the blank window on the macOS 12 machines that target ships to. It's rebased and conflict-free, with three users waiting on this thread (#3295). Could someone on the team approve the workflow runs so CI can verify it? Happy to make any changes review turns up. |
Summary
Buzz Desktop renders a blank window on Macs whose system WebKit predates Safari 16.4: the shipped bundle contains RegExp lookbehind patterns, and older WebKit fails at parse time, so the frontend never renders. This matches the symptom in #3295, and matters because the project ships and promotes Intel DMGs (#748 added the x86_64 release target; #2090 steers Safari users to the right DMG) while the app declares minimum macOS 10.15.
Four changes make the bundle lookbehind-free:
desktop/vite.config.ts— build target["es2020", "safari15"], so the toolchain lowers syntax for pre-16.4 WebKit.mentionHighlightExtension.ts— rewrite the two mention/channel patterns using a boundary capture group instead of lookbehind, with a prefix-length offset fix infindHighlightMatches.KeyboardShortcutsCard.tsx— replace the lookbehind/lookahead key-combo split with a smallsplitKeyCombohelper (same behavior).patches/mdast-util-gfm-autolink-literal@2.0.1.patch— the dependency ships pre-bundled code with a lookbehind in the email-autolink pattern; patched via the existingpatches/convention, since a build target cannot rewrite it.Because the failure is at parse time, one pattern anywhere blanks the whole app — that is why both the build target and the source/dependency rewrites are needed.
Trade-offs, stated honestly: (a) the
safari15target affects all platforms, not only macOS 12; (b) the dependency patch slightly changes email-autolink edge behavior everywhere, relying on the package's boundary guard instead of the lookbehind — the ideal fix is upstream in micromark, this is the interim.Heads-up: #4701 (open) introduces a new negative lookbehind in the bare-URL pattern; the same portability concern applies there.
Related issue
Relates to #3295 — same blank-render symptom; note the original report is arm64/Safari 17.6, which may be a separate cause. This PR fixes the lookbehind parse failure affecting pre-16.4 WebKit. Before opening I searched existing PRs/issues for "macOS 12", "Intel", "lookbehind" — closest existing PR: none found.
Testing
grep -rln -E '\(\?<[=!]'over the builtBuzz.appResources: clean.just desktop-test: 4,604 tests pass.just desktop-tauri-test: pass.just desktop-release-build x86_64-apple-darwinon current main (post-0.5.9).