Description
Summary
A single full-page plugin navigation panel still remounts when the viewport crosses the compact breakpoint. Its input and panel DOM nodes are replaced, losing focus and text selection; a plugin form using component-local state also loses its unsaved value. The single-thread fix in #6289 does not cover plugin-panel routes.
Versions and environment
- bb 0.49.0, macOS arm64, Chromium web client.
- Current upstream main:
55135d1e5045d6c5d3c24f5a4d5556ed3e11cb00. - Live browser observations were made on a local build at
f115f9b7fb9d3e1be86b0a55d9320056d312cd05. The affected implementation and existing test file are identical to current upstream main. The regression tests and typecheck were rerun on current main plus the proposed fix.
Steps to reproduce
- Open one full-page plugin navigation panel with a text input, without a split. Type a value and select characters 2 through 6.
- Resize from 768px wide to 767px, then back to 768px.
- Observe focus/selection and retain references to the input and
[data-testid="plugin-panel-body"]nodes before and after each crossing.
The regression fixture registers a plugin nav panel whose input stores its value with React useState. It tests both compact and desktop initial layouts and four repeated crossings.
Expected vs actual
Expected: same input/panel nodes, unsaved value, focus, selection and scroll.
Actual: nodes are recreated at both crossings; focus and selection are lost.
In the live plugin, its own window-memory cache restored the search text, but focus changed from true to false and the selection changed from [2,6] to [11,11]. Within one side of the breakpoint, node identity and selection were preserved. In the nonpersistent regression fixture, the recreated input's value becomes empty.
Evidence
keepsSinglePaneexcludesplugin-panel, so compact takesStandalonePaneContentwhile desktop takesWorkspacePaneContent:bb/apps/app/src/views/thread-detail/SplitThreadArea.tsx
Lines 686 to 706 in 55135d1
panes.length === 1 && firstPane !== undefined ? firstPane : null; const keepsSinglePane = singlePane !== null && (currentContent.kind === "thread" || currentContent.kind === "new-thread"); if (!splitWorkspaceActive && !keepsSinglePane) { return ( <StandalonePaneContent content={currentContent} paneId={layout.focusedPaneId} onRequestClose={ currentContent.kind === "thread" || currentContent.kind === "new-thread" ? null : () => closePane(layout.focusedPaneId) } onNavigateInPane={navigateInPane} /> ); } const commandHandlers = splitWorkspaceActive ? ( - The two new regression cases fail against the unmodified component with an input identity mismatch and
value=""instead ofvalue="unsaved plugin form". - Keeping the single plugin panel in
WorkspacePaneContenton both sides makes both cases pass. Related split-area and plugin-header suites: 91 tests pass. App typecheck also passes. - Investigation: BB thread
thr_qua2wx7mtu; local observations infollowup/hc174-boundary.jsonand regression logs underp1-repair/. No native Electron or iOS device verification is claimed.
What was ruled out
- Not a duplicate of Crossing the compact breakpoint remounts the open thread, dropping composer focus and selection #6289: that closed issue fixed thread routes; the current exception still omits full-page plugin routes.
- Not SDK Markdown remounts <video> when a host context changes, so videos restart #6311: this is the outer responsive layout replacing the plugin subtree, not Markdown video identity during host-context updates.
- This is state loss rather than only a repaint or a loading-label flash.
- No plugin API, wire, permission or visual design change is proposed.
AGENT GENERATED
Activity
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…