fix(runtime): preserve panel state in sidebar - #360
Merged
Conversation
Keep sidebar plugin frames mounted by default and honor destroyOnDetachPlugins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Preserves plugin panel state when navigating within the unified Rozenite sidebar, while continuing to reset plugins configured with
destroyOnDetachPlugins.Related Issue
None — no issue required for this focused fix.
Context
The sidebar previously replaced its single iframe whenever the active menu item changed, so every plugin lost its UI state. The shell now keeps default plugin frames mounted and hides inactive ones; configured plugins still unmount on navigation. Runtime messages are relayed to every mounted frame, matching the legacy hidden-tab behavior.
Testing
pnpm --filter @rozenite/runtime buildpnpm --filter @rozenite/shell buildpnpm --filter @rozenite/runtime typecheckpnpm --filter @rozenite/shell typecheckpnpm --filter @rozenite/shell lintpnpm exec prettier --check .changeset/persistent-sidebar-panels.md packages/runtime/src/index.ts packages/shell/src/Shell.tsx packages/shell/src/main.tsx packages/shell/src/types.tspnpm release:planpnpm format:allis blocked by existing unformatted files under tracked.claude/worktreesdirectories. The aggregate typecheck encountered a transient runtime declaration-build race; the focused runtime and shell checks above pass serially.