mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-08 17:31:56 -10:00
shell-redesign V1 attempt-3 Phase 3 BOUNCE-FIX follow-on: seat detail double-padding
Founder reported: node detail page (e.g.,
/topology/seat/$rigId/$logicalId) was pushed too far right at desktop
1440x900. The 'DISCOVERY.INTAKE-ROUTER' detail panel rendered far right
of the Explorer's right edge instead of anchored at the workspace
left offset.
Root cause: double-padding from Class B's `paddingLeft:
var(--workspace-left-offset)` on <main>, combined with legacy
WorkspacePage (consumed by LiveNodeDetails) ALSO reading the same
--workspace-left-offset via `lg:pl-[var(--workspace-left-offset,0px)]`.
Net effect: <main> padded by anchor (21rem); WorkspacePage inside
LiveNodeDetails added another 21rem on top → content shifted ~42rem
right (about half the viewport).
Fix: reset --workspace-left-offset and --workspace-right-offset to 0px
on the inner div that wraps {children} inside <main>. This way:
- <main> reads the OUTER var (set on <main> via workspaceStyle) →
applies its own paddingLeft.
- Children (legacy WorkspacePage consumers + Phase 3 destinations)
read the INNER var (overridden to 0) → no double padding.
Phase 3 destinations (Dashboard / TopologyTreeView / etc.) don't use
the var directly; they were already fine. The fix only neutralizes
double-padding for legacy children inheriting WorkspacePage layout.
Visual verification at /topology/seat/$rigId/discovery.intake-router
1440x900: detail panel anchored just past the Explorer's right edge
(at the workspace left offset = 21rem); sub-tabs IDENTITY/AGENT_SPEC/
STARTUP/TRANSCRIPT also anchored. (Inner panel renders an HTTP 404
because /api/inventory route on shipped daemon doesn't have entries
for synthetic test seat ID — separate data-availability issue, not
layout.)
Tests: 634/636 PASS unchanged (no regression; pre-existing
library-review + skipped seat-scope).
Build: ✓ in 1.99s.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
1 parent
7aa1aac65c
commit
400477ba4a
1 file changed
+13
-1
@@ -534,7 +534,19 @@ function AppShellInner({ children }: AppShellProps) {
|
||||
paddingLeft: `var(--workspace-left-offset, 0px)`,
|
||||
}}
|
||||
>
|
||||
<div key={pathname} className="relative z-10 route-enter flex-1 flex flex-col">
|
||||
{/* Reset the workspace offset CSS vars to 0 inside main so that
|
||||
legacy children (e.g., LiveNodeDetails → WorkspacePage which
|
||||
also reads var(--workspace-left-offset) for its own padding)
|
||||
don't double-pad. The padding is already applied at <main>
|
||||
above; child surfaces should treat their own offset as 0. */}
|
||||
<div
|
||||
key={pathname}
|
||||
className="relative z-10 route-enter flex-1 flex flex-col"
|
||||
style={{
|
||||
"--workspace-left-offset": "0px",
|
||||
"--workspace-right-offset": "0px",
|
||||
} as CSSProperties}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in new issue
Block a user