$ account nook-browser
Nook is a native macOS web browser built entirely with SwiftUI and WebKit (WKWebView) — not a wrapper around Chromium. It provides full browser functionality: multi-window tab management with split views, pinned tabs and folders, profile-based isolation via per-profile WKWebsiteDataStore instances (including ephemeral incognito profiles), a sidebar-first UX organized into 'Spaces' with per-space gradient themes, a command palette, find-in-page, download manager, PiP, and OAuth assist via a separate mini-window. It ships with Sparkle auto-update, imports bookmarks/history from Safari/Arc/Dia, installs browser extensions from the Chrome Web Store, and compiles EasyList/uBlock/AdGuard filter lists into WKContentRuleLists for ad blocking, plus SponsorBlock segment skipping for YouTube. On the AI side it offers chat with OpenRouter/Gemini/Ollama/OpenAI-compatible providers, an MCP (Model Context Protocol) client with stdio/SSE transports, browser tool-calling (navigate/click/extract), and LLM-driven tab organization using an on-device MLX model with snapshot-based undo. Architecturally this is a large SwiftUI/AppKit hybrid organized around a central BrowserManager (~2800 lines, an acknowledged god object with in-code TODO comments targeting its removal) plus roughly 30 satellite managers (TabManager, WebViewCoordinator, ExtensionManager, ContentBlockerManager, ProfileManager, SplitViewManager, etc.). Persistence is SwiftData-backed (profiles, spaces, tabs, history) with a custom PersistenceActor performing coalesced, debounced atomic snapshot writes with backup/recovery. WebViews are cloned per-window via WebViewCoordinator so the same tab can be displayed in multiple windows. Extension support uses the native WKWebExtension APIs (macOS 15.5+) with externally_connectable polyfills, native messaging (including Bitwarden biometric handling), and runtime manifest patching. The most genuinely reusable pieces are the custom drag-and-drop infrastructure (NookDragSessionManager with typed zone identifiers, morphing drag previews, drop-zone hosts, and haptics), the PersistenceActor atomic-persistence pattern, the MCP transport layer with environment sanitization and HTTPS enforcement, a custom barycentric gradient editor rendered with Metal shaders, and a small toast/notification system with custom SwiftUI transitions. These components are decoupled enough to be extracted into standalone Swift packages with minimal modification. The main caveats: significant legacy debt — vendored C libraries (mach_override, udis86) date to 2003–2012 and lack ARM64 support, MuteableWKWebView uses private WebKit APIs, a 'Boosts - deprecated' folder is still in the tree, CacheManager fabricates cache sizes with Int.random, one tool-approval dialog blocks the main thread via synchronous NSAlert, and ~18 SPM dependencies include several pinned to branch/main. Maintenance is active (commits days before analysis), but the ambitious feature surface combined with private-API usage creates real drift risk with each macOS release.