Skip to content

fix: restore native drawer layout after keyboard dismissal - #418

Open
lodystage[bot] wants to merge 1 commit into
mainfrom
fix/harmony-keyboard-dismiss-layout
Open

fix: restore native drawer layout after keyboard dismissal#418
lodystage[bot] wants to merge 1 commit into
mainfrom
fix/harmony-keyboard-dismiss-layout

Conversation

@lodystage

@lodystage lodystage Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Related issue

Same-repository fix based on a reported HarmonyOS/Zhuoyi keyboard dismissal problem; no linked issue.

Problem / pressure

After dismissing the keyboard in an Android-compatible native shell, the conversation composer can remain suspended above a blank area. Vaul can capture the already-shrunken drawer height and restore that stale height when the viewport expands.

Summary

Native non-iOS side drawers without snap points now preserve CSS sizing and compute the bottom inset from the current visual viewport. Window resize and visual viewport resize/scroll events update the inset even when the input retains focus. iOS, bottom sheets, and explicit repositioning opt-outs retain their existing behavior.

Before / after

Before: the regression fixture restores an 800px viewport but leaves a 480px drawer height. After: the drawer has no cached inline height and the bottom inset returns to zero.

Test plan

  • Nine regression tests passed using Vitest 3.2.4 with an isolated configuration and locally available dependencies; the ordinary workspace runner was blocked by broken dependency links.
  • Disabling the new viewport handling reproduces the stale 480px height and leaves six regression cases failing.
  • Targeted Prettier and oxlint checks, plus git diff --check, passed.
  • Full component typecheck was attempted but blocked by missing workspace dependencies. Full pnpm check was not completed.
  • HarmonyOS/Zhuoyi device verification remains outstanding.

Context handoff

Instructions for reviewing agents

  • Review focus: Check shared drawer sizing across keyboard overlay and WebView resize modes.
  • Decisions to challenge: Validate replacing Vaul repositioning only for native non-iOS side drawers without snap points.
  • Plausible failures / evidence gaps: Device-specific viewport event ordering and nested drawer behavior need real-device verification.

Authoring context

  • User goal / directives: Restore composer layout after keyboard dismissal in HarmonyOS/Zhuoyi.
  • Constraints / non-goals: Keep the change in shared public UI; preserve existing iOS and bottom-sheet behavior.
  • Risk-bearing decisions: Use live viewport occlusion rather than cached height or input focus to drive side-drawer positioning.
  • Destructive or irreversible behavior: No data mutations, migrations, or destructive actions are introduced.
  • Deliberately not done or tested: No native application changes or device tests; the native shell is outside this repository.
  • Unknowns / confidence: Deterministic regression coverage passes; actual device event delivery remains unverified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant