Skip to content

fix(web): a pending approval no longer re-renders every timeline row - #3

Open
M0xoo wants to merge 926 commits into
mainfrom
fix/web-pending-approval-row-rerenders
Open

M0xoo wants to merge 926 commits into
mainfrom
fix/web-pending-approval-row-rerenders

Conversation

@M0xoo

@M0xoo M0xoo commented Nov 15, 2026

Copy link
Copy Markdown
Owner

While an approval is pending, every structural thread event (a new turn item, a status change) re-rendered every row in the timeline. usePendingThreadRequests re-derived and re-sorted pendingApprovals into a fresh array on each quiet projection, and that array feeds MessagesTimeline's shared row context.

The content-equality memo that pendingRequestsAtom already had (used by mobile) moves into createPendingThreadRequestsProjector in client-runtime, and both the atom and the web hook use it. The oldest-first sort moves into derivePendingThreadRequests, because a separate sort after the memo still produced a new array per projection. Mobile now also shows pending requests oldest-first, matching web.

Proof

  • ComposerPendingUserInputPanel.navigation.browser.test.tsx: a projection change that leaves requests alone keeps the same arrays; resolving the approval produces new ones. Fails on main (Object.is equality).
  • New render scenario app-items-while-approval-pending (10 items added while an approval waits). Fails on main with expected 70 to be undefined.

node scripts/render-metrics.ts compare for that scenario:

component main fix
total renders 2873 1578 (−45%)
UserTimelineRow 70 0
ChatMarkdown 80 11
Container2 140 12

vp run check:changed passes.

Opus 5.5 via Claude Code (wisp).

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 15, 2026
@M0xoo
M0xoo force-pushed the fix/web-pending-approval-row-rerenders branch from 9a82c41 to d07150c Compare November 15, 2026 12:57
@github-actions github-actions Bot added size:L and removed size:XXL labels Nov 15, 2026
@juliusmarminge
juliusmarminge force-pushed the fix/web-pending-approval-row-rerenders branch from 67b7284 to ce0e927 Compare November 15, 2026 13:14
@github-actions github-actions Bot added size:XL and removed size:L labels Nov 15, 2026
juliusmarminge and others added 22 commits November 19, 2026 12:15
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#31874)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#39312)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…7442)

Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
… clean up their files (pingdotgg#39275)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#39283)

Co-authored-by: ravdeep kainth <kainth.ravdeep@gmail.com>
Co-authored-by: voida6 <voida6@users.noreply.github.com>
…'s default branch (pingdotgg#32841)

Co-authored-by: Ajraba04 <143622128+Ajraba04@users.noreply.github.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#39331)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…achmentsDir from additionalDirectories (pingdotgg#37997)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ersedes it (pingdotgg#34634)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
LukasFB and others added 27 commits November 20, 2026 18:17
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#39973)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…39488)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…sues page (pingdotgg#39937)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#35185)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…dotgg#37640)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#37274)

Co-authored-by: Grok 4.7 <noreply@x.ai>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#32989)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ick or when it opens (pingdotgg#39319)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
… worktrees (pingdotgg#35721)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ngdotgg#29261)

Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…dotgg#31432)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…val-row-rerenders

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:XXL and removed size:XL labels Nov 21, 2026
@github-actions

Copy link
Copy Markdown

This PR changes the test suite by +1116 test cases (browser +118, unit +597, server +401).

New browser test files: apps/web/src/components/ProjectScriptsControl.browser.test.tsx, apps/web/src/components/PullRequestThreadDialog.browser.test.tsx, apps/web/src/components/SavedViewsMenu.browser.test.tsx, apps/web/src/components/chat/VoiceInputSetup.browser.test.tsx, apps/web/src/components/chat/preparingComposerImages.browser.test.tsx, apps/web/src/components/files/imageDecode.browser.test.ts, apps/web/src/components/issue/IssueLinkPreview.browser.test.tsx, apps/web/src/components/pullRequest/PullRequestReactions.browser.test.tsx, apps/web/src/components/settings/SnoozePresetsSettings.browser.test.tsx, apps/web/src/components/ui/search-input.browser.test.tsx, apps/web/src/components/usage/UsageModelDialog.browser.test.tsx, apps/web/src/speech/browserVoiceInput.browser.test.ts.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.