fix(history-mode): lay the history iframe in the editor's flex slot so side panels render#7903
Conversation
In-pad history mode positioned the timeslider iframe (#history-frame-mount)
as an absolute, inset:0 overlay over #editorcontainerbox. That filled the
editor area but took the iframe out of flow, so any in-flow side panel in
#editorcontainerbox — e.g. ep_webrtc's video column (#rtcbox) — ended up
hidden beneath the overlay. In live mode the same panel sits beside the
editor, so the two modes disagreed (ether/ep_webrtc rendered nothing in the
timeslider).
Make the iframe occupy the same in-flow flex slot the live editor uses
(flex: 1 1 auto in the row-flex #editorcontainerbox) so side panels lay out
identically in both modes.
This surfaced a latent bug: `body.history-mode #editorcontainer { display:
none }` (specificity 0-1-1) was being outranked by the two-id layout rule
`#editorcontainerbox #editorcontainer { display: flex }` (0-2-0), so the live
editor was never actually removed from flow — the absolute overlay merely
painted over it. With the iframe now in normal flow that no longer hides the
editor, so the hide rule is given matching specificity
(body.history-mode #editorcontainerbox #editorcontainer) to win the cascade.
Added a padmode.spec.ts regression test that injects a left-pinned in-flow
side panel, enters history mode, and asserts the live editor is display:none,
the iframe is not absolutely positioned, and the iframe lays out beside the
panel filling the editor's remaining width (no overlap).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Review Summary by QodoFix history mode iframe layout to sit beside side panels
WalkthroughsDescription• Fix history iframe layout to occupy flex slot instead of absolute overlay • Prevents side panels from being hidden beneath history iframe • Corrects CSS specificity cascade to properly hide live editor in history mode • Add regression test verifying side panel and iframe layout without overlap Diagramflowchart LR
A["Live Mode<br/>Editor + Side Panel<br/>in flex row"] -->|"History Mode"| B["History Iframe<br/>+ Side Panel<br/>in flex row"]
C["Old: Absolute<br/>Overlay Iframe"] -->|"Issue"| D["Side Panel<br/>Hidden Beneath"]
E["New: In-flow<br/>Flex Iframe"] -->|"Fix"| F["Side Panel<br/>Visible Beside"]
File Changes1. src/tests/frontend-new/specs/padmode.spec.ts
|
Code Review by Qodo
Context used 1. Flaky fixed waits
|
Problem
In-pad history mode (#7659) mounts the timeslider iframe (
#history-frame-mount) as an absolute,inset:0overlay over#editorcontainerbox. That fills the editor area, but takes the iframe out of flow, so any in-flow side panel inside#editorcontainerbox— e.g. ep_webrtc's video column (#rtcbox) — ends up hidden beneath the overlay. In live mode that panel sits beside the editor, so the two modes disagree. This is why ep_webrtc renders nothing in the timeslider (ether/ep_webrtc).Fix
Make the history iframe occupy the same in-flow flex slot the live editor uses (
flex: 1 1 autoinside the row-flex#editorcontainerbox) instead of an absolute overlay. Side panels then lay out identically in both modes.This surfaced a latent cascade bug:
body.history-mode #editorcontainer { display: none }(specificity0-1-1) was outranked by the two-id layout rule#editorcontainerbox #editorcontainer { display: flex }(0-2-0), so the live editor was never actually removed from flow — the absolute overlay just painted over it. With the iframe now in normal flow, that no longer masks the editor, so the hide rule is given matching specificity (body.history-mode #editorcontainerbox #editorcontainer) to win the cascade.Before / after (history mode, with a left side panel)
Tests
Added a
padmode.spec.tsregression test: injects a left-pinned in-flow side panel, enters history mode, and asserts (1) the live editor isdisplay:none, (2)#history-frame-mountis not absolutely positioned, and (3) the iframe lays out beside the panel and fills the editor's remaining width with no overlap. Verified passing against a dev server on this branch.No behavioural change for pads without a side panel: when the iframe is the only in-flow child it fills the full editor width exactly as before.
🤖 Generated with Claude Code