fix(gui): keep chat sticker canvases consistently sized
Sticker file dimensions currently change chat layout, and GPUI can replace a missing box ratio with the decoded image's intrinsic ratio. Use one square, rem-scaled canvas in every sticker state and keep that square ratio after decoding. Contain preserves the complete image, transparency and padded canvas.
Keep the existing nominal 300px size at a 16px rem, capped to physical conversation space including the navigation rail, gutters, bubble padding and actions. This is our UI choice. WhatSpec's verified WhatsApp Web snapshot confirms the shared-box policy; its numeric CSS size and the user's screenshot pixels were unavailable. Pinned bundle provenance and module spans are retained outside the final diff.
Validation of 5eb43f7:
- 572 GUI tests passed, 7 ignored; GUI Clippy with all targets/features and
-D warnings, formatting and diff checks passed. - Actual image/wrapper bounds cover portrait/landscape/square/tiny metadata, transparency, previews/cache and loading states. Regressions fail without fixed sizing, explicit square ratio or navigation-rail subtraction.
- Actual native and Chromium WebGL fixtures visually confirmed the sizing policy at 300, 187.5, 110 and 450 logical pixels. No authenticated WhatsApp session or user screenshot was inspected.
- Shared-memory wasm check/build passed. Temporary integration with #263 head
144d906passed 576 GUI tests, 7 ignored, and wasm compilation; the merge was aborted afterward. - Codex completed the exact final head without findings. CodeRabbit's rail finding is fixed, resolved and acknowledged; its latest incremental re-review was rate limited.
- Final-head GitHub Actions are terminal: Linux/Windows/macOS checks, MSRV, web tests, all four release builds, downloaded archive verification and Pages bundle build passed. The initial draft run skipped preview publishing; CodeRabbit is neutral because its incremental re-review was rate limited.
The debug browser stress fixture also exposed an intermittent GPUI encoded-image-loader Atomics.wait error, reproduced on unchanged main 134eff7. It is recorded separately and is not claimed fixed by this sizing change. Animation decoding remains in #263; scheduler #266 remains separate.
Marked ready for review after confirming the user's explicit preview authorization. The automatic PR preview is being monitored to completion. No merge or production deployment.
Summary by CodeRabbit
- Improvements
- Stickers now render in square canvases at a consistent size, adapting to available chat space.
- Sticker images remain within the canvas across different image dimensions and loading states.