Skip to content

fix(chat): keep question and permission panels usable on mobile - #845

Merged
pascalandr merged 2 commits into
devfrom
fix/mobile-interruption-dock
Oct 4, 2026
Merged

pascalandr merged 2 commits into
devfrom
fix/mobile-interruption-dock

Conversation

@pascalandr

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #836 and #838. An expanded interruption now takes priority over an enlarged composer without changing its saved height or draft. Collapse/settlement restores normal sizing. Keep the dock non-shrinking and bound the stack to Android visualViewport changes so response fields and actions remain reachable.

Reproduction and scope

Real InstanceShell at 851x393 with maximum composer height reduced the dock to 54px and its body to 11px, clipping the response and submit controls. The regression uses native Form events, mobile web/remote runtime and coarse-pointer Chromium emulation.
The user's separate screenshot showed pre-836 navigation buttons: the installed bundle still contains those old labels. Merged PRs had not replaced that installed build. This follow-up fixes the independently reproduced current-code height issue; it does not claim deployment to the user's phone.

Validation

  • 7 mobile shell tests: portrait, short viewport, landscape, immersive, saved maximum size, keyboard resize/pan, long Forms, background/global requests and permission actions.
  • 44 header/composer/interruption browser regressions and 1 isolated Electron zoom test pass.
  • UI TypeScript, production UI build and diff check pass; rendered captures inspected.

Gatekeeper

Independent review will be published and corrected in a loop until zero findings before the requested admin merge.

Maintenance

Existing large components touched: packages/ui/src/components/instance/instance-shell2.tsx (~1327 lines), prompt-input.tsx (~1081), session/session-view.tsx (~711).

…oser

Prioritize expanded questions and permissions over a manually enlarged composer. Temporarily use the minimum field height without changing the draft or saved size, restore normal resizing on collapse or settlement, and prevent the dock from shrinking into an unusable header.

Bound the request/composer stack to the visual viewport during Android keyboard resize and pan. Retain shell ownership, request drafts, background/global requests and session navigation. Keep disabled resize controls out of keyboard traversal.

Add real InstanceShell browser regressions for desktop and Android touch layouts, portrait, landscape, short viewports, immersive mode, maximum saved composer size, keyboard geometry, long forms and permission actions. All 52 targeted browser checks, UI TypeScript and the production UI build pass. The reported screenshot separately came from an installed pre-836 bundle; this follow-up fixes the independently reproduced current-code height regression.

@pascalandr pascalandr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent gatekeeper pass 1: ONE P2 finding; merge held.

packages/ui/src/styles/components/interruption-dock.css:6 — the 60% dock cap still clips actions with a keyboard-short visualViewport (220px). Real shell Pixel5/long-question reproduction: dock y84-165.59, footer y150-195, footer center not hit-testable. The seven existing mobile tests pass but do not exercise such small keyboard heights.

Adding a short-height overflow fallback and real touch regression before another independent review. No other lifecycle, saved-size or resize-neutralization finding.

Address the gatekeeper's 220px visual-viewport reproduction. Measure the active dock header, footer, input and padding to reserve a usable minimum. When the whole stack cannot fit, allow session-level scrolling and field scroll chaining instead of clipping reply actions.

Exercise 260/220/180px keyboard heights in portrait and landscape with real pointer/wheel and native Chromium touch gestures. Inputs, submit and permission actions remain hit-testable and functional; all 13 mobile and 44 existing header/composer/interruption browser tests and UI TypeScript pass.

@pascalandr pascalandr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent gatekeeper pass 2: ZERO FINDINGS on a9d6332.

The prior P2 (clipped actions at 220px keyboard height) is resolved by a measured usable dock minimum and an outer-scroll fallback. Independently reran all 13 mobile tests, including 180/220/260px keyboard layouts and native touch activation. Reviewed the complete diff, lifecycle/cleanup, resize neutralization, saved-height restoration and screenshots. No new actionable focus, overflow or lifecycle regressions.

The 44 existing header/composer/interruption regressions, UI TypeScript and final production UI build also pass. Proceeding with the explicitly requested admin merge. Deployment of the installed older application remains separate.

@pascalandr
pascalandr merged commit 182bea9 into dev Oct 4, 2026
12 of 13 checks passed
@pascalandr
pascalandr deleted the fix/mobile-interruption-dock branch October 4, 2026 16:19
@pascalandr

Copy link
Copy Markdown
Contributor Author

Post-merge CI update: the final full run 37216097214 on a9d6332 completed with 427 browser passes, 3 failures and 1 skip. Failures: interruption-selection draft/focus after session switch; session-rendering optimistic reorder geometry; session-rendering first-prompt undo control reachability. Targeted validation and independent gatekeeper were green before the requested admin merge, but the full suite is not green. Investigating these failures against the pre-change baseline before attributing them or choosing a correction.

@pascalandr

Copy link
Copy Markdown
Contributor Author

Root-cause follow-up: all three full-suite failures reproduce on baseline 0465499. The selection failure is a real deferred activation-focus race: an answer field can gain focus before a queued callback steals it for the composer (exact CI mismatch reproduced on both baseline and PR head). A production guard plus deterministic regression is in progress. The two transcript failures are invalid fixture responses to /permission-receipts: an empty body produces error panels and changing row heights. Returning the documented JSON { receipts: [] } fixes both tests on isolated baseline and PR-head archives without assertion changes, forced clicks or extra waits. Preparing a reviewed follow-up.

pascalandr added a commit that referenced this pull request Oct 4, 2026
## Summary
Follow up the three full-CI failures reported after #845. A delayed
session-activation callback could steal focus from an answer field and
insert the answer into the composer. Recheck input/dock/modal ownership
at execution and fence deactivation, disposal and superseded callbacks.

## Baseline evidence
The focus race reproduces at baseline 0465499 and #845 head;
deterministic new coverage fails against the old focus implementation.
The other two failures also reproduce on both snapshots: the transcript
fixture returned an empty body for permission-receipts, rendering error
panels that changed row geometry. Fulfill that route with valid empty
receipts; no assertion changes, added waits or forced clicks.

## Validation
- 7 deterministic activation/selection tests pass; competing inputs,
modal/dock ownership, stale callbacks, normal activation and phone
behavior covered.
- 46 transcript tests pass.
- Header/mobile/dock: 57/58 initially; one cold fixture navigation
timeout passed its isolated rerun.
- UI TypeScript and production UI build pass.
- Independent gatekeeper and full CI required before the requested admin
merge.

## Maintenance
Existing oversized file:
packages/ui/src/components/session/session-view.tsx (~720 lines).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant