feat(governance): finalize membership lifecycle and runtime QA (#80)#99
Open
edehvictor wants to merge 1 commit into
Conversation
20 tasks
edehvictor
changed the base branch from
main
to
copilot/plan-wire-governancewidget-to-gooddaohouses
July 16, 2026 19:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #80
Related: #75, #76, #77, GoodProtocol #299
Summary
Finalizes the contract-backed GovernanceWidget membership lifecycle and runtime boundaries introduced in #77. Active members now receive a truthful, receipt-aware
unstake()flow; no-member, pending Alignment, and revoked states follow the GoodDaoHouses contract; voting/funding edge cases are enforced before submission; and the adapter is split into maintainable widget-local hooks.The page hierarchy, header, onboarding stepper, membership cards, and transaction surfaces were aligned with the supplied governance UI references while keeping the existing GoodWidget design system and avoiding the out-of-scope detailed voting/dashboard redesign.
Changes
unstake()handling, successful-receipt refresh, and contextual wallet-confirmation, submitted, rejected, reverted, failed, and confirmed states.None/unstaked members, GoodID verification for Citizenship, HoA registry gating for Alignment, the pending Alignment state, and a non-actionable revoked state.useGovernanceAdapterto composition over dedicated membership, voting, and funding hooks without moving contract calls into UI components.Acceptance criteria
Membership lifecycle
unstake()call and wait for a successful receipt.member.updatedAt + termDuration; the locked state explains when it becomes available.None/unstaked members can join Citizenship; Alignment remains gated bygetHoaEligibility(account).isEligible.unrevokeworkaround was added.Runtime correctness and maintainability
useGovernanceAdapterremains a small composition boundary.packages/governance-widget; presentational cards and onboarding components stay contract-agnostic.Tests, evidence, and comments
tests/widgets/governance-widget/test-results/were regenerated for the latest UI states.Verification
eslint packages/governance-widget/srcplus changed governance specs)tsup)git diff --check/ staged diff checkpnpm lintcontinues to report the unrelated, pre-existing root failures required to be disclosed by #80:packages/core/src/detect.ts: unusedHostEnvironment.packages/embed/src/createMiniAppElement.tsx: unused_parameter.The final filtered Turbo invocation was blocked by the local non-interactive pnpm wrapper attempting to purge
node_modules(ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY). The already-installed toolchain was therefore used directly; the governance package, including generated declarations, built successfully.Evidence
Scope confirmation
packages/ui,packages/core, orpackages/embedAPI changes.