Low-severity fixes: scroll gate, media cache footprint, preview attribution, dead branch#491
Conversation
|
Ready to review this PR? Stage has broken it down into 4 individual chapters for you:
Chapters generated by Stage for commit 2ae2055 on Jul 13, 2026 10:54am UTC. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe changes fix four independent behaviors: sender attribution for attachment previews, cache footprint handling after failed purges, metadata preservation during archive moves, and scroll-state reset when switching conversations. ChangesMessage preview attribution
Cache purge accounting
Archived chat metadata
Conversation scroll state
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@whitenoise-mac/Core/MessageMediaDiskCache.swift`:
- Around line 318-334: Update the purge closure around beginPurge and
trackedFootprint so removalSucceeded starts false, becomes true only when
directoryResolver resolves a root and that root is either absent or successfully
removed, and remains false when resolution fails. Preserve the existing
encryption-key deletion and nil-versus-zero trackedFootprint behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: faaccbf2-dd90-4ca7-aeb2-f469169c36b6
📒 Files selected for processing (4)
whitenoise-mac/Core/MarmotMapping.swiftwhitenoise-mac/Core/MessageMediaDiskCache.swiftwhitenoise-mac/Core/WorkspaceState+ChatList.swiftwhitenoise-mac/Views/MessengerShellView.swift
Four self-contained low-severity fixes, each in its own commit. All app-side Swift; no engine/binding changes.
isActivelyScrollinggates.allowsHitTestingon the transcript but was never reset on a chat switch. The fresh innerScrollViewstarts idle without emitting a phase transition, so a flag lefttruefrom the previous chat's fling left the new transcript's first tap silently ignored until the next scroll. Reset it in the existingonChange(of: chat.id)block alongside its siblings.purgeAllswallowed a removal failure and then zeroedtrackedFootprintunconditionally. If entries survived on disk, that false zero was never reconciled (only anilfootprint re-seeds from an authoritative scan), so the eviction cap under-enforced indefinitely. Now the footprint is zeroed only when removal actually succeeds and nil'd on failure, matchingpurgeAccount.moveChatToArchived. The two arms gated onshouldEnrichran byte-identical code. Collapsed to the single unconditional form; behavior-preserving.Closes #452
Closes #453
Closes #471
Closes #472
Summary by CodeRabbit