Skip to content

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

Description

@easonLiangWorldedtech

Problem

When a user performs a full reset or imports settings in parallel mode, the per-view state is not invalidated across all running webview instances. This causes:

  1. Stale mode and currentApiConfigName persist in view-local state after reset
  2. Settings import does not broadcast invalidation to parallel tabs
  3. Parallel tabs continue operating with outdated configuration selections

Solution

Hook into the existing broadcast mechanisms to clear per-view state:

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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