Skip to content

feat: implement batch transaction decoding command with an interactiv… - #415

Merged
codeZe-us merged 2 commits into
Toolbox-Lab:mainfrom
ABEEGOLD:ErrorSummaryList
Aug 24, 2026
Merged

feat: implement batch transaction decoding command with an interactiv…#415
codeZe-us merged 2 commits into
Toolbox-Lab:mainfrom
ABEEGOLD:ErrorSummaryList

Conversation

@ABEEGOLD

Copy link
Copy Markdown
Contributor

Closes #408

Description

This PR introduces batch decoding capabilities for analyzing large logs or processing multiple transactions simultaneously. It adds a new ErrorSummaryList UI component that takes a batch of parsed diagnostic error reports and renders a compact, aggregated summary view in the terminal. The summary groups identical or closely related errors to reduce visual noise and clearly displays their counts, providing developers an immediate overview of error distribution and cascading failures without being overwhelmed by verbose outputs.

How It Was Done

  • Batch Command (crates/cli/src/commands/batch.rs): Implemented a new BatchArgs CLI command that accepts a list of transaction hashes (or error hashes) natively. It resolves all entries in the batch by passing them through the decode_transaction_with_op_filter decoder and concatenates the resulting DiagnosticReports.
  • ErrorSummaryList Component (crates/cli/src/ui/error_summary.rs): Engineered the rendering component utilizing tabled for creating neat terminal tables and colored for applying distinct severity color codes.
  • Aggregation Logic: The errors are grouped into a HashMap by their error_category, error_name, and Severity. The accumulated rows are subsequently sorted by Severity weight (Fatal > Error > Warn > Info) and descending count frequency to highlight the most critical and prominent issues at the top of the terminal table.
  • Main Entrypoint (crates/cli/src/main.rs): Registered the batch command inside the primary command multiplexer enum.

Issues Encountered (If Any)

  • Formatting and Escape Characters: Ensured that terminal color ANSI escape codes emitted by the colored crate correctly integrate and align inside the tabled output format bounds.
  • Sandbox network configuration: Tested code logic manually as fetching actual configurations currently encounters network rate-limits/disconnections on local node environments. Code relies on existing well-established local offline structs (NetworkConfig).

How It Was Tested

  • Executed cargo check to assert proper module inclusion, imports matching, and correct crate dependencies implementation.
  • Manually verified the struct architecture for correctly reducing a simulated slice of array DiagnosticReports into grouped hash map rows.

Screenshots / Video (If Applicable)

(Insert a screenshot here showing the === Batch Decoding Summary === terminal output with grouped error severities color-coded in Fatal/Error/Warn/Info rows).

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a0c75c40-7e18-49cf-b4c4-209734fcf657


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.

@codeZe-us
codeZe-us self-requested a review August 24, 2026 12:09
@codeZe-us

Copy link
Copy Markdown
Contributor

PR reviewed and merged

@codeZe-us
codeZe-us merged commit b39406f into Toolbox-Lab:main Aug 24, 2026
3 checks passed
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.

Implement ErrorSummaryList for Batch Decoding

2 participants