Skip to content

test(e2e): ignore annotation catch-up during pane-drag network assert - #227

Merged
cursor[bot] merged 2 commits into
masterfrom
cursor/pane-drag-network-race-3498
Sep 26, 2026
Merged

cursor[bot] merged 2 commits into
masterfrom
cursor/pane-drag-network-race-3498

Conversation

@Fooftilly

@Fooftilly Fooftilly commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Unrelated Full E2E flake blocking #226 tip 552c240 (run 36233320046 shard 2/4):

WorkspaceDragDropTests.test_drag_visible_pane_move_preserves_runtimes — AssertionError: pane move must not fetch: /api/works/

On that same run, #226’s Group /sync-state targets passed (test_group_metadata_save_failure_restores_button_for_retry ok on 1/4; sibling ok on 4/4). #226 diff touches only Group save-intercept helpers (~L2972 / ~L4325–4470) — no drag / WorkspaceDragDropTests / workspace-move path.

Runtime identity on the failing run still held (PDF/notes/mounted unchanged); the assert was a broad /api/works/ substring match racing late PDF annotation catch-up GETs from tree build.

Fix

Same pattern as Main-close runtime preservation in this file:

  1. _wait_pdf_annotation_gates_idle before arming the request listener.
  2. Assert entity detail GETs only via _url_is_entity_detail_get for the four leaves’ concrete paths (not /annotations-snapshot, /opened, etc.).

No timeout inflation, retries, sleeps, or empty tip-clears. Does not tip-clear #226.

Validation

  • Local stress: 12/12 loops with --jobs 2 --no-pointer-capture.

Coordination

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Tests
    • Updated end-to-end checks for pane movement to account for PDF loading activity and distinguish entity-detail requests from streaming and subresource requests.

test_drag_visible_pane_move_preserves_runtimes failed on #226 Full E2E
with "pane move must not fetch: /api/works/" while runtime identity still
held. Broad substring matching attributed late PDF annotation catch-up
GETs from tree build to the spatial move.

Wait for annotation gates idle before arming the listener (same as
Main-close preservation), and assert entity detail GETs only via
_url_is_entity_detail_get.

Co-authored-by: Nikola Perović <Fooftilly@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Fooftilly/PRKS/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: a4c1cb0e-e56a-4b89-9a8d-3b3e3575fbe4

📥 Commits

Reviewing files that changed from the base of the PR and between e4b9515 and 84d165b.

📒 Files selected for processing (1)
  • tests/e2e/test_app.py

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


📝 Walkthrough

Walkthrough

The pane-move end-to-end test waits for PDF annotation materialization to settle before tracking requests. It excludes Range requests and checks specific Work, Person, Position, and PDF detail GETs.

Changes

Pane-Move Request Test

Layer / File(s) Summary
Pane-move request tracking
tests/e2e/test_app.py
The test waits for annotation materialization gates to become idle and excludes Range requests from the count. It uses _url_is_entity_detail_get to check specific entity-detail and PDF GETs.

Priority: ⬇️ Low

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

Change: Other

Suggested reviewers: cursoragent

Merge Risk: ⚪ Minimal · up to 84d16

The pane-move test retains checks for its fixture entities while ignoring annotation catch-up and PDF streaming requests; no material merge risk is evident.

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: excluding PDF annotation catch-up requests from the pane-drag E2E network assertion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Prks Engineering Invariants ✅ Passed PASS. The PR changes only tests/e2e/test_app.py. The new wait uses observable PDF gate state, and the request assertion uses exact entity-detail paths while excluding Range streaming requests. This …
Ui Design Contract ✅ Passed PASS: The pull request changes only tests/e2e/test_app.py. The diff adds test request filtering and assertions; it changes no frontend implementation or user-visible interaction. The UI design contr…
Offline And Sync Coherence ✅ Passed PASS — The pull request changes only tests/e2e/test_app.py. It adjusts pane-drag request filtering and assertions, including PDF annotation catch-up and Range requests. It does not change offline be…
✨ Finishing Touches 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

@Fooftilly
Fooftilly marked this pull request as ready for review September 26, 2026 09:54
greptile-apps[bot]

This comment was marked as off-topic.

@github-actions github-actions Bot deleted a comment from chatgpt-codex-connector Bot Sep 26, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Harden pane-drag E2E assertion against annotation catch-up

🧪 Tests 🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Waits for PDF annotation catch-up before monitoring pane-drag requests.
• Restricts no-fetch assertions to concrete entity detail endpoints.
• Prevents unrelated annotation requests from causing false E2E failures.
Diagram

sequenceDiagram
    participant T as Pane-drag test
    participant G as Annotation gate
    participant P as Browser page
    participant L as GET listener
    T->>G: Wait for idle
    G-->>T: Catch-up settled
    T->>P: Register GET listener
    T->>P: Drag visible pane
    P-->>L: Report GET URLs
    T->>T: Verify runtime identity
    T->>L: Match entity details
    L-->>T: No remount fetches
Loading
High-Level Assessment

The current approach is optimal: it reuses the established annotation-idle gate and tests the actual invariant—no entity-detail refetches during a move. Timeout inflation, sleeps, retries, or endpoint exclusion lists would mask races or become brittle as annotation routes evolve.

Files changed (1) +16 / -2

Tests (1) +16 / -2
test_app.pyIsolate pane-drag network assertions from annotation catch-up +16/-2

Isolate pane-drag network assertions from annotation catch-up

• Waits for pending PDF annotation activity to become idle before recording drag-related GET requests. Replaces broad API substring checks with concrete entity paths and the existing entity-detail URL matcher, avoiding false failures from annotation and opened-state endpoints.

tests/e2e/test_app.py

Comment thread tests/e2e/test_app.py
Qodo: dropping /api/pdfs/ left PDF remounts to the identity check alone.
Add concrete /api/pdfs/<file> detail paths for both Work leaves, and ignore
Range PDF streaming so byte-range loads are not treated as remounts.

Co-authored-by: Nikola Perović <Fooftilly@users.noreply.github.com>
@cursor
cursor Bot merged commit 208493b into master Sep 26, 2026
23 of 25 checks passed
@cursor
cursor Bot deleted the cursor/pane-drag-network-race-3498 branch September 26, 2026 10:48
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