Repository navigation
fix(web): keep a scrolled tab strip where it was put when a tab resizes - #754
Conversation
The repo tab strip re-placed itself on every tab resize (a count that loads late) unless a pointer, wheel or key gesture had touched it, and even after one it snapped back whenever the active tab was out of view, which is always the case after scrolling away from it. A tab scrolled into view by a screen reader or the browser, or swiped to while counts were still loading, was thrown back to the active tab (master Web e2e, mobile.spec.ts:138, "tab Code on screen"). Any scroll the strip did not make itself now counts as the user's, and after it a resize moves the strip only if it pushed a shown active tab out of view. The e2e pins the case: scroll Code into view, widen it, Code stays on screen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Boards (inserted before Releases) and Settings/Members (appended) arrive once their reads resolve. The ResizeObserver only watched the tabs that existed at mount and none of them resizes when a tab is inserted, so an untouched strip left the active tab cut off. A MutationObserver now observes added tabs and re-places the strip. The e2e pins both cases for an untouched strip: a tab before the active one widens, and a tab appears before it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
Master's Web e2e has been red since #747 (run 45653175751,
mobile.spec.ts:138"iPhone SE: every repo tab is reachable…",tab Code on screen). It isn't a layout break from #746/#747: both passed on their own, and the iPhone SE header and tabs render correctly. It's a race inTabStrip:pointerdown/wheel/keydowntouches it. A scroll fromscrollIntoView(Playwright, a screen reader moving focus, the browser revealing a focused tab) isn't one of those, so a late Platform read snaps it back. In the failing trace agetIdentityreply landed 15 ms after Playwright scrolled Code into view.Reproduced on live testnet at 375 px (build 59df356): scroll Code into view, widen a tab, and the strip jumps to scrollLeft 213, with Code at x = −197.
Fix
Evidence (boat sandbox, testnet build,
--project mobile)Code stays on screen after a tab resizes).--repeat-each 3). tsc, eslint andtab-strip.test.ts(13) pass.mobile.spec.tshas 21 failures, all atexpectLandedwithVerification failed: Platform's answer did not match its prooforThat read did not land. That's testnet's protocol 15 upgrade against our v5.0.0-rc.8 SDK, which hits master equally. None are layout or size failures.Compat / data loss
Client-side scroll behaviour only. No storage, no Platform writes, no URL or data format change. Nothing can lose data.
🤖 Generated with Claude Code