Skip to content

perf(frontend): preserve search identity and isolate snapshot polling - #765

Open
seonghobae wants to merge 4 commits into
mainfrom
perf/search-identity-sequential-polling-clean
Open

perf(frontend): preserve search identity and isolate snapshot polling#765
seonghobae wants to merge 4 commits into
mainfrom
perf/search-identity-sequential-polling-clean

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Buyer-visible problem

Active canvas search rebuilt decorated node.data objects during high-frequency position-only updates, defeating identity-based memoization and adding avoidable allocation/GC pressure. Snapshot polling also used overlapping setInterval requests, allowing an older response or rejection to overwrite state after the user selected a newer snapshot.

Exact current head

b2eb0e8c2ff19faab3a44cd171cbae33eea96176

The fail-first test commit is bf8f6d4f27e41e5cd11a6cc3b4b1b7bdf50826db. No predecessor-head review or check is reused.

Implemented bounded repair

  • cache search-decorated TableNodeData in a normalized-query-scoped WeakMap keyed by the immutable source data object;
  • preserve the exact derived data reference across equivalent normalized searches and position-only updates;
  • produce a fresh derived object when the query or source data identity changes;
  • replace overlapping interval polling with one immediate request followed by completion-scheduled setTimeout polling;
  • invalidate every snapshot, list-refresh, and error continuation on snapshot/project change and unmount;
  • stop after succeeded, failed, or not_found while retaining the terminal snapshot-list refresh;
  • add CHANGELOG.md and docs/doctoring/search-identity-and-sequential-polling.md with APA 7 references and monitoring/rollback guidance.

Observable regression evidence

frontend/src/App.searchPolling.test.tsx captures the payload passed to React Flow and proves exact reference identity with toBe. It drives a position-only update and a source-data replacement, reverses snapshot response order, rejects a superseded request with sensitive detail, and uses controlled timers to prove that a pending request prevents overlap, a non-terminal completion schedules exactly one later request, and a terminal response shuts polling down.

Exact-head checks

The exact current head has successful repository ci, Security Scan, SAST Semgrep, and CodeRabbit status. There are no inline review threads or submitted requested-change reviews.

Merge boundary

Merge only after every repository-required exact-head check remains successful, a qualifying independent non-author current-head approval exists, and branch protection accepts the unchanged head without bypass. Queued, cancelled, skipped-required, absent, stale-head, author-only, or status-only approval evidence is not accepted.

This clean replacement supersedes closed #693, whose accumulated 66-file branch could not support defensible review evidence.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 13c4793c-8387-4bbb-9291-118f911954ec

📥 Commits

Reviewing files that changed from the base of the PR and between 72afe6d and b2eb0e8.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • docs/doctoring/search-identity-and-sequential-polling.md
  • frontend/src/App.searchPolling.test.tsx
  • frontend/src/App.tsx

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 7, 2026 12:06
@seonghobae
seonghobae enabled auto-merge (squash) August 7, 2026 12:06
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