Skip to content

refactor(web): remove virtual list polling#123

Merged
xingkaixin merged 1 commit into
mainfrom
feat/cs-42-event-driven-virtual-list
Jul 11, 2026
Merged

refactor(web): remove virtual list polling#123
xingkaixin merged 1 commit into
mainfrom
feat/cs-42-event-driven-virtual-list

Conversation

@xingkaixin

Copy link
Copy Markdown
Owner

Summary

  • replace the virtual message list's permanent 100 ms layout polling with event-driven updates
  • rebind scroll and resize listeners when the effective scroll container changes
  • react to container geometry, ancestor layout attributes, and font loading events
  • add regression coverage for idle behavior, container resize, and asynchronous row growth

Why

Every virtualized detail view performed geometry reads ten times per second even when the page was idle. Existing observers covered row growth, but the viewport lifecycle still depended on polling for container and layout changes.

The updated lifecycle coalesces relevant events with requestAnimationFrame and performs no recurring work while the page is stable.

Validation

  • pnpm lint
  • pnpm format:check
  • pnpm build
  • pnpm test (650 passed)
  • pnpm test:e2e (6 passed)

Closes CS-42

@xingkaixin xingkaixin marked this pull request as ready for review July 11, 2026 11:42
@xingkaixin xingkaixin merged commit 5cfedd8 into main Jul 11, 2026
7 checks passed
@xingkaixin xingkaixin deleted the feat/cs-42-event-driven-virtual-list branch July 11, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant