Skip to content

Conversation

@lukemelia
Copy link
Contributor

@lukemelia lukemelia commented Jan 28, 2026

Summary

  • Extends file indexing with a render phase that captures FileDef display format templates (isolated, embedded, fitted, atom, head, icon) as prerendered HTML
  • Stores HTML in existing boxel_index HTML columns (no DB migration needed)
  • Rendering is non-fatal — if it fails, file metadata is still stored without HTML
  • Adds fileRender flag to RenderRouteOptions and FileRenderResponse/FileRenderArgs types to the Prerenderer interface
  • Adds prerenderFileRenderAttempt to the render runner, with retry-with-clearCache support
  • Adds HTTP endpoint /prerender-file-render to the prerender server
  • Adds test-context support via card-prerender.gts fileRenderPrerenderTask

Closes CS-10124

🤖 Generated with Claude Code

Extend file indexing with a render phase that creates a FileDef instance
and captures its display format templates (isolated, embedded, fitted,
atom, head, icon) as prerendered HTML, stored in the existing boxel_index
HTML columns. Rendering is non-fatal — if it fails, file metadata is
still stored without HTML.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Jan 28, 2026

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 45m 48s ⏱️ + 4m 5s
1 925 tests ±0  1 908 ✅ ±0  17 💤 ±0  0 ❌ ±0 
1 940 runs  ±0  1 923 ✅ ±0  17 💤 ±0  0 ❌ ±0 

Results for commit 46555b4. ± Comparison against base commit afa2175.

♻️ This comment has been updated with latest results.

lukemelia and others added 8 commits January 28, 2026 19:18
- Remove unused fileDefCodeRef destructuring in render route
- Fix prettier formatting in card-prerender, prerender-app, render-runner
- Add 'file-render' to kind union type in prerender-proxy-test
- Fix shouldRetryWithClearCache signature line wrapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The extract phase already consumes the clear-cache flag, so the render
phase doesn't need to consume it again.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Files with executable extensions (modules) and card JSON files already
have their own prerender paths. Running the FileDef HTML render phase
for these files added ~168 extra Puppeteer page transitions during boot
indexing, causing CI test timeouts. Now only non-code, non-card files
(like .txt, .png, .md) go through the file render phase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The new file HTML render phase adds Puppeteer page transitions for
every file during boot indexing. On CI hardware this pushes the total
indexing time past the previous 60s limit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Each Puppeteer page transition costs 2-3 seconds, and rendering all
6+ formats (isolated, head, atom, icon, fitted, embedded) for every
file during boot indexing made total time O(files × formats × 3s).
With ~28 files in test realms, this exceeded test timeouts.

Reduce file render to isolated HTML only. Additional formats can be
added back once the rendering pipeline is optimized for batch/parallel
operation. The FileRenderResponse type and index columns remain
unchanged — they simply receive null for the deferred formats.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… file renders

Three root causes of realm-server test timeouts:

1. Missing /prerender-file-render proxy route in manager-app.ts caused boot
   servers to 404 when calling prerenderFileRender through the manager.

2. expectedId mismatch in render-runner.ts: captureResult expected URL without
   .json extension but the render route sets cardId to the raw URL including
   .json, causing each .json file to timeout at 30s waiting for a DOM match.

3. Module files (.gts/.ts/.js) got redundant file renders via indexFile()
   since visitFile() always falls through to indexFile() after indexModule().
   Added hasModulePrerender flag to skip file render for modules that already
   produce HTML through their module prerender path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The three root causes of the timeout have been fixed (missing manager
proxy route, expectedId mismatch, redundant module file renders), so
the inflated 180s timeout is no longer needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia requested review from a team and backspace January 29, 2026 22:02
@lukemelia
Copy link
Contributor Author

@codex Review please

Copy link

@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: 1c6ddf539e

ℹ️ 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".

lucaslyl and others added 15 commits February 2, 2026 11:57
…ontent

Use replacer functions instead of replacement strings in injectHeadHTML
and injectIsolatedHTML to prevent JavaScript's String.prototype.replace()
from interpreting dollar signs in card content (e.g. "$1", "$3") as
regex backreferences. This was corrupting the HTML document structure
and causing blank pages for cards with currency values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Host mode stack layering and scroll fixes

* test update

* remove unneeded transitions
Cards should not break out of their bounding box, so warn the AI bot
against using `position: fixed` in card styles via the _lint endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use GlimmerElementNode (not GlimmerElement) to match the AST type
  produced by ember-eslint-parser
- Fix prettier formatting in integration test
- Add unit tests for the rule in eslint-plugin-boxel covering valid
  cases (relative, absolute, sticky, no style) and invalid cases
  (with/without space, extra whitespace, multiple occurrences)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The eslint-plugin-boxel package has unit tests that were not being
run in CI. Add a dedicated path filter and test job so regressions
in custom ESLint rule logic are caught.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The fileRender path was calling cardApi.createFromSerialized without a
store, falling back to FallbackCardStore which uses unauthenticated
fetch. This routes file-meta creation through the RenderStoreService
so linked field loads use the realm's auth context.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia merged commit 1bf3e37 into main Feb 2, 2026
105 checks passed
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.

7 participants