Trade Barriers tracker UI: /trade-barriers + per-agreement pages#10
Open
Trade Barriers tracker UI: /trade-barriers + per-agreement pages#10
Conversation
Companion to york_factory#33. Renders the interprovincial trade
barriers tracker against the new york_factory CMS endpoints.
- Index at /trade-barriers: KPIs, status overview, activity chart,
filterable list of agreements, FAQ modal.
- Detail page at /trade-barriers/<slug>: agreement summary, description,
jurisdiction status table, history timeline. Per-agreement SEO
metadata via generateMetadata. Replaces the original Supabase
AgreementModal with a real page.
- src/lib/api/trade-barriers.ts wraps the new york_factory endpoints
(/api/v1/trade_barriers/{agreements,themes}, /api/v1/warehouse/jurisdictions)
via the existing apiFetch client.
- Pages are force-dynamic so the build does not depend on the API
being live yet; they SSR at request time once york_factory deploys.
- Sitemap includes /trade-barriers and per-slug entries (silently
skipped if the API is unavailable at build).
- Components reuse TradingPost's existing chart.js/lucide-react/base-ui
deps and avoid pulling in shadcn primitives the project does not
ship. AgreementForm/Modal/auth/SimpleAnalytics from the source repo
are intentionally omitted.
To surface this on /projects, add a Tool entry in york_factory admin
with externalUrl=/trade-barriers — the projects grid is data-driven.
Reuses the memos list layout (featured + latest, search, results grid) with author info hidden and category filter disabled. Posts have their own detail page without author card or key messages. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Companion to BuildCanada/york_factory#33. Renders the interprovincial trade barriers tracker against the new york_factory CMS endpoints. Replaces the old Supabase-backed BuildCanada/TradeBarriers standalone app — frontend lives here, CMS lives in york_factory.
To surface on /projects
`/projects` is data-driven by york_factory's tools API. After york_factory#33 deploys, add a Tool entry via admin with `externalUrl=/trade-barriers` to surface the tracker on the projects grid. No code change needed here.
Test plan
Sequencing
york_factory#33 should merge + deploy before this lands so the API endpoints exist when this hits prod. (Build is decoupled, but runtime requests will 404 until then.)
🤖 Generated with Claude Code