Skip to content

Move layer numbering to the ENV#3278

Merged
tom2drum merged 3 commits intomainfrom
tom2drum/issue-2554
Feb 25, 2026
Merged

Move layer numbering to the ENV#3278
tom2drum merged 3 commits intomainfrom
tom2drum/issue-2554

Conversation

@tom2drum
Copy link
Copy Markdown
Collaborator

@tom2drum tom2drum commented Feb 11, 2026

Description and Related Issue(s)

Resolves #2554

Makes rollup layer numbering configurable so instances can use L2/L3 (or other pairs) instead of the default L2/L1, as requested in Canny.

  • Introduces NEXT_PUBLIC_ROLLUP_LAYER_NUMBER (default 2) and centralizes layer labels in lib/rollups/utils.ts (layerLabels.current / layerLabels.parent).
  • Replaces hardcoded "L1"/"L2" across rollup UI (block details, deposits, withdrawals, tx batches, status tags, metadata titles, nav, etc.) with these labels.

Proposed Changes

  • Added NEXT_PUBLIC_ROLLUP_LAYER_NUMBER and wired it in rollup config and ENV validator.
  • Added lib/rollups/utils.ts with layerLabels and status-formatting helpers; all rollup views now use these labels instead of literal "L1"/"L2".
  • Updated docs/ENVS.md (new variable and minor wording: "L1" → "parent", "L2" → "rollup" where generic).

Environment variables

  • NEXT_PUBLIC_ROLLUP_LAYER_NUMBER (optional, number, default 2) – Layer number of the rollup. Used to show "L2"/"L1" (or e.g. "L3"/"L2") in the UI. Set to 3 for L3 chains.

Breaking or Incompatible Changes

None. Default remains 2 (L2/L1).

Additional Information

  • Validator schema and .env.optimism example updated for the new variable.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@coderabbitai review

@tom2drum tom2drum added the ENVs label Feb 11, 2026
@tom2drum tom2drum requested a review from isstuev February 11, 2026 17:04
@tom2drum
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@tom2drum
Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

Adds a new Rollup feature config field layerNumber initialized from NEXT_PUBLIC_ROLLUP_LAYER_NUMBER (default 2) and adds schema validation for that environment variable. Introduces lib/rollups/utils with layerLabels and status-formatting helpers (formatZkEvmTxStatus, formatZkEvmL2TxnBatchStatus, formatZkSyncL2TxnBatchStatus). Replaces hardcoded "L1"/"L2" strings across many UI components, titles, tables, and status renderers to use layerLabels.parent and layerLabels.current. Updates docs (ENVS.md) and example env file to include NEXT_PUBLIC_ROLLUP_LAYER_NUMBER.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Move layer numbering to the ENV' accurately reflects the primary change: making rollup layer numbering configurable through environment variables instead of hardcoded values.
Description check ✅ Passed The PR description is well-related to the changeset, clearly explaining the motivation, implementation approach, new environment variable, affected areas, and documentation updates.
Linked Issues check ✅ Passed The PR fully implements the requirements from issue #2554: introduces NEXT_PUBLIC_ROLLUP_LAYER_NUMBER environment variable, centralizes layer labels in lib/rollups/utils.ts, replaces hardcoded L1/L2 labels across rollup UI, updates ENV validator and documentation.
Out of Scope Changes check ✅ Passed All code changes are directly aligned with the stated objective of making layer numbering configurable; no unrelated modifications detected beyond the scope of issue #2554.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (4)
deploy/tools/envs-validator/test/.env.optimism (1)

9-10: Clean up dotenv-linter warnings in this fixture file.

Lines 9–10 are functionally fine, but current ordering/newline warnings will keep lint noisy. Please reorder keys per project convention and ensure a trailing newline at EOF.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deploy/tools/envs-validator/test/.env.optimism` around lines 9 - 10, Reorder
the environment keys so they follow project convention by placing
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER before NEXT_PUBLIC_ROLLUP_STAGE_INDEX, and
ensure the fixture file ends with a single trailing newline (EOF newline) to
silence dotenv-linter ordering and newline warnings; update the .env fixture
containing NEXT_PUBLIC_ROLLUP_LAYER_NUMBER and NEXT_PUBLIC_ROLLUP_STAGE_INDEX
accordingly.
docs/ENVS.md (1)

532-532: Normalize emphasis style on Line 532 to satisfy markdownlint (MD049).

Switch underscore emphasis to asterisk emphasis in this row to clear the docs lint warning.

✏️ Suggested docs tweak
-| NEXT_PUBLIC_ROLLUP_L1_BASE_URL | `string` | Blockscout base URL for parent network. **DEPRECATED** _Use `NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead_ | Required | - | `'http://eth-goerli.blockscout.com'` | v1.24.0+ |
+| NEXT_PUBLIC_ROLLUP_L1_BASE_URL | `string` | Blockscout base URL for parent network. **DEPRECATED** *Use `NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead* | Required | - | `'http://eth-goerli.blockscout.com'` | v1.24.0+ |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ENVS.md` at line 532, The table row for NEXT_PUBLIC_ROLLUP_L1_BASE_URL
uses underscore emphasis around "Use `NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead"
which triggers MD049; update that cell to use asterisk emphasis (i.e. replace
_Use `NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead_ with *Use
`NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead*) so the markdown emphasis style
matches the rest of the document; locate the row by the symbol
NEXT_PUBLIC_ROLLUP_L1_BASE_URL and make this single-token emphasis change.
lib/rollups/utils.ts (1)

17-37: Add explicit return types to exported top-level formatters.

Lines 17, 26, and 35 are exported top-level module functions and should declare return types explicitly for consistency and safer API surfaces.

✍️ Suggested refactor
-export const formatZkEvmTxStatus = (status: typeof ZKEVM_L2_TX_STATUSES[number]) => {
+export const formatZkEvmTxStatus = (status: typeof ZKEVM_L2_TX_STATUSES[number]): string => {
@@
-export const formatZkEvmL2TxnBatchStatus = (status: typeof ZKEVM_L2_TX_BATCH_STATUSES[number]) => {
+export const formatZkEvmL2TxnBatchStatus = (status: typeof ZKEVM_L2_TX_BATCH_STATUSES[number]): string => {
@@
-export const formatZkSyncL2TxnBatchStatus = (status: typeof ZKSYNC_L2_TX_BATCH_STATUSES[number]) => {
+export const formatZkSyncL2TxnBatchStatus = (status: typeof ZKSYNC_L2_TX_BATCH_STATUSES[number]): string => {

As per coding guidelines, "Declare return types on top-level module functions."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/rollups/utils.ts` around lines 17 - 37, The three exported top-level
formatters (formatZkEvmTxStatus, formatZkEvmL2TxnBatchStatus,
formatZkSyncL2TxnBatchStatus) lack explicit return types; update each function
signature to declare a return type of string (e.g. change to
formatZkEvmTxStatus(...): string) so the module surface is explicit and
type-safe, keeping function bodies unchanged.
deploy/tools/llms-txt-generator/index.ts (1)

29-30: Redundant ternary — layerLabels always returns defined strings.

layerLabels already falls back to { current: 'L2', parent: 'L1' } when rollup is disabled (as seen in lib/rollups/utils.ts lines 8–14), so the rollupFeature.isEnabled ? ... : undefined guard is unnecessary. The result of undefined is also safe here since all consuming templates are independently guarded by rollupFeature.isEnabled, but the ternary adds noise.

♻️ Proposed simplification
-        const currentToParentLayerLabel = rollupFeature.isEnabled ? layerLabels.current + '→' + layerLabels.parent : undefined;
-        const parentToCurrentLayerLabel = rollupFeature.isEnabled ? layerLabels.parent + '→' + layerLabels.current : undefined;
+        const currentToParentLayerLabel = `${ layerLabels.current }→${ layerLabels.parent }`;
+        const parentToCurrentLayerLabel = `${ layerLabels.parent }→${ layerLabels.current }`;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deploy/tools/llms-txt-generator/index.ts` around lines 29 - 30, The two
ternary expressions creating currentToParentLayerLabel and
parentToCurrentLayerLabel are redundant because layerLabels already provides
defaults; remove the rollupFeature.isEnabled ? ... : undefined guards and assign
the concatenated strings directly (use layerLabels.current + '→' +
layerLabels.parent and layerLabels.parent + '→' + layerLabels.current) so the
variables are always defined and simpler; keep any external checks that guard
template usage based on rollupFeature.isEnabled intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@deploy/tools/envs-validator/schemas/features/rollup.ts`:
- Around line 172-184: Refactor the Yup conditional on
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER to use the callback form of when instead of the
object-with-then property to satisfy the lint rule; change the
when('NEXT_PUBLIC_ROLLUP_TYPE', { is: ..., then: ..., otherwise: ... }) usage
for NEXT_PUBLIC_ROLLUP_LAYER_NUMBER so the predicate and branch logic are
expressed in the (value, schema) => { ... } callback, preserving behavior: when
NEXT_PUBLIC_ROLLUP_TYPE is truthy return the unchanged schema, otherwise return
a schema.test that enforces the value is undefined with the same error message;
apply the same callback-style fix to similar fields like
NEXT_PUBLIC_ROLLUP_STAGE_INDEX and other instances across ui.ts and services.ts.

In `@lib/rollups/utils.ts`:
- Around line 35-36: The current formatZkSyncL2TxnBatchStatus replaces 'L1' then
'L2' sequentially which can clobber earlier replacements (e.g.
current=L3,parent=L2). Change the function to do a single-pass replacement using
a regex with word boundaries (e.g. /\bL[12]\b/g) and a replacer callback that
maps 'L1' -> layerLabels.parent and 'L2' -> layerLabels.current (reference
symbols: formatZkSyncL2TxnBatchStatus, ZKSYNC_L2_TX_BATCH_STATUSES,
layerLabels).
- Around line 10-11: Add the missing test preset for the
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER environment variable to the test baseline so
validation and tests have a concrete value; update
deploy/tools/envs-validator/test/.env.base to include a line like
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER=2 (or 3) to match the schema's .min(2)
constraint and prevent UI label degradation when code paths referencing layer
numbers (e.g., the L${ feature.layerNumber } / parent L${ feature.layerNumber -
1 } logic in lib/rollups/utils.ts) run in tests.

In `@ui/pages/ZkEvmL2Withdrawals.tsx`:
- Line 5: Add the missing NEXT_PUBLIC_ROLLUP_LAYER_NUMBER entry to the
envs-validator test base presets: update the test .env.base file used by the
envs-validator to include NEXT_PUBLIC_ROLLUP_LAYER_NUMBER with the same value
used in .env.optimism so the test presets and deployment envs stay in sync;
ensure the variable name is exact (NEXT_PUBLIC_ROLLUP_LAYER_NUMBER) and run the
envs-validator tests to confirm no missing-var errors.

In `@ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx`:
- Around line 142-145: Fix the typo in the tooltip hint for
DetailedInfo.ItemLabel: change the string passed to the hint prop from "Heigh of
${ layerLabels.parent } block which includes ${ layerLabels.parent }
transactions" to "Height of ${ layerLabels.parent } block which includes ${
layerLabels.parent } transactions" so the word "Height" is spelled correctly;
update the hint prop on the DetailedInfo.ItemLabel that renders "{
layerLabels.parent } block".

---

Nitpick comments:
In `@deploy/tools/envs-validator/test/.env.optimism`:
- Around line 9-10: Reorder the environment keys so they follow project
convention by placing NEXT_PUBLIC_ROLLUP_LAYER_NUMBER before
NEXT_PUBLIC_ROLLUP_STAGE_INDEX, and ensure the fixture file ends with a single
trailing newline (EOF newline) to silence dotenv-linter ordering and newline
warnings; update the .env fixture containing NEXT_PUBLIC_ROLLUP_LAYER_NUMBER and
NEXT_PUBLIC_ROLLUP_STAGE_INDEX accordingly.

In `@deploy/tools/llms-txt-generator/index.ts`:
- Around line 29-30: The two ternary expressions creating
currentToParentLayerLabel and parentToCurrentLayerLabel are redundant because
layerLabels already provides defaults; remove the rollupFeature.isEnabled ? ...
: undefined guards and assign the concatenated strings directly (use
layerLabels.current + '→' + layerLabels.parent and layerLabels.parent + '→' +
layerLabels.current) so the variables are always defined and simpler; keep any
external checks that guard template usage based on rollupFeature.isEnabled
intact.

In `@docs/ENVS.md`:
- Line 532: The table row for NEXT_PUBLIC_ROLLUP_L1_BASE_URL uses underscore
emphasis around "Use `NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead" which triggers
MD049; update that cell to use asterisk emphasis (i.e. replace _Use
`NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead_ with *Use
`NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead*) so the markdown emphasis style
matches the rest of the document; locate the row by the symbol
NEXT_PUBLIC_ROLLUP_L1_BASE_URL and make this single-token emphasis change.

In `@lib/rollups/utils.ts`:
- Around line 17-37: The three exported top-level formatters
(formatZkEvmTxStatus, formatZkEvmL2TxnBatchStatus, formatZkSyncL2TxnBatchStatus)
lack explicit return types; update each function signature to declare a return
type of string (e.g. change to formatZkEvmTxStatus(...): string) so the module
surface is explicit and type-safe, keeping function bodies unchanged.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2202295 and ac06a8d.

⛔ Files ignored due to path filters (1)
  • icons/navigation/ecosystems.svg is excluded by !**/*.svg
📒 Files selected for processing (66)
  • configs/app/features/rollup.ts
  • deploy/tools/envs-validator/schemas/features/rollup.ts
  • deploy/tools/envs-validator/test/.env.optimism
  • deploy/tools/llms-txt-generator/index.ts
  • docs/ENVS.md
  • lib/hooks/useNavItems.tsx
  • lib/metadata/templates/title.ts
  • lib/rollups/utils.ts
  • ui/block/BlockDetails.tsx
  • ui/deposits/optimisticL2/OptimisticDepositsListItem.tsx
  • ui/deposits/optimisticL2/OptimisticDepositsTable.tsx
  • ui/deposits/scrollL2/ScrollL2DepositsListItem.tsx
  • ui/deposits/scrollL2/ScrollL2DepositsTable.tsx
  • ui/deposits/shibarium/DepositsListItem.tsx
  • ui/deposits/shibarium/DepositsTable.tsx
  • ui/deposits/zkEvmL2/ZkEvmL2DepositsListItem.tsx
  • ui/deposits/zkEvmL2/ZkEvmL2DepositsTable.tsx
  • ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesListItem.tsx
  • ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesTable.tsx
  • ui/home/Stats.tsx
  • ui/home/Transactions.tsx
  • ui/home/latestDeposits/LatestDeposits.tsx
  • ui/home/latestDeposits/LatestDepositsItem.tsx
  • ui/messages/ArbitrumL2Messages.tsx
  • ui/messages/ArbitrumL2MessagesListItem.tsx
  • ui/messages/ArbitrumL2MessagesTable.tsx
  • ui/outputRoots/optimisticL2/OptimisticL2OutputRootsListItem.tsx
  • ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTable.tsx
  • ui/pages/ArbitrumL2TxnWithdrawals.tsx
  • ui/pages/OptimisticL2Deposits.tsx
  • ui/pages/OptimisticL2OutputRoots.tsx
  • ui/pages/OptimisticL2Withdrawals.tsx
  • ui/pages/ScrollL2Deposits.tsx
  • ui/pages/ScrollL2Withdrawals.tsx
  • ui/pages/ShibariumDeposits.tsx
  • ui/pages/ShibariumWithdrawals.tsx
  • ui/pages/ZkEvmL2Deposits.tsx
  • ui/pages/ZkEvmL2Withdrawals.tsx
  • ui/shared/statusTag/ZkEvmL2TxnBatchStatus.tsx
  • ui/shared/statusTag/ZkSyncL2TxnBatchStatus.tsx
  • ui/tx/details/TxDetailsInterop.tsx
  • ui/tx/details/TxDetailsWithdrawalStatusArbitrum.tsx
  • ui/tx/details/TxInfo.tsx
  • ui/tx/details/TxInfoScrollFees.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesListItem.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesTable.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobCallData.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobCelestia.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobEigenda.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobEip4844.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesListItem.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTable.tsx
  • ui/txnBatches/scrollL2/ScrollL2TxnBatchDetails.tsx
  • ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
  • ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchDetails.tsx
  • ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchHashesInfo.tsx
  • ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsListItem.tsx
  • ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsTable.tsx
  • ui/withdrawals/scrollL2/ScrollL2WithdrawalsListItem.tsx
  • ui/withdrawals/scrollL2/ScrollL2WithdrawalsTable.tsx
  • ui/withdrawals/shibarium/WithdrawalsListItem.tsx
  • ui/withdrawals/shibarium/WithdrawalsTable.tsx
  • ui/withdrawals/zkEvmL2/ZkEvmL2WithdrawalsListItem.tsx
  • ui/withdrawals/zkEvmL2/ZkEvmL2WithdrawalsTable.tsx

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

♻️ Duplicate comments (3)
ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx (1)

142-142: ⚠️ Potential issue | 🟡 Minor

Fix typo: "Heigh" → "Height".

-        hint={ `Heigh of ${ layerLabels.parent } block which includes ${ layerLabels.parent } transactions` }
+        hint={ `Height of ${ layerLabels.parent } block which includes ${ layerLabels.parent } transactions` }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx` at line 142, Fix the
typo in the hint string inside ArbitrumL2TxnBatchDetails.tsx: update the hint
prop value from "Heigh of ${ layerLabels.parent } block which includes ${
layerLabels.parent } transactions" to use "Height" instead of "Heigh" where the
hint is constructed (reference the hint prop and layerLabels.parent usage).
deploy/tools/envs-validator/schemas/features/rollup.ts (1)

172-184: ⚠️ Potential issue | 🔴 Critical

Biome lint/suspicious/noThenProperty error blocks CI — use callback form.

The then: key on line 178 inside the .when() object triggers this Biome lint rule. Refactor to the callback form to fix it:

🔧 Proposed fix
-    NEXT_PUBLIC_ROLLUP_LAYER_NUMBER: yup.number()
-      .positive()
-      .integer()
-      .min(2)
-      .when('NEXT_PUBLIC_ROLLUP_TYPE', {
-        is: (value: string) => Boolean(value),
-        then: (schema) => schema,
-        otherwise: (schema) => schema.test(
-          'not-exist',
-          'NEXT_PUBLIC_ROLLUP_LAYER_NUMBER can only be used with NEXT_PUBLIC_ROLLUP_TYPE',
-          value => value === undefined,
-        ),
-      }),
+    NEXT_PUBLIC_ROLLUP_LAYER_NUMBER: yup.number()
+      .integer()
+      .min(2)
+      .when('NEXT_PUBLIC_ROLLUP_TYPE', (value: string | undefined, schema) => {
+        if (Boolean(value)) {
+          return schema;
+        }
+        return schema.test(
+          'not-exist',
+          'NEXT_PUBLIC_ROLLUP_LAYER_NUMBER can only be used with NEXT_PUBLIC_ROLLUP_TYPE',
+          (currentValue) => currentValue === undefined,
+        );
+      }),

Note: .positive() is also dropped above since .min(2) already guarantees the value is ≥ 2 (and therefore positive), making it redundant.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deploy/tools/envs-validator/schemas/features/rollup.ts` around lines 172 -
184, Refactor the NEXT_PUBLIC_ROLLUP_LAYER_NUMBER yup schema to use the callback
form of .when instead of the object form to satisfy the lint rule: replace
.when('NEXT_PUBLIC_ROLLUP_TYPE', { is: ..., then: ..., otherwise: ... }) with
.when('NEXT_PUBLIC_ROLLUP_TYPE', (rollupType, schema) => rollupType ? schema :
schema.test('not-exist', 'NEXT_PUBLIC_ROLLUP_LAYER_NUMBER can only be used with
NEXT_PUBLIC_ROLLUP_TYPE', value => value === undefined)); also remove the
redundant .positive() since .min(2) already enforces positivity.
lib/rollups/utils.ts (1)

35-36: ⚠️ Potential issue | 🔴 Critical

Fix replacement clobbering in zkSync status formatting.

The current two-step replace can rewrite the first replacement result (e.g., L1 -> L2 -> L3), producing incorrect parent-layer labels for L3/L2 configs.

💡 Proposed fix
 export const formatZkSyncL2TxnBatchStatus = (status: typeof ZKSYNC_L2_TX_BATCH_STATUSES[number]) => {
-  return status.replace('L1', layerLabels.parent).replace('L2', layerLabels.current);
+  return status.replace(/\bL[12]\b/g, (layer) => (layer === 'L1' ? layerLabels.parent : layerLabels.current));
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/rollups/utils.ts` around lines 35 - 36, The function
formatZkSyncL2TxnBatchStatus incorrectly performs two sequential string.replace
calls which can clobber earlier replacements (e.g., replacing 'L1' then matching
the added 'L2'); update formatZkSyncL2TxnBatchStatus to do a single-pass
replacement by matching both tokens at once (e.g., use a regex like /(L1|L2)/g)
and map 'L1' -> layerLabels.parent and 'L2' -> layerLabels.current in the
replacement callback so replacements never overwrite each other; keep references
to ZKSYNC_L2_TX_BATCH_STATUSES and layerLabels unchanged.
🧹 Nitpick comments (2)
ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx (1)

87-89: Memoize steps before passing it to VerificationSteps.

ZKEVM_L2_TX_BATCH_STATUSES.map(...) creates a new array every render; this should be memoized per project rule.

♻️ Suggested refactor
 const ZkEvmL2TxnBatchDetails = ({ query }: Props) => {
   const router = useRouter();

   const { data, isPlaceholderData, isError, error } = query;
+  const verificationSteps = React.useMemo(
+    () => ZKEVM_L2_TX_BATCH_STATUSES.map(formatZkEvmL2TxnBatchStatus),
+    [],
+  );
@@
         <VerificationSteps
-          steps={ ZKEVM_L2_TX_BATCH_STATUSES.map(formatZkEvmL2TxnBatchStatus) }
+          steps={ verificationSteps }
           currentStep={ formatZkEvmL2TxnBatchStatus(data.status) }
           isLoading={ isPlaceholderData }
         />

As per coding guidelines, "Wrap .filter(), .map(), .reduce() results in useMemo when passed as props or used as hook deps."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx` around lines 87 - 89, The
prop `steps` is recreated every render because you call
ZKEVM_L2_TX_BATCH_STATUSES.map(formatZkEvmL2TxnBatchStatus) inline; wrap that
mapping in a useMemo inside the ZkEvmL2TxnBatchDetails component to memoize the
resulting array and pass the memoized variable to VerificationSteps. Use
useMemo(() => ZKEVM_L2_TX_BATCH_STATUSES.map(formatZkEvmL2TxnBatchStatus), [/*
include dependencies such as formatZkEvmL2TxnBatchStatus if not stable */]) so
the steps array only changes when its dependencies change, then pass that
memoized variable as the steps prop while keeping currentStep as-is.
ui/block/BlockDetails.tsx (1)

309-313: Memoize mapped zkSync steps before passing as prop.

ZKSYNC_L2_TX_BATCH_STATUSES.map(...) is recreated on every render and passed to VerificationSteps. Hoist it into React.useMemo to prevent unnecessary re-renders of the child component.

♻️ Proposed refactor
 const BlockDetails = ({ query }: Props) => {
@@
   const { data, isPlaceholderData } = query;
+  const zksyncVerificationSteps = React.useMemo(
+    () => ZKSYNC_L2_TX_BATCH_STATUSES.map(formatZkSyncL2TxnBatchStatus),
+    [],
+  );
@@
             { rollupFeature.type === 'zkSync' && data.zksync && (
               <VerificationSteps
-                steps={ ZKSYNC_L2_TX_BATCH_STATUSES.map(formatZkSyncL2TxnBatchStatus) }
+                steps={ zksyncVerificationSteps }
                 currentStep={ formatZkSyncL2TxnBatchStatus(data.zksync.status) }
                 isLoading={ isPlaceholderData }
               />
             ) }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/block/BlockDetails.tsx` around lines 309 - 313, The mapped zkSync steps
passed into VerificationSteps are recreated each render; hoist that mapping into
a memoized value using React.useMemo and pass that memo (instead of
ZKSYNC_L2_TX_BATCH_STATUSES.map(...)) to VerificationSteps. Create something
like const zkSyncSteps = React.useMemo(() =>
ZKSYNC_L2_TX_BATCH_STATUSES.map(formatZkSyncL2TxnBatchStatus),
[ZKSYNC_L2_TX_BATCH_STATUSES, formatZkSyncL2TxnBatchStatus]) and then use
zkSyncSteps as the steps prop while leaving currentStep
(formatZkSyncL2TxnBatchStatus(data.zksync.status)) and isLoading
(isPlaceholderData) as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@configs/app/features/rollup.ts`:
- Line 54: The layerNumber assignment can coerce an empty env string to 0 via
Number(''), so change the logic around
getEnvValue('NEXT_PUBLIC_ROLLUP_LAYER_NUMBER')/layerNumber to treat empty
strings as "no value" and fall back to 2: read the raw value from getEnvValue,
trim and if it's empty/null/undefined treat it as undefined, otherwise parse
with parseInt(value, 10) and if isNaN or less than 2 use 2; update the
layerNumber expression accordingly so getEnvValue + Number coercion cannot
produce 0.

In `@deploy/tools/envs-validator/schemas/features/rollup.ts`:
- Around line 172-184: Add the new environment variable
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER to the test preset file (.env.base) used by the
envs-validator tests so the test suite recognizes the new variable (it already
exists in .env.optimism and the schema validation in rollup.ts references
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER); update the .env.base file by adding a suitable
test value for NEXT_PUBLIC_ROLLUP_LAYER_NUMBER to match the schema constraints
(positive integer >= 2) so tests pass.

In `@deploy/tools/envs-validator/test/.env.optimism`:
- Line 10: Add the missing environment variable NEXT_PUBLIC_ROLLUP_LAYER_NUMBER
with value 5 to the test preset file .env.base so the test preset aligns with
the test file (.env.optimism) and envs-validator expectations; ensure the entry
follows the same KEY=VALUE formatting used by other variables in .env.base and
commit the updated .env.base.
- Around line 9-10: Fix dotenv-linter violations by reordering the environment
keys alphabetically and adding a trailing newline: move
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER so it appears before
NEXT_PUBLIC_ROLLUP_OUTPUT_ROOTS_ENABLED (ensuring proper alphabetical order
relative to NEXT_PUBLIC_ROLLUP_STAGE_INDEX and other keys) and ensure the file
ends with a blank line (add a final newline character).

In `@docs/ENVS.md`:
- Line 532: The markdown deprecation note for NEXT_PUBLIC_ROLLUP_L1_BASE_URL
uses underscore emphasis which triggers MD049; change the emphasis from
underscores to asterisks so the description reads "*Use
`NEXT_PUBLIC_ROLLUP_PARENT_CHAIN` instead*" (update the table cell containing
NEXT_PUBLIC_ROLLUP_L1_BASE_URL) to satisfy markdownlint MD049.

In `@lib/rollups/utils.ts`:
- Around line 17-24: Add explicit string return types to the exported formatter
functions: update the signatures of formatZkEvmTxStatus,
formatZkEvmL2TxnBatchStatus, and formatZkSyncL2TxnBatchStatus to declare a
return type of string (e.g., add ": string" after the parameter list) so their
exported types are explicit and consistent.

In `@ui/home/Stats.tsx`:
- Line 7: Add the missing NEXT_PUBLIC_ROLLUP_LAYER_NUMBER entry to the test
preset file used by the envs-validator
(deploy/tools/envs-validator/test/.env.base) so tests include this
project-required variable; open the test .env.base and add a line defining
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER (with an appropriate default numeric value or
placeholder) consistent with other entries, matching the usage in
configs/app/features/rollup.ts and the docs/ENVS.md.

In `@ui/shared/statusTag/ZkEvmL2TxnBatchStatus.tsx`:
- Around line 20-24: The rendered status text was changed to all-lowercase in
the 'L1 Sequence Confirmed' case branch; update the assignment of text in that
switch case (the branch for 'L1 Sequence Confirmed' that currently sets text =
`${ layerLabels.parent } sequence confirmed`) to use title case (e.g., `${
layerLabels.parent } Sequence Confirmed`) so the visual casing matches the
original status label; locate the switch handling this status in
ZkEvmL2TxnBatchStatus.tsx and change the text string accordingly.

In `@ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchDetails.tsx`:
- Around line 98-102: The chained string.replace calls in
formatZkSyncL2TxnBatchStatus cause cascading replacements (e.g., replacing "L2"
then "L3" can turn "Sent to L1" into "Sent to L3"); fix by computing parentLabel
= `L${layerNumber-1}` and currentLabel = `L${layerNumber}` and perform a single,
targeted replacement of whole-word occurrences (use a single replace with a
regex word-boundary or replace only exact tokens) so only the intended layer
token is substituted; update formatZkSyncL2TxnBatchStatus (and any place that
uses ZKSYNC_L2_TX_BATCH_STATUSES if necessary) to use this safe replacement
approach.

---

Duplicate comments:
In `@deploy/tools/envs-validator/schemas/features/rollup.ts`:
- Around line 172-184: Refactor the NEXT_PUBLIC_ROLLUP_LAYER_NUMBER yup schema
to use the callback form of .when instead of the object form to satisfy the lint
rule: replace .when('NEXT_PUBLIC_ROLLUP_TYPE', { is: ..., then: ..., otherwise:
... }) with .when('NEXT_PUBLIC_ROLLUP_TYPE', (rollupType, schema) => rollupType
? schema : schema.test('not-exist', 'NEXT_PUBLIC_ROLLUP_LAYER_NUMBER can only be
used with NEXT_PUBLIC_ROLLUP_TYPE', value => value === undefined)); also remove
the redundant .positive() since .min(2) already enforces positivity.

In `@lib/rollups/utils.ts`:
- Around line 35-36: The function formatZkSyncL2TxnBatchStatus incorrectly
performs two sequential string.replace calls which can clobber earlier
replacements (e.g., replacing 'L1' then matching the added 'L2'); update
formatZkSyncL2TxnBatchStatus to do a single-pass replacement by matching both
tokens at once (e.g., use a regex like /(L1|L2)/g) and map 'L1' ->
layerLabels.parent and 'L2' -> layerLabels.current in the replacement callback
so replacements never overwrite each other; keep references to
ZKSYNC_L2_TX_BATCH_STATUSES and layerLabels unchanged.

In `@ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx`:
- Line 142: Fix the typo in the hint string inside
ArbitrumL2TxnBatchDetails.tsx: update the hint prop value from "Heigh of ${
layerLabels.parent } block which includes ${ layerLabels.parent } transactions"
to use "Height" instead of "Heigh" where the hint is constructed (reference the
hint prop and layerLabels.parent usage).

---

Nitpick comments:
In `@ui/block/BlockDetails.tsx`:
- Around line 309-313: The mapped zkSync steps passed into VerificationSteps are
recreated each render; hoist that mapping into a memoized value using
React.useMemo and pass that memo (instead of
ZKSYNC_L2_TX_BATCH_STATUSES.map(...)) to VerificationSteps. Create something
like const zkSyncSteps = React.useMemo(() =>
ZKSYNC_L2_TX_BATCH_STATUSES.map(formatZkSyncL2TxnBatchStatus),
[ZKSYNC_L2_TX_BATCH_STATUSES, formatZkSyncL2TxnBatchStatus]) and then use
zkSyncSteps as the steps prop while leaving currentStep
(formatZkSyncL2TxnBatchStatus(data.zksync.status)) and isLoading
(isPlaceholderData) as-is.

In `@ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx`:
- Around line 87-89: The prop `steps` is recreated every render because you call
ZKEVM_L2_TX_BATCH_STATUSES.map(formatZkEvmL2TxnBatchStatus) inline; wrap that
mapping in a useMemo inside the ZkEvmL2TxnBatchDetails component to memoize the
resulting array and pass the memoized variable to VerificationSteps. Use
useMemo(() => ZKEVM_L2_TX_BATCH_STATUSES.map(formatZkEvmL2TxnBatchStatus), [/*
include dependencies such as formatZkEvmL2TxnBatchStatus if not stable */]) so
the steps array only changes when its dependencies change, then pass that
memoized variable as the steps prop while keeping currentStep as-is.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2202295 and ac06a8d.

⛔ Files ignored due to path filters (1)
  • icons/navigation/ecosystems.svg is excluded by !**/*.svg
📒 Files selected for processing (66)
  • configs/app/features/rollup.ts
  • deploy/tools/envs-validator/schemas/features/rollup.ts
  • deploy/tools/envs-validator/test/.env.optimism
  • deploy/tools/llms-txt-generator/index.ts
  • docs/ENVS.md
  • lib/hooks/useNavItems.tsx
  • lib/metadata/templates/title.ts
  • lib/rollups/utils.ts
  • ui/block/BlockDetails.tsx
  • ui/deposits/optimisticL2/OptimisticDepositsListItem.tsx
  • ui/deposits/optimisticL2/OptimisticDepositsTable.tsx
  • ui/deposits/scrollL2/ScrollL2DepositsListItem.tsx
  • ui/deposits/scrollL2/ScrollL2DepositsTable.tsx
  • ui/deposits/shibarium/DepositsListItem.tsx
  • ui/deposits/shibarium/DepositsTable.tsx
  • ui/deposits/zkEvmL2/ZkEvmL2DepositsListItem.tsx
  • ui/deposits/zkEvmL2/ZkEvmL2DepositsTable.tsx
  • ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesListItem.tsx
  • ui/disputeGames/optimisticL2/OptimisticL2DisputeGamesTable.tsx
  • ui/home/Stats.tsx
  • ui/home/Transactions.tsx
  • ui/home/latestDeposits/LatestDeposits.tsx
  • ui/home/latestDeposits/LatestDepositsItem.tsx
  • ui/messages/ArbitrumL2Messages.tsx
  • ui/messages/ArbitrumL2MessagesListItem.tsx
  • ui/messages/ArbitrumL2MessagesTable.tsx
  • ui/outputRoots/optimisticL2/OptimisticL2OutputRootsListItem.tsx
  • ui/outputRoots/optimisticL2/OptimisticL2OutputRootsTable.tsx
  • ui/pages/ArbitrumL2TxnWithdrawals.tsx
  • ui/pages/OptimisticL2Deposits.tsx
  • ui/pages/OptimisticL2OutputRoots.tsx
  • ui/pages/OptimisticL2Withdrawals.tsx
  • ui/pages/ScrollL2Deposits.tsx
  • ui/pages/ScrollL2Withdrawals.tsx
  • ui/pages/ShibariumDeposits.tsx
  • ui/pages/ShibariumWithdrawals.tsx
  • ui/pages/ZkEvmL2Deposits.tsx
  • ui/pages/ZkEvmL2Withdrawals.tsx
  • ui/shared/statusTag/ZkEvmL2TxnBatchStatus.tsx
  • ui/shared/statusTag/ZkSyncL2TxnBatchStatus.tsx
  • ui/tx/details/TxDetailsInterop.tsx
  • ui/tx/details/TxDetailsWithdrawalStatusArbitrum.tsx
  • ui/tx/details/TxInfo.tsx
  • ui/tx/details/TxInfoScrollFees.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesListItem.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchesTable.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobCallData.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobCelestia.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobEigenda.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchBlobEip4844.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchDetails.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesListItem.tsx
  • ui/txnBatches/optimisticL2/OptimisticL2TxnBatchesTable.tsx
  • ui/txnBatches/scrollL2/ScrollL2TxnBatchDetails.tsx
  • ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
  • ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchDetails.tsx
  • ui/txnBatches/zkSyncL2/ZkSyncL2TxnBatchHashesInfo.tsx
  • ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsListItem.tsx
  • ui/withdrawals/optimisticL2/OptimisticL2WithdrawalsTable.tsx
  • ui/withdrawals/scrollL2/ScrollL2WithdrawalsListItem.tsx
  • ui/withdrawals/scrollL2/ScrollL2WithdrawalsTable.tsx
  • ui/withdrawals/shibarium/WithdrawalsListItem.tsx
  • ui/withdrawals/shibarium/WithdrawalsTable.tsx
  • ui/withdrawals/zkEvmL2/ZkEvmL2WithdrawalsListItem.tsx
  • ui/withdrawals/zkEvmL2/ZkEvmL2WithdrawalsTable.tsx

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (3)
lib/rollups/utils.ts (3)

35-36: Chained .replace order still risks incorrect output for non-default layer configs.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/rollups/utils.ts` around lines 35 - 36, The current
formatZkSyncL2TxnBatchStatus uses chained .replace calls which can
mis-substitute when layerLabels are non-default; update the function to perform
safe tokenized replacement (e.g., replace using a single pass mapping or
temporary placeholders) so both 'L2' and 'L1' are replaced deterministically;
locate formatZkSyncL2TxnBatchStatus and change the replace logic to use a single
regex or map (matching 'L2'|'L1') and substitute with layerLabels.current and
layerLabels.parent respectively to avoid overlapping/reorder bugs.

10-11: NEXT_PUBLIC_ROLLUP_LAYER_NUMBER still missing from deploy/tools/envs-validator/test/.env.base.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/rollups/utils.ts` around lines 10 - 11, Add the missing
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER entry to the test environment base so the rollup
layer code can resolve `feature.layerNumber`/`L${ feature.layerNumber }` and its
parent value; update the deploy/tools/envs-validator/test/.env.base to include a
sensible integer (e.g., the current rollup layer) and ensure the envs-validator
test fixtures and any schema that lists required NEXT_PUBLIC_* variables
recognize NEXT_PUBLIC_ROLLUP_LAYER_NUMBER.

17-33: Add explicit : string return types to all three formatter functions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/rollups/utils.ts` around lines 17 - 33, Add explicit ": string" return
annotations to the formatter functions in this file: update the function
signatures for formatZkEvmTxStatus and formatZkEvmL2TxnBatchStatus (and any
other formatter function in the same file) to declare a string return type
(e.g., change "export const formatZkEvmTxStatus = (status: ...)" to "export
const formatZkEvmTxStatus = (status: ...): string" and similarly for
formatZkEvmL2TxnBatchStatus), ensuring the switch/default branches still return
string values and no runtime behavior is changed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx`:
- Around line 127-128: Fix the grammar in the hint string passed to the hint
prop in ArbitrumL2TxnBatchDetails: change the text from "Hash of ${
layerLabels.parent } transaction in which transactions was committed" to "Hash
of ${ layerLabels.parent } transaction in which transaction was committed"
(update the hint prop where layerLabels.parent is used to ensure correct
singular subject–verb agreement).

---

Duplicate comments:
In `@lib/rollups/utils.ts`:
- Around line 35-36: The current formatZkSyncL2TxnBatchStatus uses chained
.replace calls which can mis-substitute when layerLabels are non-default; update
the function to perform safe tokenized replacement (e.g., replace using a single
pass mapping or temporary placeholders) so both 'L2' and 'L1' are replaced
deterministically; locate formatZkSyncL2TxnBatchStatus and change the replace
logic to use a single regex or map (matching 'L2'|'L1') and substitute with
layerLabels.current and layerLabels.parent respectively to avoid
overlapping/reorder bugs.
- Around line 10-11: Add the missing NEXT_PUBLIC_ROLLUP_LAYER_NUMBER entry to
the test environment base so the rollup layer code can resolve
`feature.layerNumber`/`L${ feature.layerNumber }` and its parent value; update
the deploy/tools/envs-validator/test/.env.base to include a sensible integer
(e.g., the current rollup layer) and ensure the envs-validator test fixtures and
any schema that lists required NEXT_PUBLIC_* variables recognize
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER.
- Around line 17-33: Add explicit ": string" return annotations to the formatter
functions in this file: update the function signatures for formatZkEvmTxStatus
and formatZkEvmL2TxnBatchStatus (and any other formatter function in the same
file) to declare a string return type (e.g., change "export const
formatZkEvmTxStatus = (status: ...)" to "export const formatZkEvmTxStatus =
(status: ...): string" and similarly for formatZkEvmL2TxnBatchStatus), ensuring
the switch/default branches still return string values and no runtime behavior
is changed.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac06a8d and c2fcb43.

📒 Files selected for processing (6)
  • configs/app/features/rollup.ts
  • deploy/tools/llms-txt-generator/index.ts
  • lib/rollups/utils.ts
  • ui/block/BlockDetails.tsx
  • ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx
  • ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • configs/app/features/rollup.ts
  • ui/txnBatches/zkEvmL2/ZkEvmL2TxnBatchDetails.tsx
  • deploy/tools/llms-txt-generator/index.ts

Comment on lines +127 to 128
hint={ `Hash of ${ layerLabels.parent } transaction in which transactions was committed` }
>
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.

⚠️ Potential issue | 🟡 Minor

Grammar error in hint text: "transactions was" → "transaction was".

"Hash of ${ layerLabels.parent } transaction in which transactions was committed" has a subject–verb agreement error ("transactions was"). It should read "transaction was committed" to match the singular subject "transaction".

✏️ Proposed fix
-        hint={ `Hash of ${ layerLabels.parent } transaction in which transactions was committed` }
+        hint={ `Hash of ${ layerLabels.parent } transaction in which the transaction was committed` }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
hint={ `Hash of ${ layerLabels.parent } transaction in which transactions was committed` }
>
hint={ `Hash of ${ layerLabels.parent } transaction in which the transaction was committed` }
>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/txnBatches/arbitrumL2/ArbitrumL2TxnBatchDetails.tsx` around lines 127 -
128, Fix the grammar in the hint string passed to the hint prop in
ArbitrumL2TxnBatchDetails: change the text from "Hash of ${ layerLabels.parent }
transaction in which transactions was committed" to "Hash of ${
layerLabels.parent } transaction in which transaction was committed" (update the
hint prop where layerLabels.parent is used to ensure correct singular
subject–verb agreement).

@tom2drum tom2drum merged commit 39b512a into main Feb 25, 2026
12 checks passed
@tom2drum tom2drum deleted the tom2drum/issue-2554 branch February 25, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move layer numbering to the ENV

1 participant