Skip to content

fix(e2e): anchor dashboard snapshots#26

Open
tiankaima wants to merge 1 commit into
mainfrom
fix/e2e-snapshot-seed-coverage
Open

fix(e2e): anchor dashboard snapshots#26
tiankaima wants to merge 1 commit into
mainfrom
fix/e2e-snapshot-seed-coverage

Conversation

@tiankaima
Copy link
Copy Markdown
Member

Summary

  • add a snapshot-only dashboard clock anchor so seeded dashboard screenshots use DEV_SEED_ANCHOR instead of wall-clock time
  • add atTime support for get_my_dashboard and get_next_class so MCP snapshots can render seeded next class/deadline/event data deterministically
  • pass the snapshot anchor into the exams tab client filter so the default unfinished filter shows seeded exams

Snapshot Evidence

  • fresh bun run snapshot:e2e completed for pages/API/MCP
  • get_my_dashboard snapshot now reports nextClass, 5 upcoming deadlines, and 10 upcoming events
  • /?tab=exams&snapshotAt=... now shows the 3 seeded exam cards instead of the empty filtered state

Verification

  • bun run test:integration
  • bun run verify:fast
  • bun run test:e2e:prepare
  • PLAYWRIGHT_REUSE_SERVER=0 bun run test:e2e

Note: bun run verify:full was first attempted while a manually-started standalone server was still running; Playwright reused that server with a localhost/127.0.0.1 origin mismatch, causing OAuth/MCP origin-sensitive failures. After stopping that server and rerunning E2E with PLAYWRIGHT_REUSE_SERVER=0, all 423 E2E tests passed.

Copilot AI review requested due to automatic review settings May 15, 2026 05:52
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
server-nextjs Error Error May 15, 2026 6:24am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes dashboard and MCP snapshots deterministic by adding an optional anchored reference time for seeded snapshot flows and related dashboard/MCP views.

Changes:

  • Adds snapshotAt dashboard page handling and passes anchored time into nav/overview/exams rendering.
  • Adds atTime support to get_my_dashboard and get_next_class.
  • Updates snapshot cases, integration coverage, and feature docs for anchored dashboard snapshots.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/dev/artifacts/snapshot-cases.ts Adds snapshot anchor query/arguments for dashboard page and MCP cases.
tests/integration/mcp-tools.test.ts Adds anchored dashboard assertions and stabilizes existing dashboard tests.
src/lib/mcp/tools/dashboard-tools.ts Adds optional atTime parsing and forwarding for dashboard MCP tools.
src/features/home/server/dashboard-overview-data.ts Allows dashboard overview/nav stats to use an injected reference time.
src/features/home/server/assistant-dashboard-snapshot.ts Allows assistant dashboard snapshot generation to use an injected reference time.
src/features/home/components/home-view.tsx Propagates anchored reference time to exams tab rendering.
src/features/home/components/exams-panel.tsx Forwards anchored reference time to the exams list.
src/features/home/components/exams-list.tsx Uses anchored time for completed/incomplete exam filtering.
src/app/page.tsx Parses debug-only snapshotAt and passes anchored time into dashboard data/components.
docs/features/overview.json Documents optional atTime support for dashboard MCP tools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/features/home/server/assistant-dashboard-snapshot.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd79dd5331

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/home/server/assistant-dashboard-snapshot.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81b09ae0e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/home/server/calendar-events.ts Outdated
Comment thread src/features/home/server/calendar-events.ts Outdated
Comment thread src/features/home/server/calendar-events.ts Outdated
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