Skip to content

Browser: one inspector-dock implementation instead of four; stop duplicating WK delegates in popups #91

Description

@arzafran

The most complex logic in the browser subsystem, detecting and geometrically docking WebKit's private inspector view, is independently reimplemented in BrowserPanel.swift, BrowserPanelView.swift (WebViewRepresentable), BrowserWindowPortal.swift (WindowBrowserSlotView), and partially AppDelegate.swift. Nine separate "WKInspector" string-sniff sites with near-identical divider-scoring math.

Separately, BrowserPopupWindowController.swift re-implements the main browser's WKUIDelegate/WKNavigationDelegate wholesale, admitted in-code as "parity".

Real-world effect: fixes do not propagate across copies; inspector behavior differs by hosting mode. Fix: one canonical inspector-dock owner, one shared delegate implementation. ~500+ lines deletable, closes a correctness gap.


From the 2026-07-09 nuclear review (10 module reviewers + Codex cross-model pass, disprove-first). Line refs are against the reductive-audit branch (PR #81).

Metadata

Metadata

Assignees

No one assigned

    Labels

    nuclear-reviewFrom the 2026-07-09 whole-codebase nuclear reviewtech-debtKnown latent issue / maintenance debt

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions