Skip to content

Conversation

@tomusdrw
Copy link
Contributor

@tomusdrw tomusdrw commented Jan 2, 2026

No description provided.

@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for fluffy-codec ready!

Name Link
🔨 Latest commit 1941dbf
🔍 Latest deploy log https://app.netlify.com/projects/fluffy-codec/deploys/695f92795747f00008c09972
😎 Deploy Preview https://deploy-preview-69--fluffy-codec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR systematically refactors imports across the codebase from barrel imports to direct submodule namespace imports from @typeberry/lib, updates the TypeScript compilation target to ES2023, bumps package dependencies, and updates Biome schema configuration.

Changes

Cohort / File(s) Summary
Configuration & Dependencies
biome.jsonc, package.json, tsconfig.app.json
Biome schema version updated (2.3.9 → 2.3.11); @typeberry/lib dependency version bumped; TypeScript target updated from ES2020 to ES2023
Core Components - Import Refactoring
src/App.tsx, src/pages/Codec.tsx, src/test/examples.test.ts
Imports changed from named to namespace imports (import * as module from "@typeberry/lib/module") for bytes, utils modules
Core Components - Complex Changes
src/components/constants.ts, src/components/examples/objects/block.ts
Import refactoring plus public type signature updates; block.ts updates exports (blockExample, TEST_BLOCK) to use explicit types and direct submodule imports
Core Components - Mock Updates
src/components/CodecInput.test.tsx, src/components/KindFinder.test.tsx, src/components/SettingsDialog.test.tsx, src/pages/Codec.test.tsx
Mock interceptors for @typeberry/lib removed or restructured; test setup adjusted to use actual or reconfigured module imports
Core Components - Standard Refactoring
src/components/Controls.tsx, src/components/KindFinder.tsx, src/components/SettingsDialog.tsx
Namespace imports applied for bytes, config, utils, state modules
Examples - Objects (30\+ files)
src/components/examples/objects/*.ts
Consistent pattern: barrel imports replaced with namespace imports from submodules (@typeberry/lib/block, @typeberry/lib/config, @typeberry/lib/bytes, etc.)
Examples - State (15\+ files)
src/components/examples/state/*.ts
Consistent refactoring: aggregated imports split into per-module namespace imports with type-only markers where applicable
Examples - Primitives & STF
src/components/examples/primitives/data.ts, src/components/examples/primitives/numerics.ts, src/components/examples/host/infoAccount.ts, src/components/examples/stf/*.ts
Namespace imports applied; stf/genesis.ts includes explicit type annotation update for StateTransitionGenesis return type

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The PR spans 65\+ files with highly homogeneous changes (repetitive import refactoring pattern), reducing per-file cognitive load. However, complexity arises from: (1) scale requiring verification of import correctness across all submodules, (2) non-trivial logic changes in block.ts (type signature updates), (3) test mock restructuring requiring validation, and (4) potential for import resolution issues if submodule paths are incorrect.

Possibly related PRs

  • Examples & updates #68: Updates to @typeberry/lib dependencies and refactoring of barrel imports to submodule namespace imports across multiple files, directly related to this PR's import restructuring pattern.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0bff8e and 1941dbf.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (69)
  • biome.jsonc
  • package.json
  • src/App.tsx
  • src/components/CodecInput.test.tsx
  • src/components/Controls.tsx
  • src/components/KindFinder.test.tsx
  • src/components/KindFinder.tsx
  • src/components/SettingsDialog.test.tsx
  • src/components/SettingsDialog.tsx
  • src/components/constants.ts
  • src/components/examples/host/infoAccount.ts
  • src/components/examples/objects/assurancesExtrinsic.ts
  • src/components/examples/objects/availabilityAssurance.ts
  • src/components/examples/objects/block.ts
  • src/components/examples/objects/credential.ts
  • src/components/examples/objects/culprit.ts
  • src/components/examples/objects/disputesExtrinsic.ts
  • src/components/examples/objects/epochMarker.ts
  • src/components/examples/objects/extrinsic.ts
  • src/components/examples/objects/fault.ts
  • src/components/examples/objects/guaranteesExtrinsic.ts
  • src/components/examples/objects/header.ts
  • src/components/examples/objects/helpers.ts
  • src/components/examples/objects/importSpec.ts
  • src/components/examples/objects/judgement.ts
  • src/components/examples/objects/preimage.ts
  • src/components/examples/objects/preimageExtrinsic.ts
  • src/components/examples/objects/refineContext.ts
  • src/components/examples/objects/reportGuarantee.ts
  • src/components/examples/objects/signedTicket.ts
  • src/components/examples/objects/ticket.ts
  • src/components/examples/objects/ticketExtrinsic.ts
  • src/components/examples/objects/validatorKeys.ts
  • src/components/examples/objects/verdict.ts
  • src/components/examples/objects/workExecResult.ts
  • src/components/examples/objects/workItem.ts
  • src/components/examples/objects/workItemExtrinsicSpec.ts
  • src/components/examples/objects/workPackage.ts
  • src/components/examples/objects/workPackageSpec.ts
  • src/components/examples/objects/workReport.ts
  • src/components/examples/objects/workResult.ts
  • src/components/examples/primitives/data.ts
  • src/components/examples/primitives/numerics.ts
  • src/components/examples/state/accumulationOutputLog.ts
  • src/components/examples/state/accumulationQueue.ts
  • src/components/examples/state/authPools.ts
  • src/components/examples/state/authQueues.ts
  • src/components/examples/state/availabilityAssignment.ts
  • src/components/examples/state/common.ts
  • src/components/examples/state/currentValidators.ts
  • src/components/examples/state/designatedValidators.ts
  • src/components/examples/state/disputesRecords.ts
  • src/components/examples/state/entropy.ts
  • src/components/examples/state/lookupHistoryItem.ts
  • src/components/examples/state/previousValidators.ts
  • src/components/examples/state/privilegedServices.ts
  • src/components/examples/state/recentBlocks.ts
  • src/components/examples/state/recentlyAccumulated.ts
  • src/components/examples/state/safroleData.ts
  • src/components/examples/state/serviceAccount.ts
  • src/components/examples/state/statistics.ts
  • src/components/examples/state/timeslot.ts
  • src/components/examples/state/validatorSets.ts
  • src/components/examples/stf/genesis.ts
  • src/components/examples/stf/transition.ts
  • src/pages/Codec.test.tsx
  • src/pages/Codec.tsx
  • src/test/examples.test.ts
  • tsconfig.app.json

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

@tomusdrw tomusdrw marked this pull request as ready for review January 8, 2026 11:19
@tomusdrw tomusdrw merged commit c1e1ee8 into main Jan 8, 2026
5 of 6 checks passed
@tomusdrw tomusdrw deleted the td-newlib branch January 8, 2026 11: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.

2 participants