fix(web): apply tag blurring to attachment previews - #6312
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. WalkthroughThe attachment library now derives blur state from memo tag settings and applies it to gallery and full-screen media previews. Images, videos, and motion photos remain concealed while linked memo data loads or fails. Each preview requires explicit reveal, and navigation or rule changes reset concealment. Tests cover lookup behavior, loading and error states, reveal lifecycle, videos, and paired Live Photos. Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The current change has no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #6127
Closes #6189
Memo details already apply tag-based content blurring, but the attachment library renders the same images without it.
This applies the existing tag rules to library thumbnails and full-screen previews. Linked memo lookups share the existing query cache and are deduplicated by memo; no extra memo requests are made when no blur rule is enabled. Pending or unavailable memo data stays concealed.
Each item has an explicit reveal button. Opening another full-screen item keeps that item's blur state, and closing the preview resets its reveal. Videos do not autoplay behind the blur, and motion-photo playback controls appear only after reveal. Paired Live Photos check both linked memos rather than only the still image's memo.
The change is limited to presentation. It does not change memo visibility, authentication, file permissions, filenames or direct file links, and adds no dependencies.
Validation:
pnpm lintpnpm test --maxWorkers=2: 1,376 tests passed, including 13 new tests through the actual attachments page, providers, query hooks and preview components. RPC boundaries are mocked in these tests; the original implementation fails 12 of the 13 cases.pnpm buildandpnpm releaseTo check manually, add a blur rule to a tag, attach an image to a matching memo, then open Attachments. The thumbnail should stay blurred until revealed. Also open a normal image and navigate to a tagged item's full-screen preview; that item should still require its own reveal.
Narrow-screen follow-up: the reveal label wraps within the thumbnail instead of being clipped. The production mobile check now verifies both button bounds and text overflow, in addition to the reveal/navigation behavior.