fix(desktop): keep catch-up reachable for buffered messages - #7151
Conversation
Signed-off-by: Logan Johnson <loganj@squareup.com>
🔐 Codex Security Review
|
Baseline resultsPreserved fresh-main Fixed resultsSame diagnosis baseline plus the proposed condition: 6/6 pass. Fresh PR source The durable component regression supplies deterministic recovery-control coverage without depending on these browser geometries: it renders the real timeline/scroll/buffer hooks and button, drives the virtualizer callback seam, verifies no forced scroll before click, and checks that clicking reveals the buffered row. Removing only the production guard fails that case; restoring it passes all four. Full local JS suite: 5,827 pass. No native launch or native-release certification is implied. |
Exact-head technical resultCI run 33455413702 has completed successfully for Crucially, Smoke3 passes the original Transparency: the smoke jobs are successful but not universally first-attempt clean. CI's configured retries recovered five cases: channel-browser Enter/create, navigation chip-label wrapping, concurrent onboarding installs, and two workflow CRUD cases. I inspected their failure locations (create/geometry/install state/workflow controls), which are outside this catch-up render predicate. No assertions or retry policy were changed, no manual CI reruns were dispatched, and no unrelated fixes were folded in. Smoke totals: 1,254 passed, 5 retry-pass/flaky, 3 skipped. Remaining external gates: draft remains draft; human/repository review and merge authority are required (GitHub |


Summary
Keep the existing new messages / Jump to latest button reachable whenever the timeline has buffered messages, even if its frozen rows physically reach the bottom of the viewport.
A reader can leave the semantic live tail, then reflow to the physical bottom of the shorter frozen model. New accepted messages remain buffered intentionally to preserve reading position, but the old
!isAtBottomrender gate hides the only catch-up action. This change addsbufferedTimeline.pendingCount > 0to that gate. The existing explicit click still releases the buffer and scrolls to latest; arrival, history, virtualizer and cache semantics are unchanged.The regression renders the actual
MessageTimeline, buffer/scroll/settle hooks andUnreadPill, stubbing only the layout-owning message list to drive its public bottom-state callback deterministically. Four cases cover the stranded queue and clickable recovery, zero pending, history prepends without forced scrolling, and genuine semantic return. Removing the production guard causes the recovery case to fail (3 pass / 1 fail); restoring it passes all four.Related issue
Discovered while investigating #7145, CI run 33444394321. Smoke3 fails at
messaging.spec.ts:2629, shared-message visibility/catch-up before the author/avatar assertions, not an avatar-image check. This is a separate baseline repair, not a Start/Move change. Related timeline work: #7006. Searched open PRs for timeline/catch-up duplicates; no duplicate repair found.Baseline results
Baseline and fixed result evidence with source-labelled screenshots.
Preserved diagnosis experiment (not a claim of green main): unchanged CI-merge source and fresh main
2f3dd850db3afe27e56f18cbcd3548eabdd9b9c2each fail 5/6 geometry cases at the same shared-row visibility predicate. Both caches contain the accepted message. Main plus this one-condition repair passes 6/6.Fresh fetch for this PR:
0affe527(seven newer commits). The original messaging spec andMessageTimeline,useBufferedTimelineMessages,useAnchoredScrollhave no delta from the diagnosis baseline. The saved patch was verified against SHA-25614e126c1ddb762b0a989f3a8b84a13c92b1502739ec4d7622122529ab65abceebefore applying.Fixed results
Final source
b13c975cdf4fe2aabf93030b5c8f8e8566fc7d5b:--noEmit, package Biome 2.4.16 + text/pubkey guards, differential file-size gate: pass (existing package lint warnings remain).1 new messagebutton.Local tooling note: pnpm's auto-install rejected the reused dependency symlinks before running tests; equivalent package commands ran directly without installing/mutating shared dependencies. Hermit's older Biome 2.4.7 reports unrelated baseline errors; the lockfile-installed package Biome 2.4.16 passes. No unrelated source was changed. Full Rust/mobile/service builds were intentionally not run for this two-file renderer/test repair; current PR CI supplies the remote gate.
Remote CI result
Exact-head CI and gate report: CI33455413702 completed successfully. All executed technical checks pass, including Desktop Core/builds/four smoke shards and both integration shards. The original failing messaging workflow passes first attempt (4.4s). Five other smoke cases required CI-configured retries; this is not a claim of universally first-attempt-clean smoke or green unpatched main.
Review / integration gate
Draft for human review; do not merge or ready-mark automatically. #7145 remains at
8671f76funtouched. After this baseline repair lands through repository/human authority, #7145 must rebase on updated main, rerun affected validation, and get a genuinely new source-bound package for the changed renderer. No merge-from-main, stacked base or cherry-pick into #7145 is being proposed without explicit disposition.No native app launch, OS keychain/config/credential read, service/DB reset, paid security review, package rebuild/relabel, or changes to #7140. Mock browser evidence is not native release certification.