Skip to content

fix: decode flow cap activity details - #801

Merged
Seranged merged 4 commits into
developmentfrom
feature/lite-325-flow-cap-event-decodingux-fix
Aug 12, 2026
Merged

Seranged merged 4 commits into
developmentfrom
feature/lite-325-flow-cap-event-decodingux-fix

Conversation

@Seranged

@Seranged Seranged commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Decode serialized Euler Earn Public Allocator flow-cap configs into readable per-strategy limit details.
  • Resolve strategy vaults and format maximum inflow and outflow in the Earn vault underlying asset units.

Changes

  • Parse and validate FlowCapsConfig payloads with a raw fallback for malformed or future shapes.
  • Show a compact strategy count while collapsed and linked per-strategy limits when expanded.
  • Display set_flow_caps events as Public allocator limits updated.
  • Hydrate strategy metadata and cover decoding, formatting, resolution, labeling, and fallback behavior with tests.

Preview

Screenshots

Collapsed

Collapsed Public allocator limits activity row

Expanded

Expanded Public allocator limits activity details

Test plan

  • npm run build
  • npm run lint
  • npm run typecheck
  • npm run test:run
  • Verified collapsed and expanded Public Allocator limit activity on the PR 801 Railway preview.

Summary by CodeRabbit

  • New Features

    • Activity details now show additional metadata alongside relevant addresses.
    • Flow-cap changes display strategy details, including maximum incoming and outgoing amounts.
    • Vault and explorer addresses in flow-cap activity entries are linked for easier navigation.
    • Flow-cap activities use clearer “Public allocator limits updated” labeling.
  • Bug Fixes

    • Invalid or incomplete flow-cap configurations retain available raw details.
    • Address rows can wrap content for improved readability.

@railway-app

railway-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

🚅 Deployed to the euler-lite-pr-801 environment in euler-lite(dev,PR previews)

Service Status Web Updated (UTC)
dev-build ✅ Success (View Logs) Web Aug 11, 2026 at 12:43 pm

@railway-app
railway-app Bot temporarily deployed to euler-lite(dev,PR previews) / euler-lite-pr-801 August 11, 2026 11:43 Destroyed
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Flow-cap configurations are parsed and formatted as strategy entries. Strategy addresses are included in vault resolution. Activity rows render optional metadata beside address links.

Changes

Flow-cap activity display

Layer / File(s) Summary
Parse and format flow-cap changes
utils/activity-display.ts, tests/utils/activity-display.test.ts
Validates serialized set_flow_caps configurations and creates formatted strategy entries with links and maximum inbound/outbound caps. Tests cover valid and malformed configurations.
Resolve flow-cap strategy addresses
utils/activity-display.ts, tests/utils/activity-display.test.ts
Includes strategy identifiers in vault address resolution. Tests cover labels, links, extracted addresses, and fallback output.
Render address metadata
components/entities/activity/ActivityEventRow.vue, utils/activity-display.ts
Preserves optional address metadata and displays it beside wrapping address links.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant set_flow_caps
  participant activity_display
  participant ActivityEventRow
  set_flow_caps->>activity_display: provide serialized configuration
  activity_display->>activity_display: validate and format strategy entries
  activity_display->>ActivityEventRow: provide address links and addressDetails
  ActivityEventRow->>ActivityEventRow: render wrapped address rows
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: decoding flow-cap activity details.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/lite-325-flow-cap-event-decodingux-fix

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review summary

No high-severity issues found. This is a display-only change that decodes Earn set_flow_caps configs into strategy rows with max-in/max-out amounts; parsing fails closed to the raw config string, amounts stay in bigint via formatUnits, and units correctly come from the Earn vault underlying asset (matching PublicAllocator semantics).

Reviewed: utils/activity-display.ts, components/entities/activity/ActivityEventRow.vue, tests/utils/activity-display.test.ts · Traced beyond the diff: resolveChangeAddresses / vault metadata lookup, formatActivityTokenAmount, getActivityResolvableVaultAddressesActivityEventRow hydration, Earn PublicAllocator FlowCaps / MAX_SETTABLE_FLOW_CAP · Protocol skills consulted: euler-earn

Not flagged

  • No Unlimited mapping for flow caps: unlike Earn allocation caps (UINT136_MAX), PublicAllocator has no unlimited sentinel (MAX_SETTABLE_FLOW_CAP = type(uint128).max / 2); treating that as Unlimited would be inventing protocol meaning.
  • String-only maxIn/maxOut validation is intentional given nested JSON and uint128 range; author verified against a live Monad Earn vault.
  • XSS surface is text interpolation only ({{ detail.addressDetails[...] }}); no v-html.
Open in Web View Automation 

Sent by Cursor Automation: Lite PR Reviewer

@railway-app
railway-app Bot temporarily deployed to euler-lite(dev,PR previews) / euler-lite-pr-801 August 11, 2026 12:23 Destroyed
@railway-app
railway-app Bot temporarily deployed to euler-lite(dev,PR previews) / euler-lite-pr-801 August 11, 2026 12:42 Destroyed
@Seranged
Seranged requested a review from kanvgupta August 12, 2026 10:43
@Seranged
Seranged merged commit 44d8d28 into development Aug 12, 2026
5 checks passed
@Seranged
Seranged deleted the feature/lite-325-flow-cap-event-decodingux-fix branch August 12, 2026 10:45
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