fix(kimi-web): improve mobile safe-area handling#1459
Conversation
|
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e1cceb2c7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| bottom: calc(76px + env(safe-area-inset-bottom)); | ||
| /* Sit just above the chat dock; --dock-h already includes the dock's own | ||
| safe-area padding, so no extra safe-bottom term is needed. */ | ||
| bottom: calc(var(--dock-h, 76px) + 8px); |
There was a problem hiding this comment.
Use a real fallback when the dock height is unset
Because style.css initializes --dock-h to 0px, the var(--dock-h, 76px) fallback here never selects 76px. On mobile states where ChatDock has not mounted yet or is not rendered (for example auth/empty-session warning toasts), the stack is placed only 8px above the viewport bottom, losing the previous safe-area/home-indicator clearance and potentially covering the toast actions. Consider leaving --dock-h unset until measured or using an explicit max()/safe-bottom fallback.
Useful? React with 👍 / 👎.
Related Issue
No tracking issue. Follows up on a mobile safe-area review for kimi-web.
Problem
Mobile kimi-web handled safe-area insets in scattered component-local ways. Keyboard open could leave the composer above the visual viewport on browsers that do not shrink the layout viewport. Landscape added inline insets twice. The mobile top bar ignored the top inset in PWA mode. Toasts were anchored to a hard-coded dock height that breaks when the composer grows to multiple lines.
What changed
Checklist