Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .agents/shared/metrics/hits.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,11 @@
{"ts":"2026-07-28T16:26:08.696Z","tool":"Edit","file":"apps/app/src/shared/components/transactionDialog/useManagedTransaction.ts","rule":"error-and-monitoring","bytes":2525,"elapsed_ms":2,"adapter":"claude"}
{"ts":"2026-07-28T16:26:28.132Z","tool":"Edit","file":"apps/app/src/shared/components/transactionDialog/useManagedTransaction.test.ts","rule":"error-and-monitoring","bytes":2525,"elapsed_ms":1,"adapter":"claude"}
{"ts":"2026-07-28T16:31:25.874Z","tool":"Edit","file":"apps/app/src/shared/components/transactionDialog/transactionDialog.tsx","rule":"error-and-monitoring","bytes":2525,"elapsed_ms":1,"adapter":"claude"}
{"ts":"2026-08-03T13:05:06.523Z","tool":"Edit","file":"apps/app/src/modules/governance/api/smartContractService/smartContractService.api.ts","rule":"query-and-cache","bytes":2385,"elapsed_ms":3,"adapter":"claude"}
{"ts":"2026-08-03T13:05:14.497Z","tool":"Edit","file":"apps/app/src/modules/governance/api/smartContractService/smartContractService.api.ts","rule":"query-and-cache","bytes":2385,"elapsed_ms":11,"adapter":"claude"}
{"ts":"2026-08-03T13:05:27.682Z","tool":"Edit","file":"apps/app/src/modules/governance/api/smartContractService/smartContractService.api.ts","rule":"query-and-cache","bytes":2385,"elapsed_ms":3,"adapter":"claude"}
{"ts":"2026-08-03T13:05:34.336Z","tool":"Edit","file":"apps/app/src/modules/governance/api/smartContractService/smartContractService.ts","rule":"query-and-cache","bytes":2385,"elapsed_ms":3,"adapter":"claude"}
{"ts":"2026-08-03T13:13:29.614Z","tool":"Edit","file":"apps/app/src/modules/governance/api/smartContractService/smartContractService.api.ts","rule":"query-and-cache","bytes":2385,"elapsed_ms":3,"adapter":"claude"}
{"ts":"2026-08-03T13:13:36.306Z","tool":"Edit","file":"apps/app/src/modules/governance/api/smartContractService/smartContractService.api.ts","rule":"query-and-cache","bytes":2385,"elapsed_ms":3,"adapter":"claude"}
{"ts":"2026-08-03T14:29:17.284Z","tool":"Edit","file":"apps/app/src/actions/core/createProposal/createProposalActionDetails.tsx","rule":"core-action-decoded-input","bytes":948,"elapsed_ms":3,"adapter":"claude"}
{"ts":"2026-08-03T14:29:22.784Z","tool":"Edit","file":"apps/app/src/actions/core/execute/executeActionDetails.tsx","rule":"core-action-decoded-input","bytes":948,"elapsed_ms":2,"adapter":"claude"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aragon/app": minor
---

Enable ActionComposer to work outside of a DAO context by accepting a network prop
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export const CapitalDistributorEndCampaignActionCreate: React.FC<
ICapitalDistributorEndCampaignActionCreateProps
> = (props) => {
const { action, index } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'CapitalDistributorEndCampaignActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue, resetField } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export const CapitalDistributorPauseCampaignActionCreate: React.FC<
ICapitalDistributorPauseCampaignActionCreateProps
> = (props) => {
const { action, index } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'CapitalDistributorPauseCampaignActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue, resetField } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export const CapitalDistributorResumeCampaignActionCreate: React.FC<
ICapitalDistributorResumeCampaignActionCreateProps
> = (props) => {
const { action, index } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'CapitalDistributorResumeCampaignActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue, resetField } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
InputContainer,
type IProposalAction,
type IProposalActionComponentProps,
invariant,
} from '@aragon/gov-ui-kit';
import type { IProposalActionData } from '@/modules/governance/components/createProposalForm';
import { NestedActionsList } from '@/modules/governance/components/nestedActionsList';
Expand All @@ -25,6 +26,13 @@ export const CreateProposalActionDetails: React.FC<
ICreateProposalActionDetailsProps
> = (props) => {
const { action, chainId } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'CreateProposalActionDetails: daoId must be set on the action.',
);

const { inputData } = action as unknown as ICoreActionCreateProposal;

const { t } = useTranslations();
Expand Down
8 changes: 8 additions & 0 deletions apps/app/src/actions/core/execute/executeActionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
InputContainer,
type IProposalAction,
type IProposalActionComponentProps,
invariant,
} from '@aragon/gov-ui-kit';
import type { IProposalActionData } from '@/modules/governance/components/createProposalForm';
import { NestedActionsList } from '@/modules/governance/components/nestedActionsList';
Expand All @@ -19,6 +20,13 @@ export const ExecuteActionDetails: React.FC<IExecuteActionDetailsProps> = (
props,
) => {
const { action, chainId } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'ExecuteActionDetails: daoId must be set on the action.',
);

const { inputData } = action as unknown as ICoreActionExecute;

const { t } = useTranslations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export const GaugeRegistrarUnregisterGaugeActionCreate: React.FC<
IGaugeRegistrarUnregisterGaugeActionCreateProps
> = (props) => {
const { action, index } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeRegistrarUnregisterGaugeActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
type IProposalAction,
type IProposalActionComponentProps,
type IProposalActionInputDataParameter,
invariant,
} from '@aragon/gov-ui-kit';
import type { Address, Hex } from 'viem';
import { useReadContract } from 'wagmi';
Expand Down Expand Up @@ -54,6 +55,12 @@ export const GaugeRegistrarUnregisterGaugeActionDetails: React.FC<
IGaugeRegistrarUnregisterGaugeActionDetailsProps
> = (props) => {
const { action } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeRegistrarUnregisterGaugeActionDetails: daoId must be set on the action.',
);
const pluginAddress = action.to;
const { data: dao } = useDao({ urlParams: { id: action.daoId } });
const [gaugeVoterPlugin] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export const GaugeVoterActivateGaugeActionCreate: React.FC<
IGaugeVoterActivateGaugeActionCreateProps
> = (props) => {
const { action, index } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeVoterActivateGaugeActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
EmptyState,
type IProposalAction,
type IProposalActionComponentProps,
invariant,
} from '@aragon/gov-ui-kit';
import type { Hex } from 'viem';
import type { IProposalActionData } from '@/modules/governance/components/createProposalForm';
Expand All @@ -27,6 +28,12 @@ export const GaugeVoterActivateGaugeActionDetails: React.FC<
IGaugeVoterActivateGaugeActionDetailsProps
> = (props) => {
const { action } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeVoterActivateGaugeActionDetails: daoId must be set on the action.',
);
const pluginAddress = action.to;
const { data: dao } = useDao({ urlParams: { id: action.daoId } });
const { t } = useTranslations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export const GaugeVoterDeactivateGaugeActionCreate: React.FC<
IGaugeVoterDeactivateGaugeActionCreateProps
> = (props) => {
const { action, index } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeVoterDeactivateGaugeActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
EmptyState,
type IProposalAction,
type IProposalActionComponentProps,
invariant,
} from '@aragon/gov-ui-kit';
import type { Hex } from 'viem';
import type { IProposalActionData } from '@/modules/governance/components/createProposalForm';
Expand All @@ -27,6 +28,12 @@ export const GaugeVoterDeactivateGaugeActionDetails: React.FC<
IGaugeVoterDeactivateGaugeActionDetailsProps
> = (props) => {
const { action } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeVoterDeactivateGaugeActionDetails: daoId must be set on the action.',
);
const pluginAddress = action.to;
const { data: dao } = useDao({ urlParams: { id: action.daoId } });
const { t } = useTranslations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export const GaugeVoterUpdateGaugeMetadataActionCreate: React.FC<
IGaugeVoterUpdateGaugeMetadataActionCreateProps
> = (props) => {
const { action, index, chainId } = props;

// The view resolves its DAO data from the action, so it only supports actions composed in DAO context.
invariant(
action.daoId != null,
'GaugeVoterUpdateGaugeMetadataActionCreate: daoId must be set on the action.',
);
const { t } = useTranslations();
const { open } = useDialogContext();
const { setValue, unregister } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Network } from '@/shared/api/daoService';
import type {
IRequestBodyParams,
IRequestUrlBodyParams,
IRequestUrlParams,
} from '@/shared/api/httpService';
Expand Down Expand Up @@ -51,13 +52,16 @@ export interface IDecodeTransactionParams

export interface IDecodeTransactionsLightUrlParams {
/**
* Network of the DAO.
* Network of the smart contracts to decode actions for.
*/
network: Network;
}

export interface IDecodeTransactionsLightQueryParams {
/**
* Address of the DAO.
* Address sending the actions, i.e., DAO.
*/
address: string;
from: string;
}

export interface IDecodeTransactionsLightAction {
Expand All @@ -82,7 +86,10 @@ export type IDecodeTransactionsLightBodyParams =
IDecodeTransactionsLightAction[];

export interface IDecodeTransactionsLightParams
extends IRequestUrlBodyParams<
IDecodeTransactionsLightUrlParams,
IDecodeTransactionsLightBodyParams
> {}
extends IRequestUrlParams<IDecodeTransactionsLightUrlParams>,
IRequestBodyParams<IDecodeTransactionsLightBodyParams> {
/**
* Query parameters of the request, omitted when decoding outside DAO context.
*/
queryParams?: IDecodeTransactionsLightQueryParams;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SmartContractService extends AragonBackendService {
private urls = {
abi: '/v2/contract/:network/:address',
decodeTransaction: '/v2/contract/:network/:address/decode',
decodeTransactionsBatch: '/v2/contract/:network/:address/decode-batch',
decodeTransactionsBatch: '/v3/contract/:network/decode-batch',
};

getAbi = async (
Expand Down
Loading
Loading