Commit Graph

2 Commits

Author SHA1 Message Date
nesquena-hermes 8ceeef3716 Apply Opus pre-release fixes: dropdown resize guard + display:block
Three fixes from Opus advisor review of stage-261:

1. CRITICAL: dropdown-survives-resize bug. The composerToolsetsDropdown is a
   DOM sibling of composerToolsetsWrap, not a child, so CSS hiding the wrap
   does not cascade-hide an open dropdown. If a user opens the dropdown at
   composer-footer >= 1100px and then opens the workspace panel (or resizes
   the window), the dropdown would stay open without a visible anchor.

   Fixed in three places (defense-in-depth):
   - resize listener: closes dropdown when chip.offsetParent === null
   - _positionToolsetsDropdown: closes if chip hidden (defense-in-depth)
   - toggleToolsetsDropdown: early-returns if chip hidden (defense against
     future #1431 redesign code that might invoke from elsewhere)

2. MEDIUM: display:flex changed to display:block to match sibling wraps
   (.composer-profile-wrap, .composer-model-wrap, .composer-reasoning-wrap
   all use the natural block display).

3. Added 3 new regression tests to pin all three guards.

Refs #1431, #1433.
2026-05-02 00:21:15 +00:00
nesquena-hermes a6884ca40f Make composer-footer toolsets chip responsive instead of always-hidden
Replaces PR #1433 unconditional JS display:none with a CSS @container query
that shows the chip only at composer-footer widths >= 1100px. JS now clears
inline style instead of setting display:none, so the CSS responsive cascade
is the single source of truth. Also removed inline style=\"display:none\" from
index.html so the CSS base rule provides the default-hidden state.

10 regression tests pin the base hide, wide-container show, narrow-container
hide (520px container query), mobile viewport hide (640px @media), JS does
not force display:none, JS clears inline style, /api/session/toolsets and
the dropdown machinery (toggleToolsetsDropdown, _populateToolsetsDropdown)
are preserved.

Refs #1431, #1433.
2026-05-02 00:04:12 +00:00