Skip to content

test(base): wait for an approved change to leave the review queue before reading - #41

Merged
jherr merged 1 commit into
mainfrom
cursor/base-e2e-approve-flake-2524
Nov 6, 2026
Merged

jherr merged 1 commit into
mainfrom
cursor/base-e2e-approve-flake-2524

Conversation

@jherr

@jherr jherr commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Merge chain: step 1 of 24. Base: main. Merge it first. Its head, 309856e, is unchanged: one commit on main 3b4a112.

Fixes a flaky app/base E2E test: "saved report snapshots stay fixed while live pages refresh; revisions require approval". It also fails intermittently on main.

What

Four steps clicked Approve & publish and read the result before the approval had finished. A new approveFirstChange helper clicks the first Approve & publish button, then waits until the review queue holds one fewer change. That's an observable signal rather than a timeout. Only app/base/e2e/base.spec.ts changes.

The same fix is already on the 4c branch (#36, commit 092cbbb), where the flake first showed up. This PR cherry-picks it onto main so it doesn't have to wait for the stack. When 4c rebases onto a main that contains this PR, that commit becomes empty and drops out.

How verified

GitHub Actions is out of billing, so this ran locally on main 3b4a112 plus this commit:

  • pnpm --filter base test:e2e passed 12/12 on three runs in a row.
  • oxfmt --check is clean on the changed file.

Merge chain (local verification, CI down)

No conflicts. The head is unchanged; 309856e already sits directly on main.

The chain tip's tree is exactly the integration rehearsal plus #46 (c4e6d7c), and the tip passes the full local suite. I simulated merging every PR in order, with a merge commit or a fast-forward at each step, and every step is clean. A plain squash of the next PR would conflict, because the squash commit isn't an ancestor of the next branch. To squash instead, first rebase the branch's one commit onto the new main; that rebase is always clean.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Tests
    • Streamlined interface test coverage for approving and publishing the first pending change.

…ore reading

Four E2E steps clicked Approve & publish and read the result before the
approval finished. approveFirstChange waits for the queue to shrink.

Co-authored-by: jherr <jherr@pobox.com>
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

TanStack is on CodeRabbit Free, which includes PR summaries. Ask your admin to upgrade for code reviews.

  • Ask an admin to upgrade

Open in CodeRabbit

Walkthrough

The end-to-end test file adds approveFirstChange and replaces repeated review navigation and approval steps in four tests with calls to that helper.

Changes: Review approval tests

Layer / File(s) Summary
Add and reuse approval helper
app/base/e2e/base.spec.ts
approveFirstChange navigates to /review, waits for network idle, checks for an approval button, clicks the first button, and waits for the count to decrease. Four tests now call the helper.

Estimated code review effort: 2 (Simple) | ~7 minutes

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: TanStack/cms
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 3b4a112
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Free
  • Run ID: c67c309c-4c8f-4462-ba57-6bc6a1d608bc
Commits

Reviewing files that changed from the base of the PR and between 3b4a112 and 309856e.

Files selected for processing: 1

  • app/base/e2e/base.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@changeset-bot

changeset-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 309856e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

2 participants