Skip to content

Fix instant-false codemod to run on route segment filenames - #98880

Merged
devjiwonchoi merged 2 commits into
canaryfrom
jiwon/fix-instant-codemod-file-matching
Sep 21, 2026
Merged

devjiwonchoi merged 2 commits into
canaryfrom
jiwon/fix-instant-codemod-file-matching

Conversation

@devjiwonchoi

@devjiwonchoi devjiwonchoi commented Sep 18, 2026

Copy link
Copy Markdown
Member

Why?

The codemod incorrectly adds instant = false to helper files because its matcher matches layout.ts within custom-layout.ts and page.tsx within homepage.tsx.

How?

Require filenames to start with page., layout., or default., while preserving compound extensions. The codemod does not consult pageExtensions, so files such as page.test.tsx remain eligible.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T19:38:55.188355Z 7c8383e Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 7c8383e

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

Copy link
Copy Markdown

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: 873be42ea3

ℹ️ 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 packages/next-codemod/transforms/cache-components-instant-false.ts Outdated
Comment thread packages/next-codemod/transforms/__tests__/cache-components-instant-false.test.js Outdated
Expose unwanted instant opt-outs in prefixed helper filenames by exercising the production path filter on POSIX and Windows paths. Preserve coverage for route files and compound suffixes.
Require the filename after app directories to start with page., layout., or default. so helper files are left unchanged. Continue accepting compound suffixes without consulting pageExtensions.
@devjiwonchoi
devjiwonchoi force-pushed the jiwon/fix-instant-codemod-file-matching branch from 03f7999 to 7c8383e Compare September 21, 2026 19:08
@devjiwonchoi

Copy link
Copy Markdown
Member Author

@codex review again

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 7c8383e2c8

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

@devjiwonchoi devjiwonchoi changed the title Restrict instant opt-out codemod to route segment filenames Fix instant-false codemod to run on route segment filenames Sep 21, 2026
@devjiwonchoi
devjiwonchoi merged commit 9b16af8 into canary Sep 21, 2026
119 checks passed
@devjiwonchoi
devjiwonchoi deleted the jiwon/fix-instant-codemod-file-matching branch September 21, 2026 19:41
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