Skip to content

Conversation

@milosh86
Copy link
Contributor

@milosh86 milosh86 commented Jan 9, 2026

Description

Implement decoding of uploaded actions. Not all basic views are supported yet. General approach is that actions not explicitly handled are marked as Unknown. Unknown actions are rendered with decoded view only.

Basic view status:

Implemented:

  • Transfer
  • TokenVoting mint
  • TokenVoting update settings
  • Multisig add member
  • Multisig remove member
  • Multisig update settings

Not implemented due to the lack of IPFS resolution support:

  • DAO metadata update
  • Plugin metadata update
  • GaugeVoter createGauge, updateGaugeMetadata

Not implemented due to complexity, needs a separate ticket:

  • GaugeRegistrar registerGauge and unregisterGauge
  • GaugeVoter activate/deactivate gauge, updateGaugeMetadata

Type of Change

  • Major: Breaking change (change that would cause existing functionality to not work as expected)
  • Minor: Feature (non-breaking change which adds new functionality)
  • Patch: Enhancement (non-breaking change to an existing feature)
  • Patch: Bug fix (non-breaking change which fixes an issue)

Developer Checklist:

  • Manually smoke tested the functionality in a preview or locally
  • Confirmed there are no new warnings or errors in the browser console
  • (For User Stories only) Double-checked that all Acceptance Criteria are satisfied
  • Confirmed there are no new warnings on automated tests
  • Merged and published any dependent changes in downstream modules
  • Selected the correct base branch
  • Commented the code in hard-to-understand areas
  • Followed the code style guidelines of this project
  • Reviewed that the Files Changed in Github’s UI reflect my intended changes
  • Confirmed the pipeline checks are not failing

Review Checklist:

  • (For User Stories only) Tested in a preview or locally that all Acceptance Criteria are satisfied
  • Confirmed that changes follow the code style guidelines of this project

@linear
Copy link

linear bot commented Jan 9, 2026

Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

🚀 Preview Deployment: View Here

Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
@milosh86 milosh86 marked this pull request as ready for review January 12, 2026 16:33
Copilot AI review requested due to automatic review settings January 12, 2026 16:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements decoding functionality for uploaded proposal actions, allowing users to import action files with automatic decoding and normalization. The implementation supports various action types including transfers, DAO/plugin metadata updates, TokenVoting operations, Multisig member management, and GaugeVoter gauge creation. Actions that cannot be explicitly normalized are marked as 'Unknown' and rendered with decoded view only.

Changes:

  • Added decodeActions and normalizeDecodedActions methods to proposalActionsImportExportUtils for decoding and transforming imported actions into proper form data
  • Enhanced transferAssetAction component to fetch and display balance information for imported actions
  • Integrated decoding flow into actionComposer with loading state management

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
src/modules/governance/utils/proposalActionsImportExportUtils/proposalActionsImportExportUtils.ts Core implementation of action decoding and normalization logic with support for multiple action types
src/modules/governance/components/createProposalForm/createProposalFormActions/proposalActions/transferAssetAction/transferAssetAction.tsx Enhanced to fetch balance data for imported transfer actions
src/modules/governance/components/actionComposer/actionComposer/actionComposer.tsx Integrated decoding flow with loading state and error handling
src/assets/locales/en.json Added loading message for action decoding
config/.env.local Configuration changes to backend URL and API version
.changeset/public-otters-itch.md Changeset documenting the minor version bump
Comments suppressed due to low confidence (1)

src/modules/governance/components/actionComposer/actionComposer/actionComposer.tsx:177

  • The function signature indicates it expects IExportedAction[], but it's now being called with decoded IProposalAction[] at line 210. The function should be updated to accept IProposalAction[] as its parameter type, or the parameter name should be changed to reflect that these are already decoded actions.
    const handleImportActions = (actions: IExportedAction[]) => {
        const parsedActions = actions.map((action) => {
            const actionId = crypto.randomUUID();
            return {
                ...action,
                value: BigInt(action.value),
                id: actionId,
                daoId,
            } as unknown as IProposalActionData;
        });
        onAddAction(parsedActions);
    };

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@milosh86 milosh86 changed the title APP-42: Decode uploaded actions WIP APP-42: Decode uploaded actions Jan 13, 2026
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
@milosh86 milosh86 changed the title WIP APP-42: Decode uploaded actions APP-42: Decode uploaded actions Jan 13, 2026
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Milos Dzepina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants