test(eval): accept a .js slice component - #293
Merged
Merged
Conversation
The slice component eval looked for a .tsx or .jsx file. The eval project has no tsconfig.json, so it is a JavaScript project. Next.js compiles JSX in .js files, and Slice Machine writes index.js for JavaScript projects. The eval failed a trial that wrote a valid component. The eval now also accepts .js. The failure message lists the files in the slice folder, so the next failure shows what the agent wrote. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194f9d6dLEYage35y3snFaD
angeloashmore
marked this pull request as ready for review
September 9, 2026 08:44
lihbr
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: #278
Description
The eval that checks for slice component implementation only checked for
.tsxor.jsx. The example project writes to.jsinstead.This PR updates the eval to support all three valid extensions.
Checklist
Preview
How to QA 1
In a container or a disposable VM:
🤖 Generated with Claude Code
https://claude.ai/code/session_0194f9d6dLEYage35y3snFaD
Note
Low Risk
Test-only change to file discovery and assertion messaging; no production or runtime behavior affected.
Overview
Updates the writes a slice component eval so it discovers generated slice React files with
.jsas well as.tsxand.jsx, by changing the filename regex from one that only matchedtsx/jsxto/\.(tsx|jsx?)$/.When no matching file is found, the assertion now fails with a message listing the actual files in
slices/Testimonial/to make eval failures easier to debug.Reviewed by Cursor Bugbot for commit 50ef6a1. Bugbot is set up for automated code reviews on this repo. Configure here.
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