Skip to content

fix(governance): only label payloads executed once they have run - #3126

Open
shivam-V8 wants to merge 1 commit into
aave:mainfrom
shivam-V8:fix/2480-payload-executed-label
Open

shivam-V8 wants to merge 1 commit into
aave:mainfrom
shivam-V8:fix/2480-payload-executed-label

Conversation

@shivam-V8

Copy link
Copy Markdown

General Changes

  • Fixes app.aave.com/governance - UI - False 'Payload Executed' Text Stamp #2480: the proposal Timeline labelled every payload "Payload N executed", including payloads that were only queued or created, so a Passed-but-unexecuted proposal appeared to have already executed on-chain.
  • The payload sub-row label now follows the payload's actual state: executed / not executed / cancelled / expired / execution (not yet queued).
  • The step header now reads "Payloads executed" only once every payload has executed; otherwise "Payloads" (in progress) or "Payloads finalized" (settled with some cancelled/expired).

Developer Notes

Root cause: in src/modules/governance/proposal/ProposalTimeline.tsx, the sub-row label was emitted unconditionally as <Trans>Payload {id} executed</Trans> inside list.map(). The if/else chain above it varied only the right-hand value and tone, never the label — so a queued payload rendered "Payload 123 executed" next to its own "in 6h" countdown.

Payload state Value (was correct) Label (was wrong)
queued in 6h / Ready to execute "Payload 123 executed"
created ~Nov 3, 2025 4:00 PM (estimate) "Payload 123 executed"
executed execution timestamp "Payload 123 executed" ✅

Approach: the state-to-label mapping is extracted into a new pure helper, getPayloadLabelKind in src/modules/governance/utils/payloadStatus.ts, so it can be unit tested without rendering. ProposalTimeline.tsx keeps the <Trans> strings (lingui needs them statically analysable) and renders the kind. Unrecognised states fall back to a neutral label and never to "executed" — ProposalPayload.state is a free-form string from the governance cache, so a new state value should never silently assert an on-chain action.

Tests: added src/modules/governance/__tests__/payloadStatus.test.ts — 10 pure-logic cases covering each state plus unknown/empty/null/undefined, matching the repo's existing pure-function test style. The queued → "not executed" case is the regression guard.

i18n: new <Trans> strings, so catalogs were regenerated with pnpm i18n and committed.

Out of scope: step 6's Payload {id} received label has the same shape, but its value column already renders a visible estimate and "received" is a much weaker claim than "executed". Happy to follow up separately if you'd like it changed too.

Pre-existing failures: 4 jest suites in src/utils/ fail on main already (a wagmi/chains import issue) and are unaffected by this change.


Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the applica
  • If there are new 3rd-party packages, they do not introreats
  • If there are new environment variables being added, th.env.example file as well as the pertinant.github/actions/* files
  • There are no CI changes, or they have been approved byg team(s)

The proposal timeline rendered "Payload N executed" for every payload, including ones
still queued or created, so Passed proposals appeared to have executed. Derive the
label from the payload state instead.

Closes aave#2480
@vercel

vercel Bot commented Oct 11, 2026

Copy link
Copy Markdown

@Krshivam25 is attempting to deploy a commit to the Aave Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

app.aave.com/governance - UI - False 'Payload Executed' Text Stamp

2 participants