Skip to content

Comments

refactor: extension#299

Merged
judekim0507 merged 7 commits intonook-browser:devfrom
judekim0507:dev
Feb 17, 2026
Merged

refactor: extension#299
judekim0507 merged 7 commits intonook-browser:devfrom
judekim0507:dev

Conversation

@judekim0507
Copy link
Member

@judekim0507 judekim0507 commented Feb 17, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Chrome Web Store button to Extensions menu for easier extension discovery and installation
    • Expanded extension capabilities for tabs including reload, URL loading, muting, and zoom control
  • Improvements

    • Extensions feature is now fully enabled and no longer experimental
    • Enhanced Extensions settings interface with improved integration

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request removes the experimental extensions feature gate throughout the codebase, making extensions a standard feature available on macOS 15.5+. It also refactors WebView configuration management, improves extension lifecycle handling, adds new tab and window adapter methods, and introduces logging enhancements.

Changes

Cohort / File(s) Summary
Feature Gate Removal
App/NookCommands.swift, Nook/Components/Sidebar/TopBarView.swift, Nook/Components/Sidebar/URLBarView.swift, Nook/Models/Tab/Tab.swift, Settings/NookSettingsService.swift
Removes experimentalExtensions conditional checks throughout the codebase. Extensions now render based on macOS 15.5 availability and extension manager presence, independent of feature flags. Removes the experimentalExtensions property entirely from NookSettingsService.
Settings UI Refactoring
Nook/Components/Settings/SettingsView.swift
Changes ExtensionsSettingsView to require an ExtensionManager parameter via @ObservedObject, removing optional unwrapping and conditional "unavailable" states. Eliminates DISABLED blocks and streamlines extension content rendering.
Extension Handling & Lifecycle
Nook/Components/Extensions/ExtensionActionView.swift, Nook/Models/Tab/Tab.swift
Adds OS logging via Logger for extension actions. Refactors action invocation to always resolve tab adapter and call performAction unconditionally. Introduces background content wake flow, extends extension lifecycle notifications (TabActivated), adds extension state diagnostics, and cancellation handling via extensionAwaitCancellable.
Extension Bridge API Expansion
Nook/Managers/ExtensionManager/ExtensionBridge.swift
Removes internal timing/state flags (isProcessingTabsRequest, lastActiveTabCall, lastTabsCall). Adds new public methods to ExtensionTabAdapter: reload(fromOrigin:for:completionHandler:), loadURL(_:for:completionHandler:), setMuted(_:for:completionHandler:), setZoomFactor(_:for:completionHandler:), zoomFactor(for:), shouldGrantPermissionsOnUserGesture(for:). Implements identity-based equality and hashing in ExtensionTabAdapter. Adds isPrivate(for:) and windowState(for:) to ExtensionWindowAdapter.
Configuration Management Simplification
Nook/Managers/WebViewCoordinator/WebViewCoordinator.swift, Nook/Models/BrowserConfig/BrowserConfig.swift
Reworks WebView configuration to derive from existing webview configuration or shared cached configuration instead of building from scratch. Introduces per-webview fresh WKUserContentController to prevent handler conflicts. Removes legacy preference setups and centralizes configuration inheritance around copying the shared base configuration with per-tab isolation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 Extensions hop free without gates today,
No experimental flags to hold them at bay!
Configuration flows cleaner, lifecycle more bright,
The bridge expands with methods—a web-worthy sight!
Nook's built stronger now, ready to play. 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@judekim0507 judekim0507 changed the title !review refactor: extension code cleanup refactor: extension Feb 17, 2026
@judekim0507 judekim0507 marked this pull request as ready for review February 17, 2026 07:56
@judekim0507 judekim0507 merged commit 0f94183 into nook-browser:dev Feb 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant