Sync upstream v2.10.3 (merge conflicts) - #30
Conversation
…amic-labs SDK Turbopack's scope hoisting emits code that reads the SDK's UserFieldEditorContext through the wrong binding. useContext then receives a non-context value, returns undefined, and the SDK throws from its own useUpdateUserWithModal: useUserUpdateRequest can only be used inside the context of DynamicContextProvider The thrower is the SDK's internal SyncAuthFlow, which the SDK itself renders inside UserFieldEditorContextProvider — so in a correct build that context cannot be missing. A webpack build of the same source is fine, so the defect is Turbopack's, not ours. Impact: a hard crash on the initial load of every page, on any instance with NEXT_PUBLIC_ACCOUNT_AUTH_PROVIDER=dynamic. Invisible in dev (unminified, no hoisting) and found only by running the v2.10.0 image locally, so v2.10.0 would have broken every dynamic-auth instance on rollout. Bisected to blockscout#3574; not fixed by Next 16.3.0, and not reducible to a single import — the trigger is an emergent property of the module graph. webpack turns out to be the better bundle anyway, not just the correct one. Against the Turbopack build it cuts JS-before-FCP 1038 -> 697 KB (-33%) and emitted chunk bytes 49.2 -> 21.4 MB, at 2-3x the build time. The other fix, experimental.turbopackScopeHoisting:false, was measured and rejected: it nearly doubles FCP and triples blocking time while leaving M6 almost unchanged. Dev stays on Turbopack — it is ~3x faster to compile and this crash class only exists in a minified production build. - build, build:next and prod.preset.sh now pass --webpack (build:analyze and profile:preset already did). prod:preset matters because it is the measurement path: profiling a bundler we no longer ship would be misleading. - resolve.fallback maps @react-native-async-storage/async-storage to false. webpack surfaces that unresolvable optional import inside @metamask/sdk, which a browser bundle never needs; the build is warning-free. Introduces .agents/adr/ for decisions that are expensive to rediscover, indexed from AGENTS.md. This is record 0001 and carries the full evidence. Also automates the perf-trace capture used to make the call: trace.mjs records a DevTools-format trace over CDP so trace-metrics.py can consume several runs per variant. Its README now warns that M6 alone is not a sufficient gate — that is exactly how the scope-hoisting option looked cheap. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`trace.mjs` is a CLI tool — its stdout is the interface (usage hint, and one line per trace written). Uses a file-level disable with a reason rather than one per call site. Fixes the Code quality job on blockscout#3612. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ge (blockscout#3611) * docs: spec for displaying fee payer and calls on the tx details page Refs blockscout#3607 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Display the fee payer and batched calls on the transaction details page Eden transactions of type 0x76 are sponsored batches: an executor submits an ordered list of calls and a separate sponsor pays the fee. Render both fields inside the collapsible details, gated on their presence in the response. Pin @blockscout/api-types to a beta built from the backend `dev` branch once `master` had been merged into it, which is the first published build carrying the eden chain type alongside the response shorthands the app relies on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Tag a sponsored transaction in the details page header Transaction lists have no room for another badge, so `sponsored_transaction` is listed last in TYPES_ORDER with no label of its own. Without an entry there it scores -1 and sorts ahead of every real type, masking labels like "Contract call". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…lockscout#3620) * Fix Rollbar empty "null or missing arguments" items The deferred-Rollbar refactor (blockscout#3568) added an `unhandledrejection` window listener that forwarded `event.reason` as Rollbar's sole argument. On public instances rejections are dominated by wallet-extension / third-party noise with `null`/bare-object reasons, which Rollbar cannot turn into a message — it files empty "Item sent with null or missing arguments." occurrences (Rollbar item #25, 160+ occurrences). Remove the `unhandledrejection` listener: this matches pre-refactor behavior (the app never reported unhandled rejections before) and loses nothing — genuine page crashes surface as `critical` via the React error boundary. Guard the remaining `error` listener so a non-Error/non-string thrown value becomes a titled message + the raw value as custom data, closing the same empty-item hole on that path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Ignore opaque cross-origin "Script error." reports in Rollbar The uncaught-error window listener added in blockscout#3568 surfaces cross-origin "Script error." events — the browser masks details of errors thrown by different-origin third-party scripts (GA, walletconnect, etc.), leaving only that string with no stack or payload. They are unactionable and were never reported before the deferred-Rollbar refactor. Add "Script error" to `ignoredMessages` (the existing 'cross-origin' entry does not match this literal string), dropping the noise while the listener still captures genuine same-origin uncaught errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces support for Eden-specific sponsored transactions, including displaying the fee payer and batched calls on the transaction details page, and adding a "Sponsored" tag to the transaction header. It also establishes an Architecture Decision Record (ADR) to use webpack for production builds (due to a Turbopack scope-hoisting bug with the Dynamic-labs SDK) while keeping Turbopack for development, updating build scripts and configurations accordingly. Additionally, it refactors Rollbar error handling to properly report non-Error thrown values and ignore unhandled rejections/opaque script errors, wraps the Multisend widget in a Web3Boundary, and adds performance tracing tools. The review comment correctly identifies that React testing utilities in TxType.spec.tsx are incorrectly imported from vitest/lib instead of @testing-library/react, which would cause test failures.
| import React from 'react'; | ||
|
|
||
| import { afterEach, describe, expect, it } from 'vitest'; | ||
| import { cleanup, render, screen } from 'vitest/lib'; |
There was a problem hiding this comment.
The React testing utilities cleanup, render, and screen should be imported from @testing-library/react instead of vitest/lib. Importing them from vitest/lib will cause test compilation and execution failures.
| import { cleanup, render, screen } from 'vitest/lib'; | |
| import { cleanup, render, screen } from '@testing-library/react'; |
7b90591 to
15604ca
Compare
15604ca to
917a59c
Compare
Upstream Sync - v2.10.3
Auto-merge with upstream
v2.10.3failed due to conflicts.To resolve:
v2.10.3to trigger Docker buildUpstream release notes