Skip to content

Sync upstream v2.8.0-alpha.2 (merge conflicts)#5

Open
JOY (JOY) wants to merge 143 commits into
mainfrom
sync-upstream-v2.8.0-alpha.2
Open

Sync upstream v2.8.0-alpha.2 (merge conflicts)#5
JOY (JOY) wants to merge 143 commits into
mainfrom
sync-upstream-v2.8.0-alpha.2

Conversation

@JOY
Copy link
Copy Markdown

Upstream Sync - v2.8.0-alpha.2

Auto-merge with upstream v2.8.0-alpha.2 failed due to conflicts.

To resolve:

  1. Check out this branch locally
  2. Resolve conflicts
  3. Push and merge this PR
  4. Then create tag v2.8.0-alpha.2 to trigger Docker build

Upstream release notes

tom goriunov (tom2drum) and others added 30 commits April 1, 2026 19:35
…ON (blockscout#3335)

* Hero banner: move 'explorer' to new ENV

Resolves blockscout#3290

* [skip ci] update docs
…lockscout#3337)

* Numeric widget: add new value from API

Resolves blockscout#3282

* [skip ci] add formatting to value title
…lockscout#3338)

* Support both chain slug and chain id in page parameters in multichain explorer mode

Resolves blockscout#3320

* fix test
* add export for address txs

* transfer all export from page to dialog

* remove old route and components

* improve file name and fix loading state of icon button

* basic implementation

* refetch item status

* status indicator for download items

* changes for multichain

* handle too many requests for downloads error

* update button styles and spacing

* fix tests

* disable async export for multichain

* Fix CSV export cancel flow and stabilize context updates

Applied via @cursor push command

* test and review fixes

* design fixes

* refactor file names

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* add export for address txs

* transfer all export from page to dialog

* remove old route and components

* improve file name and fix loading state of icon button

* basic implementation

* refetch item status

* status indicator for download items

* changes for multichain

* handle too many requests for downloads error

* update button styles and spacing

* fix tests

* disable async export for multichain

* Fix CSV export cancel flow and stabilize context updates

Applied via @cursor push command

* test and review fixes

* move file to client folder

* round 3

* add glossary

* migration tasks and skill

* move skills to .agents folder

* rename migrate skill

* refine project rules

* move MIGRATION_TASKS.md to client directory

* update sym links

* refine migration skills

* fixes after merging the main branch

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ckscout#3346)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ckscout#3349)

Enable ESLint import/no-cycle and architecture boundary rules

Add eslint-plugin-boundaries with element-types matching ARCH_REDESIGN §8,
enable import/no-cycle (error in client/, warn in lib/ and ui/), extend
consistent-default-export-name to client/**/*.tsx, and document §10
types/api.ts enforcement as a follow-up.

Made-with: Cursor
* debug wallet client error

* Support raw text/html for NFT animation on the token instance page

Resolves blockscout#2609

* fix writing to a contract with dynamic provider

* change default interval for hot contracts

* wait for load event of NFT embed frame

* update screenshots

* add network validation mode to dynamic provider

* add rootstock mainnet preset

* update preset for rootsrock mainnet

* [skip ci] disable essential dapps for rootstock mainnet

* pass required flag to FormFieldSelect controller

* bump dynamic version

* fix rabby wallet tx write
Replaces text/plain with application/json for proper ingestion on the backend
Add Content-Type header to /api/v2/key request
…blockscout#3355)

* Support full instance specifiers for admin services handles

Resolves blockscout#3350

* fix ts
…lockscout#3351)

* fix stats counters layout

* ICTT users index

* bridged tokens page

* move bridged tokens to the tab on tokens page

* migrate to new API version

* add support for sankey chart on stats page

* rename Chart into LineChart

* create reusable chart components

* sankey widget

* cross chain txs paths chart page

* add filter for bridged tokens and fix sorting for ictt users

* hide chain select for paths chart

* add chain filter to paths chart page

* show zero-value nodes on sankey chart

* add tests

* refactoring

* fix tests

* review fixes

* Update ChainStatsDetails to handle counterparty chain IDs as an array and change chart sorting to ascending order
…ockscout#3359)

* Adjust scale in d3 to display correct resolution by week in stats

Resolves blockscout#2701

* fixes
- Rename second review environment and update values, workflow and jobs related to it
* bump nextjs version

* bump vite and path-to-regexp

* bump dev packages versions
…der (blockscout#3364)

* Initial plan

* feat: add DEFAULT_SERVER_NEW_BASE constant for Swagger server URL alignment

Add a new `DEFAULT_SERVER_NEW_BASE = 'http://localhost'` constant alongside
the existing `DEFAULT_SERVER_NEW = 'http://localhost/api'` to support new-style
Swagger documents where the server URL omits `/api` and each operation path
includes `/api` instead.

- The more-specific `DEFAULT_SERVER_NEW` check (with `/api`) is evaluated first
  to prevent overlap since `http://localhost` is a substring of `http://localhost/api`
- The new `DEFAULT_SERVER_NEW_BASE` handler replaces `http://localhost` with
  `${api.endpoint}${api.basePath ?? ''}` without appending `/api`
- Tests updated to properly exercise each branch

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/712e7bc9-f630-409c-bb97-9d8553bb200f

Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
Review images are published to ghcr.io/blockscout/frontend-private since
commit 13203ef (Sep 2025). The reusable cleanup_docker.yaml now accepts
an optional imageName input (blockscout/actions PR #4); pass it here so
cleanup jobs delete from the correct GHCR package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
blockscout/actions PR #4 adds an optional `namespace` input that defaults
to globalEnv (autodeploy-compatible). Frontend creates namespace from
appName, so pass it explicitly here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tom goriunov (tom2drum) and others added 19 commits May 18, 2026 15:13
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(migration): 5-6 beacon-chain - move types, stubs, mocks, components, pages

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/7431a4b4-ca75-4eb0-af4c-c8553734c1b5

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
migration(5-3): move all zeta-chain files to client/features/chain-variants/zeta-chain/

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/c88633f4-e451-4adf-9444-115225797034

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
* add actual lastmod to some sitemap links

* add preconnect for google fonts links

* add onion domain to the footer

* add debug

* fix header name

* update metadata default description
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
[Migration 5-5] Move flashblocks types/component and mega-eth uptime to client/features

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/34a01e65-8c73-4fa5-a94b-992916f05ddc

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
…ckscout#3448)

* Add an option to disable internal and pending transactions views

Resolves blockscout#3438

* review fixes

* fix when txs query should be enabled
feat(migration): 5-7 move chain-variants/mud files to client feature slice

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/58a06972-6583-4033-b388-aa1d4c5410df

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
feat(migration): 6-1 migrate user-ops feature to client/features/user-ops

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/2f77285d-8b6c-4f23-8417-842428d5c6ce

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(migration/6-2): migrate data-availability feature files to client/features/data-availability

Agent-Logs-Url: https://github.com/blockscout/frontend/sessions/b8a0111e-be79-404c-8ef4-b9b65fea1be0

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
* feat(account): migrate account feature files to client/features/account/

Move all account-related files from legacy ui/ locations into the
client/features/account/ feature directory structure.

- Types: api.ts (merged), client.ts, auth-modal/types.ts, user-profile/types.ts
- Stubs: stubs.ts (from stubs/account.ts)
- Mocks: verified-addresses.ts, user-profile.ts
- Hooks: useGetCsrfToken, useIsAuth, useLogout, useProfileQuery,
  useRedirectForInvalidAuthToken, useSignInWithWallet, useLinkEmail*
- Utils: user-handle.ts (from profile/common/utils.ts)
- Components: auth-modal/*, user-profile/*, DeleteModal, TableItemActionButtons,
  AccountPageDescription
- Pages: profile/*, api-keys/*, private-tags/*, watchlist/*, custom-abi/*,
  verified-addresses/* (including address-verification and token-info)
- Update all import paths across the entire repo

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>

* fixes

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tom2drum <22130104+tom2drum@users.noreply.github.com>
Co-authored-by: tom <tom@ohhhh.me>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a major architectural migration for the Blockscout frontend, relocating API services, socket logic, and several key features—including Account, Address Metadata, and Chain Stats—into a domain-driven client/ directory. It also introduces a comprehensive set of rules and skills for AI agents. Technical feedback identifies a logic error in the socket context's provider check, an impure data transformation in the useChainStats hook that mutates state, and a TypeScript type mismatch for a React ref in the ChainStatsSections component.

export function useSocket(name: string = 'default') {
const SocketContext = getSocketContext(name);
const context = React.useContext(SocketContext);
if (context === undefined) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The context is initialized with null (line 20), so useContext will return null when used outside of a provider, not undefined. The check should be updated to correctly identify missing providers.

Suggested change
if (context === undefined) {
if (context === null) {

Comment on lines +49 to +61
const sections: Array<ChainStatsSection> = data.sections.slice();

for (const extraSection of CROSS_CHAIN_TXS_SECTIONS) {
const existingSection = sections.find((section) => section.id === extraSection.id);
if (existingSection) {
existingSection.charts = uniqBy([
...existingSection.charts,
...extraSection.charts,
], (chart) => chart.id);
} else {
sections.push(extraSection);
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The select function in useApiQuery should be a pure function. Here, it performs a shallow clone of the sections array but then mutates the individual section objects (e.g., existingSection.charts = ...). This can lead to unexpected side effects because the original data objects are modified. Consider using a non-mutating approach to merge the sections.

        const sections: Array<ChainStatsSection> = data.sections.map((section) => {
          const extraSection = CROSS_CHAIN_TXS_SECTIONS.find((s) => s.id === section.id);
          if (extraSection) {
            return {
              ...section,
              charts: uniqBy([...section.charts, ...extraSection.charts], (chart) => chart.id),
            };
          }
          return section;
        });

        CROSS_CHAIN_TXS_SECTIONS.forEach((extraSection) => {
          if (!sections.some((s) => s.id === extraSection.id)) {
            sections.push(extraSection);
          }
        });


const hasCharts = sections?.some((section) => section.charts.length > 0);
const hasDisplayedCharts = displayedSections?.some((section) => section.charts.length > 0);
const sectionRef = React.useRef<HTMLUListElement | null>(null);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The sectionRef is typed as HTMLUListElement, but it is attached to a <section> element on line 84. This will cause a type mismatch in TypeScript. It should be typed as HTMLElement.

Suggested change
const sectionRef = React.useRef<HTMLUListElement | null>(null);
const sectionRef = React.useRef<HTMLElement | null>(null);

@JOY JOY (JOY) force-pushed the sync-upstream-v2.8.0-alpha.2 branch 8 times, most recently from 55f7cdc to 11aa1d9 Compare May 21, 2026 16:32
@JOY JOY (JOY) force-pushed the sync-upstream-v2.8.0-alpha.2 branch from 11aa1d9 to 0bd92c7 Compare May 21, 2026 21:20
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.

8 participants