fix(mobile): knowledge panel tabs, autocomplete height floor, status row gap

The project knowledge panel's section sidebar becomes a horizontal pill
strip on mobile, where a half-width side column left no room for
content. The autocomplete popups get their 120px minimum height back —
browser keyboard panning could put the anchor above the measured
boundary and collapse them to nothing. The status row's 24px footer-swap
reservation now applies only to the assistant-status instance; the
accessory-only row above the composer (pending changes) takes the
normal 8px instead of floating a stray gap.
This commit is contained in:
Bohdan Triapitsyn
2026-08-24 01:44:15 +03:00
parent a547f83ebe
commit d678a4244e
3 changed files with 48 additions and 2 deletions
@@ -35,7 +35,11 @@ export const useMobileAutocompleteMaxHeight = (
// The popup's bottom edge is its anchor (composer top) and does not
// depend on its current height.
const available = Math.max(0, Math.floor(el.getBoundingClientRect().bottom - boundaryTop - 8));
const next = available < normalMaxHeight ? available : undefined;
// Floor: browser keyboard panning can put the anchor above the
// measured boundary for a frame (or for the whole pan), which
// would collapse the popup to zero height. A short popup that
// slightly overlaps the header beats an invisible one.
const next = available < normalMaxHeight ? Math.max(120, available) : undefined;
setMaxHeight((prev) => (prev === next ? prev : next));
};
measure();