Skip to content

Releases: lynnswap/WebInspectorKit

v0.3.0

Choose a tag to compare

@lynnswap lynnswap released this 08 Jul 09:01
aaa9a7b

WebInspectorKit v0.3.0

Breaking Changes

  • Replaced the public SDK product split: WebInspectorCore, WebInspectorTransport, WebInspectorNativeBridge, WebInspectorNativeSymbols, and WebInspectorUI are no longer public library products.
  • Introduced WebInspectorProxyKit, WebInspectorDataKit, and WebInspectorProxyKitTesting as the supported SDK layers. WebInspectorKit remains the built-in UIKit inspector product.
  • Moved native bridge, symbol resolution, and transport internals behind WebInspectorProxyKit; SDK consumers should no longer import those implementation targets directly.

New Features

  • Added WebInspectorProxyKit with WebInspectorProxy, WebInspectorTarget, typed DOM/CSS/Network/Console/Runtime/Page command clients, and domain event streams.
  • Added WebInspectorDataKit with WebInspectorContainer, WebInspectorContext, observable DOM, Network, Console, Runtime, and CSS models, fetched results APIs, and typed domain controllers.
  • Added WebInspectorProxyKitTesting for exercising ProxyKit/DataKit consumers without the native WebKit bridge.
  • Added DataKit-backed DOM tree snapshots, DOM editing operations, CSS style sections/property editing, Runtime object models, Console messages, Network request queries, redirects, body fetch state, and WebSocket lifecycle state.

Improvements

  • Rebuilt the built-in UIKit inspector on top of DataKit while keeping the app-facing WebInspectorViewController / WebInspectorSession facade.
  • Improved DOM rendering and updates with streamed tree snapshots, mutation deltas, selection reveal handling, picker highlight restoration, and undo/redo handling.
  • Improved Network list performance and correctness with fetched-results-driven updates, off-main request diffing, stable filtering/searching, redirect preservation, and body preview fetch lifecycle handling.
  • Hardened ProxyKit target routing, current-page retargeting, event stream closure, command reply decoding, and navigation lifecycle recovery.
  • Hardened native inspector symbol resolution on older iOS runtimes.

Bug Fixes

  • Fixed stale async Network request updates from mutating retired request identities.
  • Fixed selection and content cache invalidation across filters, context changes, detach, retarget, and presentation lifecycle changes.
  • Fixed CSS hydration, stale style refreshes, hidden CSS protocol payload exposure, and selected-style invalidation after DOM/CSS changes.
  • Fixed DOM picker selection highlighting, frame document projection, keyboard commands, multi-delete undo behavior, and stale undo/redo actions.
  • Fixed target-scoped Console, DOM, Runtime, Network, and CSS protocol state across page/frame retargeting.

Documentation

  • Updated README and architecture docs for the new WebInspectorProxyKit / WebInspectorDataKit / WebInspectorKit SDK split.
  • Added ProxyKit and DataKit package READMEs.
  • Added WebKit runtime version mapping notes.

Migration Notes

  • Use WebInspectorKit for the built-in UIKit inspector UI.
  • Use WebInspectorDataKit for custom UIs that want observable inspector models.
  • Use WebInspectorProxyKit for custom UIs that want typed protocol commands/events directly over an inspected WKWebView.
  • Remove imports of WebInspectorCore, WebInspectorTransport, WebInspectorNativeBridge, WebInspectorNativeSymbols, and WebInspectorUI from SDK consumer code.

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@lynnswap lynnswap released this 22 Jun 02:58
1fd3f5d

WebInspectorKit v0.2.0

Breaking Changes

  • Replaced the old SwiftUI WebInspectorView / WebInspectorModel integration with UIKit WebInspectorViewController and WebInspectorSession.
  • Replaced attach(webView:) with attach(to:); explicit detach is now async via detach().
  • Removed the old SwiftUI tab builder API (WITab, WITabBuilder, WIDefaultTab). Built-in tabs are now .dom and .network, and custom tabs use WebInspectorTab.
  • Raised the required Swift tools version to Swift 6.3+.
  • The app-facing inspector UI now targets UIKit on iOS. The previous AppKit inspector UI is no longer shipped.
  • Replaced injected JavaScript inspector agents with WebKit's native inspector runtime. Apps no longer need to enable page JavaScript solely for WebInspectorKit or manage inspector script injection ordering.

New Features

  • Added WebInspectorViewController for presenting the inspector from UIKit.
  • Added WebInspectorSession for apps that need explicit attachment lifecycle ownership.
  • Added UIKit custom tab support with WebInspectorTab(id:title:image:makeViewController:) and WebInspectorTab(id:title:systemImage:makeViewController:).
  • Added separate package products for WebInspectorCore, WebInspectorUI, WebInspectorTransport, WebInspectorNativeBridge, and WebInspectorNativeSymbols, while WebInspectorKit continues to re-export the app-facing UI.
  • Added native inspector transport support for DOM, CSS, Console, Runtime, Network, and Target domains.

Improvements

  • Rebuilt the DOM and Network inspector surfaces as native UIKit controllers.
  • Improved DOM tree rendering, selection/highlight handling, and element style presentation.
  • Improved Network request logging, detail presentation, body previews, media previews, and compact/regular navigation behavior.
  • Added a migration guide for upgrading from v0.1.5.

Migration Notes

  • Replace WebInspectorView usage with WebInspectorViewController, or host it from SwiftUI with your own UIViewControllerRepresentable.
  • Replace WebInspectorModel lifecycle ownership with WebInspectorSession when needed.
  • Replace custom SwiftUI WITab content with UIKit view controller-backed WebInspectorTab values.
  • Remove app-side configuration for snapshot depth, subtree depth, and DOM auto-update debounce; those policies are now owned by the native runtime.
  • Remove assumptions and workarounds tied to injected inspector JavaScript agents.

Full Changelog: v0.1.5...v0.2.0

v0.1.5

Choose a tag to compare

@lynnswap lynnswap released this 23 Jan 03:38
b695784

WebInspectorKit v0.1.5

Bug Fixes

  • Fix network agent state management
  • Fix agent type errors
  • Honor compact snapshot when event limit hits
  • Apply filter after deferred child renders complete
  • Preserve layout info in large mutation batches
  • Refresh selection details for ancestor updates
  • Fail fast when protocol handler is missing
  • Fix DOMTreeView script bundle

Improvements

  • Refactor DOM tree for improved performance (split modules for better maintainability)
  • Bundle DOM/Network agent scripts and align filenames to kebab-case

Other Changes

  • Prefer ESNext module kind for ObfuscateJS TS transpile

Full Changelog: v0.1.4...v0.1.5

v0.1.4

Choose a tag to compare

@lynnswap lynnswap released this 21 Jan 08:56
cd0173c

WebInspectorKit v0.1.4

Improvements

TypeScript Migration for WebInspector Scripts

  • Migrate all WebInspector JavaScript files to TypeScript sources (.ts)
  • Remove @ts-nocheck annotations to enable full type checking
  • Add WebInspector.d.ts type declarations for better IDE support

Build System Enhancement

  • Add WebInspectorKitObfuscatePlugin to bundle and obfuscate scripts from TypeScript sources at build time
  • Include ObfuscateJS tooling for script processing

DOMTreeView Script Injection

  • Allow DOMTreeView scripts to be injected into custom WKWebViewConfiguration instances
  • Add installDOMTreeViewScriptsIfNeeded(on:) to support configurations passed to WIWebView

Other Changes

  • Ignore node_modules directory in ObfuscateJS tool

Full Changelog: v0.1.3...v0.1.4

v0.1.3

Choose a tag to compare

@lynnswap lynnswap released this 21 Jan 04:33
32da3f2

What's New

Network Body Preview

  • Added response body preview for network requests
  • JSON responses are displayed in a structured, navigable format
  • Supports navigation within compact network detail views

Improvements

  • Refined JSON preview layout with improved array index labels
  • Better handling of empty JSON responses
  • Fixed background appearance issues in network views
  • Bound network navigation path to view model for improved state management

Internal

  • Refactored network body preview and fetch handling
  • Simplified super clear background styling

Full Changelog: v0.1.2...v0.1.3

v0.1.2

Choose a tag to compare

@lynnswap lynnswap released this 23 Dec 09:03
716de4a

What's Changed

  • Add network request type filtering with toolbar toggles and active-state tinting.
  • Introduce environment-driven network filters and per-entry filter state.
  • Modernize network/DOM agent payload handling with JSONDecoder and batch parsing improvements.
  • Update localization strings for the new network filtering UI.

Testing

  • swift build

Full Changelog: v0.1.1...v0.1.2

v0.1.1

Choose a tag to compare

@lynnswap lynnswap released this 17 Dec 05:16
30bfb03

What's Changed

  • BREAKING: Network agent now delivers HTTP events via webInspectorNetworkUpdate (replacing the previous HTTP update handlers).
  • Send network resets via a dedicated webInspectorNetworkReset handler for immediate state resets.
  • Normalize request/response body capture across fetch/XHR and preserve truncation flags.
  • Introduce a shared request/response body cache with a 200MB global cap to bound memory usage.
  • Update network agent tests to match the new message handler interface.

Testing

  • swift test

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@lynnswap lynnswap released this 16 Dec 14:39
70055e6

What's Changed

  • Add full Network inspector with recording/clearing controls, detail view, body fetch/truncation, and keyword search
  • Introduce dedicated DOM/Network agents, stores, and view models; wrap inspector tabs in NavigationStack and rename Detail tab to Element
  • Expose WIDefaultTab and WITab builder conveniences for custom tab composition
  • Add AppKit inspector tabs via NSTabViewController and ship a MiniBrowser sample app
  • Expand localization coverage for inspector UI strings and refresh README for network features/limitations
  • Add DOM/Network agent and view model tests covering attach lifecycle, session resets, and payload application

Testing

  • swift test

Full Changelog: v0.0.2...v0.1.0

v0.0.2

Choose a tag to compare

@lynnswap lynnswap released this 02 Dec 03:26
e793dd6

What's Changed

  • Preserve inspector state when reattaching the same web view to avoid unnecessary reloads (#13)
  • Detach the inspector if the mutation update handler is unavailable, preventing stale sessions (#13)
  • Guard WebKit message handlers with optional chaining for safer snapshot updates (#13)
  • Standardize inspector log prefix to [WebInspectorKit] in DOM snapshot workflow (#13)

Full Changelog: v0.0.1...v0.0.2

v0.0.1

Choose a tag to compare

@lynnswap lynnswap released this 29 Nov 20:21

Overview

iOS-ready Web Inspector for WKWebView. SwiftUI-friendly and easy to add.

Requirements

  • Swift 6.2+
  • iOS 18 / macOS 15+
  • WKWebView with JavaScript enabled

Usage

  • Create a WebInspectorModel and place WebInspectorView with your target WKWebView.
  • See the README for details.

Limitations

  • APIs are early-stage and may change.
  • DOM rendering can take time on some pages.