Skip to content

[Transactions] Batch Operation Summary #511

Closed

Description

@egekoca

Goal

Decode a pasted transaction envelope with multiple operations and show an aggregate summary: counts by operation type, total native amount moved, and every distinct source account referenced, without submitting anything.

Data source: Pasted transaction envelope XDR decoded locally with the Stellar SDK; fully offline.

This issue is independent of every other new-season issue. Implement it entirely in features/batch-operation-summary/; the generated registry handles routing, search and navigation. Do not require another feature or pull request to land first.

Acceptance criteria

  • Decode every operation in the envelope, including operation-level source account overrides.
  • Count operations by type and show the count table alongside the overall operation total.
  • Sum native XLM amounts moved by payment and path-payment operations using exact arithmetic, labeled as native-only.
  • List every distinct source account referenced, separating the transaction source from operation-level overrides.
  • Reject malformed or oversized XDR before rendering any values.

At least 35 meaningful file changes

Start with npm run new:feature -- batch-operation-summary "Batch Operation Summary" transactions. The scaffold supplies the standard 23-file shape; add the twelve task-specific files below and replace all placeholders with working behavior. Every listed file must contain relevant implementation, coverage, fixture data or documentation; empty or duplicated files do not count. A PR may change more than 35 files inside this slice when justified.

Required file Responsibility
features/batch-operation-summary/manifest.ts Registry metadata and supported networks
features/batch-operation-summary/panel.tsx Route-mounted feature entry point
features/batch-operation-summary/types.ts Input, result, state and error-code types
features/batch-operation-summary/schema.ts Raw input validation without requests
features/batch-operation-summary/copy.ts All user-facing strings and actionable error text
features/batch-operation-summary/lib/batchOperationSummary.ts Result-based feature orchestration
features/batch-operation-summary/lib/batchOperationSummary.errors.ts Transport or decode failure mapping
features/batch-operation-summary/lib/format.ts Presentation formatting
features/batch-operation-summary/hooks/useBatchOperationSummary.ts Idle, loading, success and error state machine
features/batch-operation-summary/components/BatchOperationSummaryPanel.tsx Composition of every state
features/batch-operation-summary/components/BatchOperationSummaryForm.tsx Accessible input controls
features/batch-operation-summary/components/BatchOperationSummaryResult.tsx Successful result overview
features/batch-operation-summary/components/BatchOperationSummaryEmptyState.tsx Pre-interaction guidance
features/batch-operation-summary/__tests__/batchOperationSummary.test.ts Domain success and failure cases
features/batch-operation-summary/__tests__/schema.test.ts Input and boundary validation
features/batch-operation-summary/__tests__/format.test.ts Exact display formatting
features/batch-operation-summary/__tests__/useBatchOperationSummary.test.tsx State transitions and network changes
features/batch-operation-summary/__tests__/BatchOperationSummaryPanel.test.tsx Rendered behavior
features/batch-operation-summary/__tests__/a11y.test.tsx WCAG 2.1 A/AA in at least two states
features/batch-operation-summary/fixtures/batchOperationSummary.fixture.ts Deterministic normal-case data
features/batch-operation-summary/msw/handlers.ts Network fixtures, or an empty array for offline tools
features/batch-operation-summary/e2e/batch-operation-summary.spec.ts Main browser journey
features/batch-operation-summary/README.md Behavior, data boundaries and design decisions
features/batch-operation-summary/lib/operation-decode.ts Decode every operation in the envelope.
features/batch-operation-summary/lib/operation-type-counts.ts Count operations by type.
features/batch-operation-summary/lib/source-account-set.ts Collect every distinct source account referenced.
features/batch-operation-summary/components/OperationTypeCounts.tsx Show the operation-type count table.
features/batch-operation-summary/components/NativeAmountTotal.tsx Show the summed native amount.
features/batch-operation-summary/components/SourceAccountRows.tsx Show every distinct source account.
features/batch-operation-summary/__tests__/operation-decode.test.ts Tests for lib/operation-decode.ts
features/batch-operation-summary/__tests__/operation-type-counts.test.ts Tests for lib/operation-type-counts.ts
features/batch-operation-summary/__tests__/source-account-set.test.ts Tests for lib/source-account-set.ts
features/batch-operation-summary/fixtures/mixed-operations.fixture.ts Deterministic edge-case fixture
features/batch-operation-summary/fixtures/operation-source-override.fixture.ts Deterministic edge-case fixture
features/batch-operation-summary/e2e/source-override.spec.ts Distinct edge-case browser journey

Error outcomes

  • empty_xdr: map to specific, actionable copy and cover with a test
  • invalid_xdr: map to specific, actionable copy and cover with a test
  • unsupported_operation: map to specific, actionable copy and cover with a test
  • too_large: map to specific, actionable copy and cover with a test

Shared quality bar

  • Use Result<T, Code> for expected failures; keep all user-facing copy in copy.ts.
  • Cover idle, loading, success and error states. For fully offline tools, loading may be a brief local-processing state.
  • Use strings and BigInt for Stellar amounts; never accept, display, store or transmit secret keys.
  • Derive valid Stellar addresses from fixed seeds in fixtures; mock requests with MSW.
  • Test normal, boundary, malformed-input and transport cases where applicable, plus at least two accessibility states.
  • Pass npm run check and npm run verify:features -- batch-operation-summary.
  • Keep the pull request inside features/batch-operation-summary/.

This tool is fully offline. Set networks: [] and offline: true in the manifest, and export an empty MSW handler array.

Implementation note: Only native XLM amounts can be summed meaningfully across mixed operation types without a shared unit; issued-asset amounts must stay broken out per asset identity, never merged into the native total.

Reference slice: features/preconditions-explainer; also read the feature contract.

Out of scope

  • No transaction signing or submission.
  • No per-operation result evaluation.

Activity

  1. Olo2u commented on Oct 18, 2026

    @Olo2u

    @Olo2u has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer, I'd like to work on this issue. I understand the task and can start right away. Please assign it to me. Thanks! Olo2Dev

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Olo2u to this issue.

  2. 6akola commented on Oct 19, 2026

    @6akola

    @6akola has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi, I'd like to work on this. Please assign me this issue.
    Thank you for your consideration.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @6akola to this issue.

  3. midexol commented on Oct 19, 2026

    @midexol

    @midexol has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer I would like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @midexol to this issue.

  4. elfelf2 commented on Oct 21, 2026

    @elfelf2

    @elfelf2 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I would like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @elfelf2 to this issue.

  5. karagozemin commented on Oct 21, 2026

    @karagozemin
    Contributor

    @karagozemin has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    let mw rok

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @karagozemin to this issue.

  6. drips-wave commented on Oct 21, 2026

    @drips-wave

    Congratulations, @karagozemin! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @karagozemin: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  7. grantfox-oss commented on Oct 27, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @karagozemin's PR #538 was approved and merged by @egekoca.

    🏆 @karagozemin: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,739 total points). Track your full progress on GrantFox.

    👏 Great work, @karagozemin! Keep contributing to RevenantLabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions