Releases: lynnswap/WebInspectorKit
Releases · lynnswap/WebInspectorKit
Release list
v0.3.0
WebInspectorKit v0.3.0
Breaking Changes
- Replaced the public SDK product split:
WebInspectorCore,WebInspectorTransport,WebInspectorNativeBridge,WebInspectorNativeSymbols, andWebInspectorUIare no longer public library products. - Introduced
WebInspectorProxyKit,WebInspectorDataKit, andWebInspectorProxyKitTestingas the supported SDK layers.WebInspectorKitremains 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
WebInspectorProxyKitwithWebInspectorProxy,WebInspectorTarget, typed DOM/CSS/Network/Console/Runtime/Page command clients, and domain event streams. - Added
WebInspectorDataKitwithWebInspectorContainer,WebInspectorContext, observable DOM, Network, Console, Runtime, and CSS models, fetched results APIs, and typed domain controllers. - Added
WebInspectorProxyKitTestingfor 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/WebInspectorSessionfacade. - 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/WebInspectorKitSDK split. - Added ProxyKit and DataKit package READMEs.
- Added WebKit runtime version mapping notes.
Migration Notes
- Use
WebInspectorKitfor the built-in UIKit inspector UI. - Use
WebInspectorDataKitfor custom UIs that want observable inspector models. - Use
WebInspectorProxyKitfor custom UIs that want typed protocol commands/events directly over an inspectedWKWebView. - Remove imports of
WebInspectorCore,WebInspectorTransport,WebInspectorNativeBridge,WebInspectorNativeSymbols, andWebInspectorUIfrom SDK consumer code.
Full Changelog: v0.2.0...v0.3.0
v0.2.0
WebInspectorKit v0.2.0
Breaking Changes
- Replaced the old SwiftUI
WebInspectorView/WebInspectorModelintegration with UIKitWebInspectorViewControllerandWebInspectorSession. - Replaced
attach(webView:)withattach(to:); explicit detach is now async viadetach(). - Removed the old SwiftUI tab builder API (
WITab,WITabBuilder,WIDefaultTab). Built-in tabs are now.domand.network, and custom tabs useWebInspectorTab. - 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
WebInspectorViewControllerfor presenting the inspector from UIKit. - Added
WebInspectorSessionfor apps that need explicit attachment lifecycle ownership. - Added UIKit custom tab support with
WebInspectorTab(id:title:image:makeViewController:)andWebInspectorTab(id:title:systemImage:makeViewController:). - Added separate package products for
WebInspectorCore,WebInspectorUI,WebInspectorTransport,WebInspectorNativeBridge, andWebInspectorNativeSymbols, whileWebInspectorKitcontinues 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
WebInspectorViewusage withWebInspectorViewController, or host it from SwiftUI with your ownUIViewControllerRepresentable. - Replace
WebInspectorModellifecycle ownership withWebInspectorSessionwhen needed. - Replace custom SwiftUI
WITabcontent with UIKit view controller-backedWebInspectorTabvalues. - 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
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
WebInspectorKit v0.1.4
Improvements
TypeScript Migration for WebInspector Scripts
- Migrate all WebInspector JavaScript files to TypeScript sources (
.ts) - Remove
@ts-nocheckannotations to enable full type checking - Add
WebInspector.d.tstype declarations for better IDE support
Build System Enhancement
- Add
WebInspectorKitObfuscatePluginto 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
WKWebViewConfigurationinstances - Add
installDOMTreeViewScriptsIfNeeded(on:)to support configurations passed toWIWebView
Other Changes
- Ignore
node_modulesdirectory in ObfuscateJS tool
Full Changelog: v0.1.3...v0.1.4
v0.1.3
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
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
What's Changed
- BREAKING: Network agent now delivers HTTP events via
webInspectorNetworkUpdate(replacing the previous HTTP update handlers). - Send network resets via a dedicated
webInspectorNetworkResethandler 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
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
WIDefaultTabandWITabbuilder conveniences for custom tab composition - Add AppKit inspector tabs via
NSTabViewControllerand 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
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
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.