3813 Commits

Author SHA1 Message Date
next-js-bot[bot] d0ac8828c2 v16.3.2 2026-08-21 09:07:01 +00:00
next-js-bot[bot] 3d32eb870f v16.3.1 2026-08-13 22:06:37 +00:00
next-js-bot[bot] d73f5622e2 v16.3.0 2026-08-03 20:06:44 +00:00
next-js-bot[bot] 4fd843fb48 v16.3.0-canary.107 2026-08-02 23:34:28 +00:00
next-js-bot[bot] 9480f7f9ff v16.3.0-canary.106 2026-08-01 23:33:55 +00:00
next-js-bot[bot] a8dcd2562f v16.3.0-canary.105 2026-07-31 23:35:12 +00:00
next-js-bot[bot] 38f0cdee46 v16.3.0-canary.104 2026-07-30 23:34:58 +00:00
Steven 8ca5321d08 fix(create-next-app): make AGENTS.md blue (#95432)
I noticed that this last question for AGENTS.md doesn't have any blue
highlighted word.

So I made AGENTS.md blue to follow the convention of the others.

<img width="865" height="163" alt="image"
src="https://github.com/user-attachments/assets/d10f74e1-f5ec-4c8a-9c6d-8d01b9c1abf3"
/>

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2026-07-30 15:54:22 -04:00
next-js-bot[bot] f3edea1b06 v16.3.0-canary.103 2026-07-29 23:35:42 +00:00
next-js-bot[bot] 0d5ff0d321 v16.3.0-canary.102 2026-07-28 23:34:15 +00:00
next-js-bot[bot] cf1e001f40 v16.3.0-canary.101 2026-07-28 20:51:42 +00:00
next-js-bot[bot] 267d6b1a17 v16.3.0-canary.100 2026-07-28 20:42:44 +00:00
next-js-bot[bot] ad618bf13f Restore canary version 16.3.0-canary.99 after v16.3.0-preview.10 preview release 2026-07-28 15:54:36 +00:00
next-js-bot[bot] 35917f58d2 v16.3.0-preview.10 2026-07-28 15:54:33 +00:00
next-js-bot[bot] e70495c1ee v16.3.0-canary.99 2026-07-28 14:57:37 +00:00
next-js-bot[bot] aae4179ac6 v16.3.0-canary.98 2026-07-27 23:36:11 +00:00
next-js-bot[bot] 367e5215bf v16.3.0-canary.97 2026-07-25 23:35:04 +00:00
next-js-bot[bot] 4a432e4d79 v16.3.0-canary.96 2026-07-24 23:35:57 +00:00
next-js-bot[bot] cf10c50a65 v16.3.0-canary.95 2026-07-23 23:33:24 +00:00
next-js-bot[bot] 5d662af3cd Restore canary version 16.3.0-canary.94 after v16.3.0-preview.9 preview release 2026-07-23 12:18:57 +00:00
next-js-bot[bot] 838bd19bde v16.3.0-preview.9 2026-07-23 12:18:54 +00:00
next-js-bot[bot] b2144ddb79 v16.3.0-canary.94 2026-07-22 23:34:52 +00:00
next-js-bot[bot] 66c2e0a2ab Restore canary version 16.3.0-canary.93 after v16.3.0-preview.8 preview release 2026-07-22 09:55:36 +00:00
next-js-bot[bot] bedbdcfe66 v16.3.0-preview.8 2026-07-22 09:55:34 +00:00
next-js-bot[bot] c77f3ded55 v16.3.0-canary.93 2026-07-21 23:34:26 +00:00
next-js-bot[bot] 4d122a7df1 Restore canary version 16.3.0-canary.92 after v16.3.0-preview.7 preview release 2026-07-21 18:02:33 +00:00
next-js-bot[bot] d4b0dc3158 v16.3.0-preview.7 2026-07-21 18:02:30 +00:00
next-js-bot[bot] 80fd3fed69 v16.3.0-canary.92 2026-07-21 17:27:08 +00:00
Vercel Release Bot cee9824aa5 Upgrade React from 172742b4-20260716 to 81e442ea-20260721 (#96016)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-21 17:25:13 +00:00
Joseph c0a7b91bec cna: use LayoutProps helper in TS layout templates (#95675)
Update create-next-app templates to use `LayoutProps`
2026-07-21 02:17:52 +02:00
next-js-bot[bot] 4dea35dbd2 v16.3.0-canary.91 2026-07-20 23:34:46 +00:00
next-js-bot[bot] 163e45e401 v16.3.0-canary.90 2026-07-19 23:34:16 +00:00
next-js-bot[bot] 0491db047b v16.3.0-canary.89 2026-07-17 23:32:07 +00:00
Aurora Scharff 8a06e9e384 fix(agent-rules): pad managed AGENTS.md block with blank lines (#95892)
### What

The generated `nextjs-agent-rules` block in `AGENTS.md` glued the `<!--
BEGIN:nextjs-agent-rules -->` / `<!-- END:nextjs-agent-rules -->`
comment markers directly against the `#` heading and the surrounding
paragraphs:

```md
<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know
...
<!-- END:nextjs-agent-rules -->
```

Markdown formatters (Prettier, and CommonMark tooling in general) treat
block-level HTML comments as needing surrounding blank lines, so
formatting an `AGENTS.md` reflows the block:

```md
<!-- BEGIN:nextjs-agent-rules -->

# This is NOT the Next.js you know
...

<!-- END:nextjs-agent-rules -->
```

On the next `next dev`, the generator detects the block as non-current
and rewrites it back to the glued form. For any project that runs
Prettier over `AGENTS.md`, this produces churn on every commit — the
opposite of what the block's own "commit it to keep the tree clean" note
promises.

### Change

Emit blank lines around the markers so the generated block is
formatter-stable. Both generators are updated together:

- `packages/next/src/server/lib/generate-agent-files.ts` (`next dev`
writer)
- `packages/create-next-app/helpers/generate-agent-files.ts`

The `next-codemod` `agents-md` refresh delegates to the installed
package's generator, so it needs no change. The docs sample in
`ai-agents.mdx` and this repo's own `packages/next/AGENTS.md` already
use the blank-line shape, so they now match what's generated.

### Notes

- Existing projects get a one-time block rewrite on their next `next
dev` (expected — the block is described as re-added by `next dev`),
after which it stays stable under formatting.
- The `agent-rules-auto-generate` test asserts against the live
generator output, so it tracks the new shape automatically.
2026-07-17 14:15:52 +02:00
next-js-bot[bot] 68033b385a v16.3.0-canary.88 2026-07-16 23:32:58 +00:00
next-js-bot[bot] 50925bb80a v16.3.0-canary.87 2026-07-15 23:34:23 +00:00
next-js-bot[bot] 4f69a33548 v16.3.0-canary.86 2026-07-14 23:31:39 +00:00
next-js-bot[bot] 1ecd8f1b63 v16.3.0-canary.85 2026-07-13 23:32:10 +00:00
next-js-bot[bot] 08f7c980bf Restore canary version 16.3.0-canary.84 after v16.3.0-preview.6 preview release 2026-07-13 19:58:15 +00:00
next-js-bot[bot] ea219c9088 v16.3.0-preview.6 2026-07-13 19:58:13 +00:00
next-js-bot[bot] a7bf1202de v16.3.0-canary.84 2026-07-12 23:33:22 +00:00
next-js-bot[bot] 1bd2fd585a v16.3.0-canary.83 2026-07-10 23:34:00 +00:00
next-js-bot[bot] a30d8b2c17 v16.3.0-canary.82 2026-07-09 23:41:26 +00:00
Jude Gao eeb59c12aa Make the agent-rules block verifiable and self-upgrading (#95467)
Agents have started flagging the managed `nextjs-agent-rules` block as
prompt injection and refusing to follow or commit it (#95130). Headless
A/B evals (Claude Code + Sonnet 5, pnpm-monorepo and standalone-npm
fixtures, `next@16.3.0-preview.5`) isolate the triggers:
`node_modules/next/dist/docs/` doesn't resolve from the workspace root
in non-hoisted installs, the "maintained by `next dev`" claim is
unverifiable, and the **Keep this block** paragraph reads as a
self-persisting instruction. The failure concentrates on the uncommitted
state a fresh `next dev` run produces.

The block now anchors the docs path to the block file's directory with a
monorepo note, and replaces the commit imperative with a verify pointer
to `generate-agent-files.js` plus the reason committing it keeps the
tree clean. This is the only change in this PR, and it was ablated in
isolation — an A/A run of the baseline first established the noise floor
(block committal 0/5, 0/8, 1/8 across three independent baseline
batches):

| Metric | Old block | New block |
|
---------------------------------------------------------------------------------
| --------- | --------- |
| Uncommitted block, diff-review prompt — committed the block | 1/21 |
8/20 |
| Uncommitted block, diff-review prompt — final message calls it a
prompt injection | 12/21 | 4/20 |
| Committed block, task prompts — injection flags | 0/15 | 0/15 |
| Docs reads/run — standalone app, write tests (n=2) | 4.5 | 5.0 |
| Docs reads/run — monorepo, add page (n=3) | 3.7 | 4.0 |
| Docs reads/run — monorepo, write tests (n=10) | 3.4 | 2.6 |

Committal improves at p = 0.008 and injection accusations drop at p =
0.016 (Fisher exact); runs that follow the verify pointer conclude
"genuine framework-scaffolded content, not injected". A candidate
follow-up — appending "commit this change" to the dev-server log line —
was ablated separately and does nothing: the line reaches the agent's
transcript in 12/12 dev-session runs but committal stayed 0/6 vs 0/6, so
it is not included. The upsert machinery that delivers this rewording to
existing projects is #95470.
2026-07-08 22:59:06 -04:00
next-js-bot[bot] 4bfa190166 v16.3.0-canary.81 2026-07-08 23:37:00 +00:00
Aurora Scharff b7f84ed7c7 fix(create-next-app): render filenames in Geist Mono so the preloaded font is used (#95471)
## What?

Render the filename in the "edit the … file" line using **Geist Mono**
across all `create-next-app` templates, so the preloaded font is
actually used.

## Why?

Every fresh app logged a browser warning: the Geist Mono `.woff2` is
preloaded but never used, because the redesign in #81945 dropped the
last monospace element (the old `<code>app/page.tsx</code>`). Rather
than stop preloading the font (this PR's original approach), we _use_ it
— the filename renders in Geist Mono. That clears the warning at its
source and keeps the template showcasing both flagship fonts (two fonts,
no flash of unstyled text).

## How?

- Reverted the `preload: false` change.
- Wrapped the filename in the intro line in a `<code>` rendered in Geist
Mono, styled as a small inline code chip (slightly smaller size, subtle
rounded background, padding) so it reads as a code token rather than
plain heading text:
- Tailwind templates → utility classes (`font-mono` maps to
`--font-geist-mono` via `@theme inline`).
- CSS-module templates → a `.code` class using `var(--font-geist-mono)`;
the chip background uses `color-mix(currentColor …)` so it adapts to
light/dark automatically.
- Applied across all four families (`app`, `app-tw`, `default`,
`default-tw`), JS + TS.

## Screenshots

| | Before | After |
| --------- | --------------------------------------------------- |
-------------------------------------------- |
| **Light** | <img width="2400" height="1520"
alt="cna-geist-mono-before"
src="https://github.com/user-attachments/assets/cf374265-7fdf-4c3b-9f66-05436f966fc9"
/> | <img width="2400" height="1520" alt="cna-geist-mono-after"
src="https://github.com/user-attachments/assets/ae55166d-26d8-4cc2-8268-90c5996d2431"
/> |
| **Dark** | <img width="2400" height="1520"
alt="cna-geist-mono-before-dark"
src="https://github.com/user-attachments/assets/d813adac-85c0-4044-813f-9489b0b4faa7"
/> | <img width="2400" height="1520" alt="cna-geist-mono-after-dark"
src="https://github.com/user-attachments/assets/01199df9-4842-46e0-a73e-a3ba0ef78ad2"
/> |

Before: filename in Geist Sans, preloaded-but-unused warning in the
console. After: filename in Geist Mono, no warning.

<!-- NEXT_JS_LLM_PR -->
2026-07-08 21:43:00 +02:00
Aurora Scharff ea16dfb034 fix(create-next-app): pin both axes on Tailwind template logos to silence aspect-ratio warning (#95609)
## Summary

The default `create-next-app` Tailwind templates (`app-tw` and
`default-tw`) intermittently log the `next/image` warning "Image with
src … has either width or height modified, but not the other" for the
`next.svg` and `vercel.svg` logos.

Tailwind v4 Preflight ships `img { height: auto }`, which overrides the
`height` attribute `next/image` writes. The browser then computes height
from `width × the SVG viewBox ratio`. The declared dimensions do not
match the viewBox ratio (`vercel.svg`: `16×14` vs viewBox `1155:1000`;
`next.svg`: `100×20` vs viewBox `394:80`), so the computed height is
fractional (`13.85px`, `20.30px`) and snaps to a different integer
depending on SVG decode timing, Fast Refresh reloads, and device pixel
ratio / zoom. That timing/rounding sensitivity is why the warning
appears only sometimes.

This pins both axes with utility classes (`h-5 w-[100px]` on `next.svg`,
`h-[14px] w-4` on `vercel.svg`) so neither dimension falls back to
`auto`. The rendered size always matches the declared props, so the
check cannot trip, at any DPR.

Only the Tailwind templates are affected; the non-Tailwind
`app`/`default` templates have no `img { height: auto }` reset and do
not produce this warning.

This extends the both-axes approach from #95252 to `default-tw` as well.
#93826 adjusted the dimensions but the mismatch remained (`13.85 ≠ 14`).

## Verification

- `prettier --check` on the four changed files passed.
- Not run: `create-next-app-default` regression test. It runs headless
at DPR 1, where the fractional-pixel rounding does not occur, so it
passed even while the warning was present and is not a reliable oracle
here. Reproduced/validated by reasoning about Preflight specificity and
the removed computed axis.

<!-- NEXT_JS_LLM_PR -->
2026-07-08 18:54:13 +02:00
next-js-bot[bot] 9dd6d677b6 v16.3.0-canary.80 2026-07-07 23:33:18 +00:00
next-js-bot[bot] b275ca597d v16.3.0-canary.79 2026-07-06 23:37:56 +00:00
next-js-bot[bot] 0059804503 v16.3.0-canary.78 2026-07-04 23:35:17 +00:00