Skip to content

Conversation

@habdelra
Copy link
Contributor

This PR updates our error docs to also capture any console.error log messages in our error doc for better understanding of the issue.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@habdelra habdelra marked this pull request as draft January 16, 2026 23:11
@habdelra habdelra requested a review from Copilot January 16, 2026 23:20
Copy link
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 enhances error documentation by capturing console.error and console.assert log messages that occur during prerendering operations and including them in error reports via the additionalErrors field. This provides better debugging context when renders fail.

Changes:

  • Added console error tracking infrastructure to the PagePool class with deduplication and limiting
  • Modified RenderRunner to merge console errors into error responses across all prerender methods
  • Added test coverage for console error capture when renders fail and successful renders with console errors

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/realm-server/prerender/page-pool.ts Added console error tracking with ConsoleErrorEntry type, storage by page ID, and methods to reset/retrieve console errors with deduplication logic
packages/realm-server/prerender/render-runner.ts Added #mergeConsoleErrors method and integrated it into all three prerender methods (card, module, file extract) to append console errors to error responses
packages/realm-server/tests/prerendering-test.ts Added test fixtures and test cases to verify console errors are captured on failure and ignored on success

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

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

Host Test Results

    1 files  ±  0      1 suites  ±0   1h 36m 27s ⏱️ + 3m 50s
1 887 tests +205  1 872 ✅ +207  15 💤 ±0  0 ❌  - 1 
1 902 runs  +206  1 887 ✅ +209  15 💤 ±0  0 ❌  - 2 

Results for commit 21ff6c7. ± Comparison against base commit 4eaa075.

This pull request removes 1 and adds 206 tests. Note that renamed tests count towards both.
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.a5ff887984183a9ed614.js, line 150984  While executing test: Integration | card-copy: can copy a card 
Chrome ‑ Integration | Store: added instance that was previously not saved will begin to auto save after being added
Chrome ‑ Integration | Store: an instance can be restored after a loader reset
Chrome ‑ Integration | Store: an instance can debounce auto saves
Chrome ‑ Integration | Store: an instance can live update thru an error state
Chrome ‑ Integration | Store: an instance live updates from indexing events for a code update
Chrome ‑ Integration | Store: an instance live updates from indexing events for an instance update
Chrome ‑ Integration | Store: an instance that started out with a local ID can be restored after a loader reset
Chrome ‑ Integration | Store: an instance will NOT auto save when its data changes, if the user does not have write permissions
Chrome ‑ Integration | Store: an instance will auto save when its data changes
Chrome ‑ Integration | Store: an unsaved instance live updates when realm event matching local ID is received
…

♻️ This comment has been updated with latest results.

@habdelra habdelra marked this pull request as ready for review January 17, 2026 00:10
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@habdelra habdelra requested a review from a team January 17, 2026 00:10
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