feat: Safari extension shell — save-only client (issue #26) - #79
Open
paperhurts wants to merge 2 commits into
Open
feat: Safari extension shell — save-only client (issue #26)#79paperhurts wants to merge 2 commits into
paperhurts wants to merge 2 commits into
Conversation
#26) Safari does not implement the browser.bookmarks WebExtension API, so the entire background layer (listeners, reconcile, apply-remote, poll alarm) has nothing to do there. The Safari shell ships popup + options only: Save this page, Save all tabs, and settings all work unchanged via @gitmarks/extension-shared; management happens in the web UI. - packages/extension-safari: MV3 manifest (no background, no bookmarks/alarms perms), plain Vite build with popup/options entries, copy-html/copy-manifest scripts, thin src re-exports - scripts/gen-icons.mjs: add the safari icons dir - README documents the macOS-only conversion (xcrun safari-web-extension-converter), signing options, and the save-only smoke test; generated xcode/ dir is git-ignored - CLAUDE.md: project status + roadmap updated Xcode conversion, signing, and the manual smoke test require macOS and remain outstanding on issue #26. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1P9F4m6dszYGDEfcPVMdj
- README: install section, status, features caveat, packages table, architecture diagram, roadmap - spec.md: amend goal, architecture diagram, and build-order item 10 with the no-browser.bookmarks constraint (dated amendments, history kept) - CLAUDE.md: shells section covers all three shells; also fixes the stale "own HTML files duplicated across shells" bullet (all shells copy HTML from extension-shared via copy-html.mjs) - Chrome/Firefox READMEs: cross-reference the Safari shell Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1P9F4m6dszYGDEfcPVMdj
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.
Summary
Adds
@gitmarks/extension-safari, the last roadmap package (#26).Load-bearing finding: Safari does not implement the
browser.bookmarksWebExtension API at all (Apple dev forums 650614, 658034, 721635; MDN compat). Everything the background layer does in the Chrome/Firefox shells — bookmark listeners, cold-start reconcile, apply-remote, the 5-minute poll alarm — exists to sync the native tree, so none of it can run in Safari.The Safari shell therefore ships no background at all and is a save-only client:
tabs.query+ on-demand optionaltabspermission, both supported by Safaribrowser.storage.localWhat's in the package
Same thin-shell pattern as
extension-firefox: MV3 manifest (nobackgroundkey, nobookmarks/alarmspermissions, CSP restricting connect-src to api.github.com), plain Vite build with popup+options entries only, copy-html/copy-manifest scripts, thinsrc/re-exports from@gitmarks/extension-shared.scripts/gen-icons.mjsnow also emits the safari icons dir.What's NOT in this PR (macOS-only, still open on #26)
xcrun safari-web-extension-converterand Xcode don't run on Windows. The package README documents the full Mac-side flow: convertdist/→ build the wrapper app in Xcode → allow unsigned extensions → enable in Safari, plus signing options and a save-only smoke-test checklist. The generatedxcode/dir is git-ignored (derived output).Test plan
pnpm -r typecheck— all packages passpnpm test— 311 tests pass (no new tests: the shell contains no logic; popup/options logic is covered by extension-shared's suite)pnpm --filter @gitmarks/extension-safari build—dist/contains manifest (verified no background key), popup/options HTML+JS, icons🤖 Generated with Claude Code
https://claude.ai/code/session_01A1P9F4m6dszYGDEfcPVMdj