Tier 0 self-serve fixes: market-link 404 fallback + canonical default aggregator#91
Open
krandder wants to merge 1 commit into
Open
Tier 0 self-serve fixes: market-link 404 fallback + canonical default aggregator#91krandder wants to merge 1 commit into
krandder wants to merge 1 commit into
Conversation
…debug modal - cards2/ProposalsCard.jsx linked markets as /markets/<address>, which 404s for any market not in the hardcoded static export list. Route through getMarketUrl() like the live card components already do. - CreateOrganizationModal.jsx defaulted to a non-canonical aggregator address; import the shared DEFAULT_AGGREGATOR constant from config/subgraphEndpoints instead of a local literal.
✅ Deploy Preview for futarchy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Two small self-serve fixes.
Fix 1 — market links that 404 for new markets
The site is a static export (
output: 'export') and/markets/[address]pages are generated withgetStaticPaths(fallback: false) over the hardcoded list insrc/config/markets.js. Any market not in that list 404s at/markets/<address>, while the query-param form/market?proposalId=<address>works for any market (live registry + subgraph fetch).The live card components (
proposalsList/cards/ProposalsCard.jsx,ProposalsCards.jsx,EventsCard.jsx) already route links throughgetMarketUrl()(src/utils/urlUtils.js), which emits the query-param form;src/pages/market.jsthen normalizes configured markets back to their pretty static/markets/<address>URLs — so the 29 existing markets keep their static URLs.The one remaining offender was
src/components/futarchyFi/proposalsList/cards2/ProposalsCard.jsx, which still hardcoded/markets/${proposalID}in three places (lines 153/375/476). This PR routes those throughgetMarketUrl()too. Note:cards2/currently has no importers (the live proposals list usescards/), so this is a consistency/safety fix — if the variant is ever wired up (or copy-pasted from) it will no longer generate 404 links for unlisted markets.Fix 2 — wrong default aggregator in debug modal
src/components/debug/CreateOrganizationModal.jsxdefaulted the aggregator field to0x767868874be4b5434bd351410b0b9a6e7f4c3aaf, which is not the canonical aggregator. The canonical address0xC5eB43D53e2FE5FddE5faf400CC4167e5b5d4Fc1is already the sharedDEFAULT_AGGREGATORexport insrc/config/subgraphEndpoints.js(and matchesregistryAdapter.jsandmarketPage/constants/contracts.js). The modal now imports that shared constant instead of carrying its own stale literal. No other call sites touched.Verification
npm run build(static export) passes; all 29 static market paths still generated.npm run auto-qa:test:unit: 691 pass / 0 fail — no test baselines needed updating (no test pinned the old aggregator literal or the cards2 link format).🤖 Generated with Claude Code