LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-emmy
createdAtAug 27, 2026, 8:28 PM
updatedAtAug 27, 2026, 8:56 PM
githubUrlhttps://github.com/neomjs/neo/issues/17816
authorneo-gpt-emmy
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 27, 2026, 8:56 PM

Card layout lets wide grid panes escape their viewport

Closed v13.2.0/archive-v13-2-0-chunk-16 bugaitestingcoregrid
neo-gpt-emmy
neo-gpt-emmy commented on Aug 27, 2026, 8:28 PM

Context

A constrained Grid or TreeGrid can start narrower than its host, then gain horizontal overflow when a user widens a column. An independent browser reproduction against the Engine's current layout rules measured a 375px Card host whose pane expanded to 770px of intrinsic content. Because the grid then received a 770px viewport, its 770px column set produced no scroll range.

Applying the Flexbox min-size release at the Card-child boundary kept the pane at 375px while preserving 770px of scrollable content.

Live latest-open sweep: checked the latest 20 open issues on 2026-08-27 immediately before filing; no equivalent found. The latest 30 A2A messages contained no overlapping lane claim. Knowledge Base and local issue/discussion sweeps found related historical grid and flex-containment work, but no open ticket for this mechanism.

The Problem

The Card layout gives each direct child flex: 1 0 100%, but does not release Flexbox's default min-width: auto / min-height: auto. A pane with wide intrinsic content therefore refuses to shrink to the Card viewport. In a tab container, the body clips the oversized pane; the nested grid never observes a viewport narrower than its columns, so its horizontal scrollbar correctly has nothing to scroll.

This affects Grid and TreeGrid equally because both use the same Grid container and horizontal-scrollbar path. It is not a scrollbar-configuration defect.

The Architectural Reality

  • resources/scss/src/layout/Card.scss owns Card-item geometry, including direct children and the transition wrapper.
  • src/layout/Card.mjs projects the active card either directly or beneath .neo-animation-wrapper.
  • src/tab/Container.mjs places tab panes in a Card-layout body; resources/scss/src/tab/Container.scss clips that body.
  • src/dashboard/DockLayoutAdapter.mjs already releases the same automatic min-content floor on projected split-zone children. Merged PR #15018 established the Engine precedent one flex boundary higher.
  • Grid's horizontal scrollbar already derives its range from the rendered center-column width. It must remain unchanged.

The Fix

Release the automatic minimum size for both Card render paths in resources/scss/src/layout/Card.scss:

  • direct Card children;
  • children inside .neo-animation-wrapper.

Use min-width: 0 and min-height: 0 at that layout-owned boundary. Explicit component inline minimum sizes remain authoritative through normal CSS precedence.

Add focused browser regression coverage that constrains a Card/Tab viewport, widens a column beyond it, and proves the Grid/TreeGrid pane stays host-sized while horizontal scrolling reaches the final column.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback Docs Evidence
Card-layout child sizing resources/scss/src/layout/Card.scss Active cards may shrink below intrinsic content size on both axes Explicit component minWidth / minHeight still win inline Existing layout docs remain accurate Rendered constrained-host regression
Grid/TreeGrid horizontal overflow Existing Grid scrollbar path Column totals wider than the rendered viewport produce horizontal scroll range Existing fixed/flex column semantics unchanged None Resize-driven browser regression

Decision Record impact

none — this restores CSS containment within existing Card and Grid contracts.

Acceptance Criteria

  • Direct Card children can shrink to their rendered host below intrinsic content width and height.
  • Card children rendered through .neo-animation-wrapper have the same containment behavior.
  • A constrained Grid can begin without horizontal overflow, gain it through column resizing, remain parent-width, and horizontally reach its final column.
  • The same regression contract holds for TreeGrid.
  • An explicit component minimum size remains honored as a positive control.
  • Focused unit/component/e2e suites covering the changed surfaces are green.

Out of Scope

  • Changing Grid or TreeGrid scrollbar creation/configuration.
  • Redefining fixed-width versus flex-column semantics.
  • Adding application-specific pane styles.
  • Applying a global min-size rule to every Neo component.
  • Refactoring Card transitions or dock projection.

Avoided Traps

  • A global widget-base min-width: 0 rule is broader than the failing contract and would change intrinsic sizing in unrelated flex contexts.
  • Modifying Grid scrollbar logic would mask the oversized viewport instead of repairing its owning layout boundary.
  • Removing the tab body's clipping would move overflow outward rather than give the grid the correct viewport.

Related

Related: #14985 Related: #15018

Origin Session ID: 38d9509c-f70b-4ece-bab9-d810e86175ea

Retrieval Hint: query_raw_memories("Card layout flex child min-width auto Grid TreeGrid horizontal scrollbar column resize")