Commit Graph

26 Commits

Author SHA1 Message Date
Jiwon Choi d7aa66c345 Remove generated error codes (#97687)
### Why?

Should come up with better solution that does not block PRs with git
conflict

x-ref:
https://vercel.slack.com/archives/C02CDC2ALJH/p1785263902728189?thread_ts=1785263687.502649&cid=C02CDC2ALJH

### How?

- Delete `errors.json`, the error-code SWC plugin, generated WASM, merge
driver, and validation/build tooling.
- Stop attaching error codes to server-rendering digests, redboxes, and
telemetry; native `Error.code` and `Error.name` remain available where
applicable.
- Remove the development-overlay error feedback UI, middleware, and
telemetry event that depended on stable codes.
- Update fixtures, snapshots, and guidance for code-free errors and
numeric-only digests.

<!-- NEXT_JS_LLM -->
2026-08-21 22:45:12 +02:00
Sebastian "Sebbie" Silbermann 7d98e0b534 [test] Include error code in Redbox snapshot (#90497) 2026-02-26 11:01:25 +00:00
Sebastian "Sebbie" Silbermann 97532172c0 [test] Deflake test/development/app-dir/hydration-error-count/hydration-error-count.test.ts (#88749) 2026-01-19 19:09:07 +01:00
Sebastian "Sebbie" Silbermann b0837e0f24 [test] Exclude likely Next.js internal Components from component stacks in Redbox assertions (#85420) 2025-10-28 11:30:28 +00:00
Andrew Clark 077da10374 Fix Activity boundary names (#85185)
Follow-up to #85155. Made a mistake in the context-passing logic.
2025-10-21 17:40:00 -04:00
Andrew Clark 5b5830526a Update Activity names given to routes (#85155)
In practical terms, clicking the name of a route segment in the Suspense
DevTools should select the child slots of that layout, because when you
focus on it, what you're interested in debugging are navigations that
occur within the shared layout.

So the name we apply to the Activity boundary is actually based on the
name of the *parent* segment.
2025-10-21 05:58:38 -04:00
Andrew Clark 683a318d79 Omit params to from client segments (#84883)
If a layout or page is marked with "use client", we do not need to pass
any runtime params from the server; the client can parse them from the
URL, or (in the case of a rewrite) from the x-next-rewritten-path and
x-next-rewritten-query headers. This means the client can treat the
segment as fully static, and no dynamic request is necessary upon
navigation.
2025-10-21 03:33:54 -04:00
Zack Tanner fbbd538036 [BF Cache]: skip lazyData fetch logic for inactive segments (#85142)
When `routerBfCache` is enabled, React's Activity API renders inactive
route segments offscreen to enable instant back/forward navigation.
However, the layout-router's lazy data fetching logic was incorrectly
triggering fetchServerResponse calls for these offscreen segments when
data was missing.

This PR adds an isActive prop to InnerLayoutRouter that tracks whether a
segment is currently visible via the existing `stateKey` check.
2025-10-20 19:28:08 -07:00
Jiachi Liu 10fb5bc683 [devtool] enable segment explorer by default (#81737)
Enable `experimental.devtoolSegmentExplorer` on canary by default and update snapshots
2025-07-17 13:01:50 +02:00
Sebastian "Sebbie" Silbermann 7ed2d23ae5 [devtools] Omit line/col numbers for anonymous sources (#81223) 2025-07-03 15:23:27 +02:00
Jiachi Liu 82c85a5b7b [segment explorer] trigger boundary initial support (#80948) 2025-06-30 16:54:46 +02:00
Sebastian "Sebbie" Silbermann 8ea7d4bb35 [dev-overlay] Move error.name to label (#78198) 2025-04-25 11:00:58 +02:00
Sebastian "Sebbie" Silbermann c334056eeb [dev-overlay] Add dedicated label for recoverable errors (#78186) 2025-04-16 09:49:35 +02:00
Sebastian "Sebbie" Silbermann 96bfee2c81 [dev-overlay] Stop squashing hydration related errors in App Router (#78140) 2025-04-15 09:56:36 +02:00
Sebastian "Sebbie" Silbermann b9d65b8afe [test] Assert on all errors in Redbox matchers (#77907) 2025-04-10 10:00:42 +02:00
Sebastian "Sebbie" Silbermann 855670e836 [dev-overlay] Remove "Unhandled Runtime Error" label (#77484) 2025-03-25 14:10:35 -07:00
rauno 0704818681 [dev-overlay] Ignore animations on page load (#76834)
The current animation strategy for our Dev Tools surface does not work. 



https://github.com/user-attachments/assets/a0ca5459-9d5a-4d90-af00-b071d43581e0

On page load, several animations can be observed:
- Width growth from `0` → `auto`
- Issue count translates and fades, along with the plural `s` suffix
- A subtle scale bounce effect plays

All these animations are state transitions, and thus we should ignore
them completely on page load or on high-frequency updates where
animating is undesirable, e.g. sometimes `issueCount` will receive
updates faster than the animation can run.

This PR implements checks to guard the animations from being executed on
page load, _and only_ during state transitions.

To review, it is worth checking out the
[/animation-test](https://github.com/vercel/next.js/blob/a6e6fe635b712020d4ea2d027040d838eb5941c6/test/development/app-dir/hydration-error-count/app/animation-test/page.tsx)
fixture I've set up in this PR.

After these changes, the experience is as follows—no animations on page
load, but only on subsequent low-frequency updates (count change, or
collapse of the surface):



https://github.com/user-attachments/assets/7b2d5e0d-64ec-4165-b5e2-85489bd00a2c



_Note: I am not using Storybook for a page load reference, the apps
under `test/development/app-dir/*` are more reliable._
2025-03-05 06:27:52 -08:00
Jiachi Liu 7f5a1d39e8 test: update snapshot for component stack (#76359)
The merge timing causes the test failing, update the new property for
new test
2025-02-22 04:57:35 +00:00
Jiachi Liu 922f0e927b [dev-overlay] do not attach hydration info to non hydration errors (#76349) 2025-02-22 00:57:38 +01:00
Sebastian "Sebbie" Silbermann 929e3060ab Align Redbox test helpers (#76213) 2025-02-19 16:22:31 +01:00
Vercel Release Bot 07634b2747 Remove experimental.reactOwnerStack flag (#76021)
Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
2025-02-14 17:58:47 +01:00
Jiachi Liu 3e9846c193 [error overlay] hornor the original erroring order (#75934)
### What

Addressing the hack we introduced in #71483, where we always display the
hydration error with squashed hydration info into the first error. Now
we're displaying the errors with its own corresponding hydration info
properly, so we don't have to order it in a certain place, but just test
the displayed error itself.


Closes NDX-484
2025-02-12 05:00:24 +01:00
Jiachi Liu abb29deb31 [error overlay] fix highlighted lines (#75940)
### What

We should treat each line's first character to determine the leading
sign, rather than treating the trimed line's first character as sign.

The bad case was the close tag `>` was treated as leading error sign
```
> <p // should be treated as errored line ✅
   >   //  should not be treated as errored line ❌
```

Also align the attribute name for highlighted lines
2025-02-12 04:39:16 +01:00
Jiachi Liu b70e837937 [error overlay] display different error info individually (#75916) 2025-02-12 02:51:21 +01:00
Jiachi Liu f5f715168b Improve hydration diff view (#75799) 2025-02-11 14:46:57 +01:00
Jiachi Liu b9277bf371 Fix incorrect error count (#75759) 2025-02-07 12:58:12 +01:00