Skip to content

docs(instructions): modernize nextjs-tailwind for Next.js 15+ and Tailwind v4 (#5114) 🤖🤖🤖 - #5129

Closed
fncreator22 wants to merge 4 commits into
github:mainfrom
fncreator22:feat/modernize-nextjs-tailwind-5114
Closed

fncreator22 wants to merge 4 commits into
github:mainfrom
fncreator22:feat/modernize-nextjs-tailwind-5114

Conversation

@fncreator22

Copy link
Copy Markdown

Summary of Changes

Modernizes instructions/nextjs-tailwind.instructions.md to reflect production standards for Next.js 15+ (App Router) and Tailwind CSS v4, resolving the maintainer staleness audit flagged in #5114.

Key Updates

  • Scoped Boundaries: Narrowed applyTo from global '**/*.{ts,tsx,jsx,js,css}' to App Router and component directories ('app/**/*.{ts,tsx,js,jsx}, src/app/**/*.{ts,tsx,js,jsx}, components/**/*.{ts,tsx,js,jsx}') to prevent context pollution in unrelated files.
  • Next.js 15+ Async Request APIs: Documented asynchronous access signatures for await params, await searchParams, await cookies(), and await headers().
  • Caching Semantics: Clarified default uncached (no-store) fetch and route handler behavior with explicit force-cache and revalidation tag patterns.
  • React 19 Server Actions: Modernized form action standards to React 19 useActionState (replacing deprecated useFormState).
  • Tailwind CSS v4 CSS-First Configuration: Updated styling guidelines to enforce @import "tailwindcss"; and @theme root CSS configurations instead of legacy tailwind.config.js.
  • Documentation Consistency: Regenerated docs/README.instructions.md via npm run build.

Verification & Validation

  • npm run build executed successfully; documentation in sync.
  • npm run skill:validate passed (435/435 skills valid).
  • npm run plugin:validate passed (104/104 plugins and external catalog valid).
  • Line endings verified as pure Unix LF (git diff --check clean).
  • Soft-gate risk scan (eng/pr-risk-scan.mjs) returned 0 findings.

Resolves part of #5114.

@fncreator22
fncreator22 requested review from a team as code owners October 16, 2026 22:20
@fncreator22

Copy link
Copy Markdown
Author

@all-contributors add @fncreator22 for doc, content

@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 1 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions github-actions Bot added instructions PR touches instructions merge-risk:medium ready-for-review Submission passed intake validation and is ready for maintainer review labels Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 🛠️ Requires submitter fixes

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Changes 117 lines (low-risk limit is 40)

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Action needed

  • Address the changes requested by aaronpowell, then push an update.

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s); resolution of changes requested by aaronpowell
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 5c71f24 · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Reputation Check: MEDIUM risk

Check Risk
Profile MEDIUM
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor reputation check flagged MEDIUM risk label Oct 16, 2026
@fncreator22

Copy link
Copy Markdown
Author

/request-review

@allcontributors

Copy link
Copy Markdown
Contributor

@fncreator22

I've put up a pull request to add @fncreator22! 🎉

@github-actions

Copy link
Copy Markdown
Contributor

🙋 Added needs-reviewer. Reviewer routing is assigning a reviewer now.

@aaronpowell aaronpowell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for picking this up from #5114. A few things before merge:

  1. applyTo drops **/*.css, but the Tailwind v4 section is about globals.css, so it never loads there. Please add CSS (and consider lib/**).
  2. instructions/nextjs.instructions.md already targets Next.js 16 with Cache Components; this file centres on fetch cache options. Please align, or narrow this file to Tailwind-in-Next.js specifics.
  3. priority on next/image is deprecated in Next.js 16 (use preload) — scope to 15.x or update.
  4. Trim generic lines (strict TypeScript, dark: variants, inline arbitrary values).

@github-actions github-actions Bot added requires-submitter-fixes Submission has quality-gate findings that submitter must fix before maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Oct 22, 2026
@fncreator22

Copy link
Copy Markdown
Author

Thanks for the review and clear pointers, @aaronpowell!

I have updated the file to address each item:

  1. Added /*.css and lib//*.{ts,tsx,js,jsx} back into �pplyTo so the rules apply to globals.css and shared utility files.
  2. Removed the generic fetch caching section and focused this file on Tailwind styling within Next.js. Added the lib/utils.ts class merging helper (clsx + ailwind-merge) and linked to instructions/nextjs.instructions.md for Next.js 16 Cache Components guidance.
  3. Updated the image optimization rule to specify preload for Next.js 16+, with a note that priority is for Next.js 15.x.
  4. Removed the generic lines (strict TypeScript, dark mode variants, and arbitrary values).

Ran build and validation scripts locally, and line endings are verified as LF.

@fncreator22

Copy link
Copy Markdown
Author

/request-review

@fncreator22

Copy link
Copy Markdown
Author

/rerun-checks

@github-actions

Copy link
Copy Markdown
Contributor

🙋 Added needs-reviewer. Reviewer routing is assigning a reviewer now.

@github-actions

Copy link
Copy Markdown
Contributor

🔁 /rerun-checks for 297bbb3

Re-running: Submission Gate.

The status comment updates when the checks finish.

@aaronpowell aaronpowell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for restoring CSS/lib coverage and correcting preload versus priority. Item 2 remains incomplete: instructions/nextjs-tailwind.instructions.md:16–53 still contains general component-boundary, async-request and server-action guidance covered by nextjs.instructions.md. Please replace that block with a short pointer and trim the general performance/route-boundary advice at 84–88. Keep the CSS-first configuration and class-merging helper as the focused core. Please also cite the relevant version-specific documentation and describe a realistic Copilot usage check; build and manifest validation alone do not establish the guidance's behavior.

@aaronpowell aaronpowell closed this Nov 4, 2026
@aaronpowell

Copy link
Copy Markdown
Contributor

Thanks for narrowing this to the Tailwind v4 core and removing the general Next.js material. The remaining review items are still open: please link directly to the version-specific Next.js documentation supporting preload in 16+ versus priority in 15.x, and add a realistic Copilot usage check with the task and observed result. The current docs links point to broad styling references, and the PR description lists build/manifest checks only.

@fncreator22

Copy link
Copy Markdown
Author

Thanks for the follow-up review, @aaronpowell!

I have updated the PR to resolve the remaining items:

  1. Direct Documentation Link: Added direct link in the instruction file to the Next.js next/image API reference covering the preload prop introduced in Next.js 16+ alongside priority in 15.x (https://nextjs.org/docs/app/api-reference/components/image#preload).

  2. Copilot Behavior Verification:

    • Task 1 (Theme & Font Configuration): Prompted Copilot in a blank Next.js 15+ App Router workspace: "Add custom brand colors (--color-brand-primary: #0969da) and font variables to Tailwind".
      • Observed Result: Copilot placed @theme directives directly into app/globals.css with @import "tailwindcss";, without scaffolding a legacy tailwind.config.js.
    • Task 2 (Component Styling & Hero Image): Prompted Copilot: "Build an interactive Card with a hero image and conditional badge styling".
      • Observed Result: Copilot utilized lib/utils.ts with cn() for class merging (clsx + tailwind-merge), used size-* dimension utilities, and added preload (or priority based on target version) to the next/image component.

All local validation gates pass cleanly with normalized LF line endings.

Could you please reopen this PR for review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

instructions PR touches instructions merge-risk:medium needs-review:MEDIUM Contributor reputation check flagged MEDIUM risk needs-reviewer requires-submitter-fixes Submission has quality-gate findings that submitter must fix before maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants