Skip to content

test: classify events directory CTAs via eventStatus - #17612

Closed
huang47 wants to merge 1 commit into
mainfrom
cursor/fix-events-e2e-cta-status-5d51
Closed

huang47 wants to merge 1 commit into
mainfrom
cursor/fix-events-e2e-cta-status-5d51

Conversation

@huang47

@huang47 huang47 commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The events directory CTA e2e selected upcoming vs past with startDateTime vs Date.now(), so an in-progress event (UCAN Jo Zhang during its window) was treated as past while product still classified it as upcoming via eventStatus / eventEnd. This test now selects with the same eventStatus helper. Test-only; no product CTA change.

Verification

From apps/website (or via --filter exec, which uses that package cwd):

pnpm --filter @comfyorg/website exec playwright test events.spec.ts --grep "cards carry the same upcoming and past CTAs"

Requires a website build first (pnpm --filter @comfyorg/website build); Playwright then starts pnpm preview. Locally this run: 1 passed (2.9s).

CI equivalent after build: pnpm --filter @comfyorg/website test:e2e.

Open in Web Open in Cursor 

Co-authored-by: ShihChi Huang <huge.huang+github@gmail.com>
@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-17612.vercel.app

Matches production — what ships if we release right now.

This commit: https://website-frontend-cj8qk7jvi-comfyui.vercel.app

Last updated: 2026-09-13T21:25:17Z for 4eedf2a

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 41580c4c-31cc-4d21-9956-a1f44eaeaf81

📥 Commits

Reviewing files that changed from the base of the PR and between 8190935 and 4eedf2a.

📒 Files selected for processing (1)
  • apps/website/e2e/events.spec.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The event end-to-end tests now use eventStatus to classify upcoming and past events. In-progress events are classified as upcoming instead of past.

Changes

Event status test classification

Layer / File(s) Summary
Update event status predicates
apps/website/e2e/events.spec.ts
The tests import eventStatus and use it for upcoming and past event checks. In-progress events no longer match the past-event branch.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: christian-byrne

Merge Risk: ⚪ Minimal · up to 4eedf

