Skip to content

fix: lambda proposal flow (Execute button, contract call amount, labels) - #970

Open
EightRice wants to merge 2 commits into
masterfrom
fix/lambda-proposal-ui
Open

EightRice wants to merge 2 commits into
masterfrom
fix/lambda-proposal-ui

Conversation

@EightRice

Copy link
Copy Markdown
Collaborator

Follow-up to the lambda feature test. The on-chain mechanism and the backend endpoint (homebase-lite-backend #42, #43) are fixed; this covers the three frontend issues found.

Execute / Drop Expired buttons disabled on a fresh load. useProposals(dao, status) applied the status filter inside the query function using the cycle info available at the first fetch, which is block 0 until the TzKT websocket delivers a head, and cached the result under a key that never changed. So on a fresh load the list showed a proposal as Executable while the toolbar button stayed disabled until a remount or the 30 s refetch. The hook now fetches the list once per DAO and filters at render time with the live cycle info (useMemo). The isLoading state that never flipped to false is gone too.

Contract Call amount. The form takes XTZ but the generated lambda did PUSH mutez <amount>, so 1 XTZ attached 1 mutez. Converted to mutez before building the lambda.

Proposal detail label. Every proposal read "Treasury Proposal"; lambda proposals now read Add Function, Remove Function, Execute Function or Contract Call.

Verified on a local sandbox stack driven through the real UI: deposit, enable ACI, a contract call with 1 XTZ attached, vote, Execute clicked on a freshly loaded page; the target contract received 1,000,000 mutez and the string from the form.

https://claude.ai/code/session_01UG9AFKKU31ba2d9QNLV44R

- Execute and Drop Expired buttons stayed disabled on a fresh page load even when proposals were shown as Executable. useProposals filtered by status inside the query function with the cycle info known at the first fetch (block 0 before the TzKT websocket delivers), under a cache key that never changed. The list is now fetched once per DAO and the status filter is applied at render time with the current cycle info.
- Contract Call proposals pushed the form's XTZ amount as mutez. Converted to mutez before building the lambda.
- Proposal detail page labelled every proposal "Treasury Proposal"; lambda proposals now read Add Function, Remove Function, Execute Function or Contract Call.

Verified on a local sandbox stack (deposit, enable ACI, contract call with 1 XTZ attached, vote, Execute on a fresh load; target contract received 1 tez and the string).

Claude-Session: https://claude.ai/code/session_01UG9AFKKU31ba2d9QNLV44R
@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tezos-homebase ready!

Name Link
🔨 Latest commit da2217d
🔍 Latest deploy log https://app.netlify.com/projects/tezos-homebase/deploys/6acbd0312dbba300086558b3
😎 Deploy Preview https://deploy-preview-970--tezos-homebase.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 27 (no change from production)
Accessibility: 91 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

…-votes hint in the vote dialog

- In a DAO without the aci_executor handler, choosing Contract Call opened two dialogs on top of each other: the proposal dialog with a bare "deploy" message and a second dialog whose open state was never released, so neither could be closed and the page had to be reloaded. The explanation and the Submit button (which leads to the add-function proposal) now live inside the single proposal dialog, which closes normally.
- The vote dialog explains why the maximum is lower than expected when the voter still has tokens staked on executed or dropped proposals, with a link to the User page where Unstake releases them.

Claude-Session: https://claude.ai/code/session_01UG9AFKKU31ba2d9QNLV44R
@EightRice

Copy link
Copy Markdown
Collaborator Author

Two more fixes pushed to this branch:

  • Contract Call in a DAO without the executor handler opened two stacked dialogs that could not be closed (the second one's open state was never released); the only way out was a reload. The explanation and the Submit button now sit inside the single proposal dialog, which closes normally. Verified on the sandbox with a fresh DAO: one dialog, Escape closes it, Submit opens the prefilled add-function form.
  • Vote dialog hint: when the voter still has tokens staked on executed or dropped proposals, the dialog says so (amount and symbol) and links to the User page where Unstake releases them. Verified: "29,000 OMP are still staked on finished proposals..." with the link.

https://claude.ai/code/session_01UG9AFKKU31ba2d9QNLV44R

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.

1 participant