Skip to content

Tier 0 self-serve fixes: market-link 404 fallback + canonical default aggregator#91

Open
krandder wants to merge 1 commit into
mainfrom
tier0-selfserve-fixes
Open

Tier 0 self-serve fixes: market-link 404 fallback + canonical default aggregator#91
krandder wants to merge 1 commit into
mainfrom
tier0-selfserve-fixes

Conversation

@krandder

@krandder krandder commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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 with getStaticPaths (fallback: false) over the hardcoded list in src/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 through getMarketUrl() (src/utils/urlUtils.js), which emits the query-param form; src/pages/market.js then 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 through getMarketUrl() too. Note: cards2/ currently has no importers (the live proposals list uses cards/), 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.jsx defaulted the aggregator field to 0x767868874be4b5434bd351410b0b9a6e7f4c3aaf, which is not the canonical aggregator. The canonical address 0xC5eB43D53e2FE5FddE5faf400CC4167e5b5d4Fc1 is already the shared DEFAULT_AGGREGATOR export in src/config/subgraphEndpoints.js (and matches registryAdapter.js and marketPage/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

…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.
@netlify

netlify Bot commented Jul 5, 2026

Copy link
Copy Markdown

Deploy Preview for futarchy ready!

Name Link
🔨 Latest commit 72847bd
🔍 Latest deploy log https://app.netlify.com/projects/futarchy/deploys/6a4ad3d3d4e6e900088beb4d
😎 Deploy Preview https://deploy-preview-91--futarchy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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