Files
Sprimo/issues/issue5.md
2026-02-14 20:07:03 +08:00

3.1 KiB

Title

Tauri overlay shows left-edge white strip and same scale yields different window sizes by pack.

Severity

P2

Environment

  • OS: Windows
  • App version/build: packaged release (sprimo-tauri.exe)
  • Evidence screenshots:
    • issues/screenshots/issue5.png
    • issues/screenshots/issue5-b.png
    • issues/screenshots/issue5-c.png

Summary

Two regressions were observed in packaged Tauri runtime:

  1. A visible white strip appears on the overlay left edge on dark backgrounds.
  2. At the same slider scale, main overlay window size differs by sprite pack.

Reproduction Steps

  1. Run packaged sprimo-tauri.exe.
  2. Place overlay over a dark/black background.
  3. Observe left window edge.
  4. Open settings and set the same scale value on default, ferris, and demogorgon.
  5. Compare main window footprint.

Expected Result

  • No white strip or white background bleed on transparent overlay edges.
  • Same scale value produces the same main overlay window size regardless of pack.

Actual Result

  • Left edge can show a white strip.
  • Window size differs across packs at same scale.

Root Cause Analysis

  1. Transparency chain was incomplete in CSS:
  • body was transparent, but html/#root were not explicitly transparent/full-size, allowing white background bleed at edges in transparent frameless window mode.
  1. Scale-to-window mapping depended on per-pack frame size:
  • window sizing used pack frame_width/frame_height, so identical scale values produced different target sizes across packs.

Implementation Notes

  1. frontend/tauri-ui/src/main.tsx
  • introduced canonical scale basis 512x512 for window sizing semantics.
  • changed fittedWindowSize and effectiveScaleForWindowSize to use canonical dimensions.
  • removed pack-dependent sizing from fitWindowForScale; pack remains used for rendering/splitting.
  1. frontend/tauri-ui/src/styles.css
  • made html, body, and #root explicit full-size transparent surfaces to avoid white bleed.
  1. docs/TAURI_RUNTIME_TESTING.md
  • added explicit checks for same-scale cross-pack window-size consistency and no edge white strip.
  1. docs/RELEASE_TESTING.md
  • added packaged verification steps for white-edge bleed and cross-pack same-scale size consistency.

Verification

Commands Run

  • npm --prefix frontend/tauri-ui run build
  • cargo check -p sprimo-tauri
  • just build-release-tauri
  • just package-win-tauri
  • just smoke-win-tauri

Visual Checklist

  • Before screenshot(s): issues/screenshots/issue5.png
  • Before screenshot(s): issues/screenshots/issue5-b.png
  • Before screenshot(s): issues/screenshots/issue5-c.png
  • After screenshot(s): issues/screenshots/issue5-after-YYYYMMDD-HHMMSS.png

Result

  • Status: Fix Implemented
  • Notes: packaged runtime verification pending.

Status History

  • 2026-02-14 00:00 - reporter - Reported - left white strip + same-scale size inconsistency reported.
  • 2026-02-14 00:00 - codex - Triaged - identified transparency chain and scale-basis coupling root causes.
  • 2026-02-14 00:00 - codex - Fix Implemented - switched to canonical scale basis and full-surface transparency.