Keep the mobile PWA shell aligned with the iOS keyboard - #1110
Conversation
|
🚨 SLOP COP 🚨 · I am the SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and end-to-end behavior. The stack contains PR #1110 only. I found no draft or untrusted stack members to skip. |
|
🚨 SLOP COP 🚨 · Security review complete: no findings. The change uses rounded browser viewport numbers for inline styles. It adds no user-controlled strings, network access, storage access, or authorization path. The existing animation-frame gate and cleanup prevent event-based resource growth. |
|
🚨 SLOP COP 🚨 · Performance review complete: no findings. All viewport and window events use one animation-frame path. The callback reads viewport values before two bounded style writes. Cleanup removes every listener and cancels the pending frame. The related prompt-box listener has a separate bounded purpose. |
|
🚨 SLOP COP 🚨 · Code-quality and architecture review complete: no findings. The page-relative top calculation matches the relative shell layout. Cleanup and pinch-zoom behavior remain consistent. The other visual viewport listener controls composer expansion, so it does not duplicate shell geometry logic. The tests cover resize, stale pan, cleanup, and pinch zoom. |
|
🚨 SLOP COP 🚨 · End-to-end review complete: no findings. I started the isolated app at the PR head and opened it in a 390×844 Chromium viewport. The shell started at Chromium cannot reproduce the iOS software keyboard itself. The browser test exercised the built application and both geometry branches. |
SawyerHood
left a comment
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
No findings.
The stack contains PR #1110 only. The author has administrator access. I found no skipped stack member.
The security review found no unsafe input, data path, or listener cleanup issue.
The code-quality review found correct shell geometry and no useful architecture refactor. The other viewport listener has a different purpose.
The performance review found bounded animation-frame work and complete cleanup.
Validation passed:
@bb/apptypecheck- 317 app test files
- 2,373 app tests
- A compact 390×844 browser smoke test
- The stale-pan and pinch-zoom geometry branches
Chromium cannot reproduce the iOS software keyboard. The browser test exercised the built application with controlled visual viewport values.
Summary
Root cause
Safari can pan only the visual viewport when the software keyboard opens.
The prior code called
scrollTo()and usedoffsetTop + heightas the shell height.An iOS standalone PWA does not always clear this pan after
scrollTo().The stale offset made the shell too tall. It put the composer above the keyboard and moved the header under the status bar.
User impact
The composer now stays above the keyboard during long message edits.
The header also stays inside the visible viewport.
Validation
@bb/apptype check.@bb/applint task with zero errors.