Skip to content

fix(webview): invalidate per-view state after reset and import#981

Open
easonLiangWorldedtech wants to merge 9 commits into
Zoo-Code-Org:mainfrom
easonLiangWorldedtech:feat/cross-tab-state-invalidation
Open

fix(webview): invalidate per-view state after reset and import#981
easonLiangWorldedtech wants to merge 9 commits into
Zoo-Code-Org:mainfrom
easonLiangWorldedtech:feat/cross-tab-state-invalidation

Conversation

@easonLiangWorldedtech

Copy link
Copy Markdown
Contributor

Summary

Invalidate per-view state across all parallel webview instances when a full reset or settings import occurs. This is a sibling follow-up PR that should be reviewed after PR #977 lands.

Blocked until PR #977 (feat/view-local-state-base) lands/rebase.

Changes

  • Reset broadcast: broadcastResetToAllInstances now clears both in-memory and durable view state for all parallel instances
  • Settings import: Added broadcast hook + try/catch wrapper around reset broadcast after settings import completes, ensuring all parallel tabs receive invalidation signals
  • Each instance reloads its merged state from global defaults upon receiving the invalidation

Scope

  • broadcastResetToAllInstances: clear local + durable view state on reset
  • Settings import: wrap reset broadcast in try/catch, ensure all parallel tabs receive invalidation
  • Depends on PR fix(webview): add durable per-view state base #977 (feat/view-local-state-base) for the per-view state foundation

Tests

  • Targeted reset/import tests: 81 passed

Related

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@easonLiangWorldedtech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c8727f4-8099-4b4e-acfb-4623ba28d538

📥 Commits

Reviewing files that changed from the base of the PR and between 3024768 and e7512a0.

📒 Files selected for processing (15)
  • packages/types/src/__tests__/index.test.ts
  • packages/types/src/global-settings.ts
  • packages/types/src/vscode-extension-host.ts
  • src/core/config/__tests__/importExport.spec.ts
  • src/core/config/importExport.ts
  • src/core/webview/ClineProvider.ts
  • src/core/webview/__tests__/ClineProvider.parallelMode.spec.ts
  • src/core/webview/__tests__/ClineProvider.spec.ts
  • src/core/webview/__tests__/ClineProvider.sticky-mode.spec.ts
  • src/core/webview/__tests__/webviewMessageHandler.spec.ts
  • src/core/webview/webviewMessageHandler.ts
  • webview-ui/src/App.tsx
  • webview-ui/src/__tests__/App.spec.tsx
  • webview-ui/src/context/ExtensionStateContext.tsx
  • webview-ui/src/utils/vscode.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.24339% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/webview/ClineProvider.ts 89.44% 10 Missing and 7 partials ⚠️
webview-ui/src/utils/vscode.ts 66.66% 2 Missing and 3 partials ⚠️
src/core/webview/webviewMessageHandler.ts 42.85% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@easonLiangWorldedtech
easonLiangWorldedtech force-pushed the feat/cross-tab-state-invalidation branch from ed25707 to e7512a0 Compare July 21, 2026 19:28
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR changes are ready and waiting for maintainer re-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Invalidate per-view state after reset and settings import

2 participants