Skip to content

DAO email alerts and poll-to-chain promotion - #968

Open
EightRice wants to merge 1 commit into
masterfrom
feat/dao-alerts-and-poll-promotion
Open

EightRice wants to merge 1 commit into
masterfrom
feat/dao-alerts-and-poll-promotion

Conversation

@EightRice

Copy link
Copy Markdown
Collaborator

What

Two features aimed at the way the Ecosystem DAO actually runs grants (poll on Homebase, then an on-chain transfer proposal, then keyholder votes), plus one dev-mode crash fix. Backend counterpart: dOrgTech/homebase-lite-backend#39.

DAO email alerts

  • "Get email alerts for this DAO" box on the DAO overview page (Tezos DAOs only, hidden on Etherlink). Posts to the lite backend /subscriptions; the backend sends a confirmation email.
  • The confirm and unsubscribe links land back in the app with ?alerts=confirmed|unsubscribed|invalid. A shared hook (useAlertsOutcomeToast) shows the outcome as a toast on the DAO overview and DAO list pages and drops the param without touching other query params.
  • The DAO router redirect to /overview now keeps the query string.
  • Pending votes banner on the overview for the connected account.

Lite polls: funding request and promotion to on-chain

  • Poll creation gets an optional "Funding request" section (recipient, XTZ amount) behind a toggle, validated client side (Tezos address, positive amount with up to 6 decimals). Shows the linked DAO's treasury balance as a hint.
  • The poll page shows a funding request card with the treasury balance and a warning when the request exceeds it.
  • "Create on-chain transfer proposal" opens the normal transfer proposal form for the community's linked baseDAO, pre-filled with recipient and amount. After submission the app polls the indexer for the newest proposal by the same wallet and links it to the poll via /polls/:id/link-proposal; the card then links to the on-chain proposal.
  • No outcome gate on purpose: an off-chain poll has no authority, so the button is offered whenever the community is linked to an on-chain DAO and a wallet is connected.

Fix

Every lite poll page crashed in development with "Cannot assign to read only property 'theme'": the status badge passed a static theme prop into an emotion styled component, and MUI v6 then mutated the frozen React props. Production builds never froze props, which is why it went unnoticed. The prop is removed; the styled function already receives the theme from context.

Config

REACT_APP_LITE_API_URL must point at the lite backend (already the case in production). Documented in env.example.

Verification

  • CI=false npx craco build compiles, tsc --noEmit clean, eslint clean.
  • Tested locally against the backend branch with real email: subscribe, confirmation email, confirm link with toast, unsubscribe link with toast, stale link with toast, and a "proposal created" email after creating a proposal on chain.
  • Funding request card and creation form verified in the browser. The promotion button itself could not be exercised end to end yet because the test DAO was in its voting period; it submits the same transfer proposal the Treasury page does.

Known limitation

The linked proposal key is inferred (newest proposal by the same wallet after submission), not read from the operation result. Good enough for one proposer at a time; a follow-up could return the key from the contract call.

https://claude.ai/code/session_01UG9AFKKU31ba2d9QNLV44R

Email alerts (Tezos DAOs):
- Subscribe box on the DAO overview page posting to the lite backend /subscriptions; hidden on Etherlink
- Confirm and unsubscribe links land back in the app with ?alerts=..., acknowledged with a toast by a shared hook on the DAO overview and DAO list pages
- DAO router redirect to /overview keeps the query string
- Pending votes banner for the connected account

Lite polls:
- Optional funding request (recipient, XTZ amount) on poll creation, with a treasury balance hint for communities linked to an on-chain DAO
- Funding request card on the poll page with a "Create on-chain transfer proposal" button that opens the pre-filled transfer form on the linked baseDAO, then links the new proposal back to the poll via /polls/:id/link-proposal
- The proposal key is inferred as the newest proposal by the same wallet, polled from the indexer after submission

Also fixes a dev-mode crash on every lite poll page: the status badge passed a static theme prop into an emotion styled component, which MUI v6 then tried to mutate on frozen props.

env.example documents REACT_APP_LITE_API_URL.

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

netlify Bot commented Sep 14, 2026

Copy link
Copy Markdown

Deploy Preview for tezos-homebase ready!

Name Link
🔨 Latest commit dfefba0
🔍 Latest deploy log https://app.netlify.com/projects/tezos-homebase/deploys/6aa7d30723c713000867acfd
😎 Deploy Preview https://deploy-preview-968--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: 26 (🔴 down 1 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.

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