Query DAO proposals through backend boundary#1432
Draft
dnlbui wants to merge 2 commits into
Draft
Conversation
cc68f7d to
995f985
Compare
7 tasks
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.
What Changed
This PR removes the temporary DAO mock data runtime path and wires the DAO modal list to the current server proposal query path.
dao.mock-data.jsand removed production references to generated mock proposals.createDaoBackendFetcher(queryDaoApi)indao.repo.js; it loadsGET /dao/proposals/meta, then fetchesGET /dao/proposals/:numberin batches of 10.DaoProposalAccountpayloads into the existing DAO modal store shape, including status, type, description/title fallback, committee data, reward fields, andtotalVote->votescompatibility for the current detail modal.dao.repo.js;app.jsonly registerssetDaoBackendFetcher(createDaoBackendFetcher(queryNetwork)).createProposalandcastVotedisabled with clear not-connected behavior; those transaction flows remain for later phase issues.Flow
daoRepo.refresh({ force: true })calls the configured backend fetcher./dao/proposals/metaand loads numbered proposals from/dao/proposals/:number.dao.repo.jsnormalizes fetched proposals into Active/Archived lists and status counts forDaoModal.Why
Issue #1415 is the backend/query integration step for the Phase 1 DAO modal list. The server currently exposes DAO proposal metadata plus individual numbered proposal accounts, not a single list endpoint, so this follows the same count-then-fetch pattern used by the server CLI while keeping the UI renderer decoupled from endpoint details.
Create, vote, committee review, rewards, and ready actions are still placeholders for their later phase issues.
Validation
node --check app.jsnode --check dao.repo.jsgit diff --checkgit diff --check issue-1414-dao-modal-list-ui...HEADnode --input-type=modulesmoke check: no fetcher returns empty Active/Archived listsnode --input-type=modulesmoke check: injected backend fetcher queries meta/proposals, skips a missing proposal, mapstotalVoteintovotesnode --input-type=modulesmoke check: failed refresh preserves the previously loaded storeCloses #1415
Parent: #1413
Depends on #1429