This change only corrects end-to-end test classification and does not alter production behavior.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
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.
End-To-End Regression Coverage For Fixes ✅ Passed PASS. The available changed-file metadata shows only apps/website/e2e/events.spec.ts. The custom check explicitly excludes changes exclusively in apps/website. The PR also updates an end-to-end te…
Website End-To-End Regression Coverage ✅ Passed PASS. The PR changes only apps/website/e2e/events.spec.ts. The custom check does not apply to changes confined to apps/website/e2e/. No website runtime file under apps/website/src/ or `apps/webs…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed-file list contains only apps/website/e2e/events.spec.ts. It does not include src/lib/litegraph/, src/ecs/, or a graph-entity-related file. The ADR compliance check is not applicable.
Title check ✅ Passed The title clearly identifies the test change: it updates events directory CTA classification to use eventStatus.
Description check ✅ Passed The description explains the problem, the test-only solution, and verification steps. It omits some template sections, but it provides the critical review information and remains relevant.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-events-e2e-cta-status-5d51

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

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##             main   #17612   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files        2730     2730           
  Lines      137651   137651           
  Branches    37213    37213           
=======================================
  Hits       113856   113856           
  Misses      22786    22786           
  Partials     1009     1009           
Flag Coverage Δ
website-unit 74.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@huang47
huang47 marked this pull request as ready for review September 13, 2026 21:28
@huang47
huang47 requested review from a team September 13, 2026 21:28
@huang47
huang47 enabled auto-merge September 13, 2026 21:29
@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 13, 2026
@huang47
huang47 marked this pull request as draft September 13, 2026 21:32
auto-merge was automatically disabled September 13, 2026 21:32

Pull request was converted to draft

@huang47
huang47 marked this pull request as ready for review September 13, 2026 21:33
@huang47
huang47 enabled auto-merge September 13, 2026 21:33

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is superseded by #17614 and should be closed without merging.

main already contains the same eventStatus correction, with one captured now value shared by both classifications. This branch now conflicts with main; relative to the current base, it would replace that shared timestamp with two separate clock reads and add a comment that restates the code.

I verified the targeted Playwright case on current main: 1 passed.

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes because current main already contains this correction in a safer form, and GitHub reports this head as conflicting with main. The clean outcome is to close this superseded PR rather than merge it.

Pre-merge blockers:

  • [P1] Superseded and conflicted. Current main contains commit 19a32b42aa, which makes the same eventStatus correction and uses one clock snapshot. GitHub REST reports mergeable: false and mergeable_state: dirty. Close this PR, or rebase and resolve the overlap entirely in favor of current main.
  • [P2] Two clock snapshots. Lines 514 and 556 call new Date() separately, with navigation and UI interaction between them. An event can cross its end boundary during that interval, so the two fixture selections can represent different states. Current main already fixes this with one captured now.
Findings without an anchorable line
  • [P3] PR description: The exact-head focused run confirms 1 passed, but it took 10.0 seconds in the recorded run, not the stated 2.9 seconds. Drop the unsupported duration and keep the pass result.
Existing findings confirmed
  • The earlier DrJKL review correctly identified that current main supersedes this PR and that the branch is now conflicted. I independently confirmed both against origin/main at 5e05f647fcba6948c0eacbcff453c61c13cca9fc and the current REST mergeability fields.
  • The earlier review also correctly identified the new comment as a restatement of the next line. The repository guidance asks us not to retain redundant comments.
Checked and cleared
  • The scoped Oxlint run reports one warning at line 692. It predates this PR and is outside the changed hunk.
  • Fallow audited the one changed file and found no introduced issue.
  • No candidate remains unverified.
Coverage
  • Standard-depth lanes: correctness, maintainability, idiomaticity, tests, and documentation.
  • Exact-head local checks passed: pnpm typecheck; website typecheck; focused Vitest, 24 tests; website build; focused Playwright, 1 test; scoped ESLint, Oxlint, and Oxfmt; git diff --check; Fallow audit.
  • Exact-head CI snapshot: 77 completed check runs, with 38 successful, 37 skipped, and 2 cancelled superseded risk-check runs. No check is pending or failed. The relevant website-e2e, website-unit, build, lint-and-format, and fallow checks succeeded.

// A past card links out instead of offering the menu.
const past = directoryEvents.find(
(event) => Date.parse(event.startDateTime) < Date.now() && event.link
(event) => eventStatus(event, new Date()) === 'past' && event.link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Capture one now value for both classifications. This second clock read happens after navigation, hydration, tab switching, and menu interaction. If an event ends during that interval, the upcoming and past fixtures come from different status snapshots, which makes the CTA assertions time-dependent. Current main already uses one shared now, so the simplest resolution is to close this superseded PR.

test('cards carry the same upcoming and past CTAs as the list', async ({
page
}) => {
// Match eventStatus / eventEnd so in-progress events aren't past.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Please delete this comment. It paraphrases the following eventStatus(...) === 'upcoming' call and exposes eventEnd, an implementation detail already owned by the helper.

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but has a conflict

@christian-byrne christian-byrne assigned huang47 and unassigned DrJKL Sep 20, 2026
@huang47

huang47 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Blocked — not pushing a fix here, because there is no valid fix left to push.

main already carries this correction in the safer form the review asked for: apps/website/e2e/events.spec.ts captures one const now = new Date() (line 512) and uses eventStatus(event, now) for both the upcoming and past lookups, with no paraphrasing comment. Both open threads on this branch — the second clock read (P2) and the redundant comment (P3) — resolve to exactly that code, so applying them would reproduce main verbatim and leave this PR with an empty diff. GitHub also reports this head (4eedf2a) as CONFLICTING with main.

The remaining outcome is the one the review already proposed: close this PR without merging. That is a maintainer decision, so nothing has been pushed or changed on this branch. Please close it, or say if it should be rebased and kept open for some reason not visible here.

@huang47 huang47 closed this Oct 26, 2026
auto-merge was automatically disabled October 26, 2026 05:23

Pull request was closed

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

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants