Redesign WebInspectorKit ownership and model APIs - #230
Conversation
Make fetched-results updates self-contained and newest-one bounded, remove the forwarding controller, and migrate Network UI to consume results directly. Order NetworkRequestIndex mutations by contiguous sequence and retain per-result checkpoints so overlapping property updates cannot be lost. BREAKING CHANGE: Remove WebInspectorFetchedResultsController and parameterize fetched-results transactions by item ID.
BREAKING CHANGE: domain event scopes now use connection-owned capability leases, bounded buffering, and fail-fast lifecycle semantics.
BREAKING CHANGE: DOM, CSS, Network, Console, Runtime, and Page are now target-scoped domain handles; nested Client types were removed.
Start the DataKit consumer before capability activation and keep the authoritative model feed lossless so snapshot-to-delta continuity cannot fail under valid event bursts. BREAKING CHANGE: WebInspectorModelContext.Failure no longer exposes feedBufferOverflow because the authoritative model feed no longer drops records.
Make each CSS declaration an actor-confined observable model, serialize refresh and mutation work, and update only the submitted property during a toggle. Keep collection snapshots topology-only, rebind visible rows directly when positional backend IDs are reused, and reject stale declaration handles after structural edits. BREAKING CHANGE: CSSStyleProperty is now an observable reference type, and CSSStyleSection, CSSStyle, and CSSStyleRule are no longer Sendable.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0955bd5af7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Purpose
Make WebInspectorDataKit and WebInspectorProxyKit easier to use and maintain by giving model state, command authority, event delivery, and lifecycle transitions explicit owners. This is an intentional breaking redesign targeting iOS 18.4 and macOS 15.4.
Changes
Developer impact
This PR removes obsolete controllers, forwarding APIs, cold event APIs, and legacy semantic test backends. Existing clients must migrate to WebInspectorModelContext, domain handles, scoped event APIs, and the new query contracts described in Docs/MIGRATION.md. CSSStyleProperty is now an observable reference type; CSSStyleSection, CSSStyle, and CSSStyleRule are no longer Sendable.
Testing
xcodebuild test -workspace WebInspectorKit.xcworkspace -scheme WebInspectorKit -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest'swift test --sanitize=thread: 318 tests passed with no reported racecodex-reviewcompleted with no findings