Skip to content

prelaunch: error boundaries, OG/canonical/metadata coverage, env cleanup#9

Merged
xrendan merged 4 commits intomainfrom
claude/prelaunch-staging-review-mLW46
Apr 28, 2026
Merged

prelaunch: error boundaries, OG/canonical/metadata coverage, env cleanup#9
xrendan merged 4 commits intomainfrom
claude/prelaunch-staging-review-mLW46

Conversation

@xrendan
Copy link
Copy Markdown
Member

@xrendan xrendan commented Apr 28, 2026

  • Add app-level error.tsx (modeled on not-found) plus memos/tracker section
    boundaries; all three report exceptions to PostHog with pathname + boundary
    context. Enable posthog-js capture_exceptions for unhandled client errors.
  • Add metadata layouts for /tracker/commitments and /tracker/commitments/[id]
    (client components) and generateMetadata for /tracker/ministries/[slug] so
    every tracker route has a real title + description for tabs and sharing.
  • Add /builders opengraph-image.tsx so the index has a social card.
  • Add explicit alternates.canonical to root layout, memos/[slug],
    toronto/memos/[slug], builders, builders/[slug], projects, about,
    tracker (+ commitments/faq/ministry), and toronto/memos.
  • Switch organization JSON-LD SITE_URL to read NEXT_PUBLIC_SITE_URL.
  • Tracker Sidebar: replace hardcoded https://www.buildcanada.com link with
    internal Link to "/" so it works on any environment.
  • Hide the homepage "Full Archive" button (links to /content, which is being
    phased out) by commenting it out.
  • README: add Environment variables and Deployment notes sections covering
    required vars (NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_TRACKER_API_BASE,
    YORK_FACTORY_API_URL, LUMA_API_KEY) and recommended analytics vars.

claude added 4 commits April 28, 2026 00:08
- Add app-level error.tsx (modeled on not-found) plus memos/tracker section
  boundaries; all three report exceptions to PostHog with pathname + boundary
  context. Enable posthog-js capture_exceptions for unhandled client errors.
- Add metadata layouts for /tracker/commitments and /tracker/commitments/[id]
  (client components) and generateMetadata for /tracker/ministries/[slug] so
  every tracker route has a real title + description for tabs and sharing.
- Add /builders opengraph-image.tsx so the index has a social card.
- Add explicit alternates.canonical to root layout, memos/[slug],
  toronto/memos/[slug], builders, builders/[slug], projects, about,
  tracker (+ commitments/faq/ministry), and toronto/memos.
- Switch organization JSON-LD SITE_URL to read NEXT_PUBLIC_SITE_URL.
- Tracker Sidebar: replace hardcoded https://www.buildcanada.com link with
  internal Link to "/" so it works on any environment.
- Hide the homepage "Full Archive" button (links to /content, which is being
  phased out) by commenting it out.
- README: add Environment variables and Deployment notes sections covering
  required vars (NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_TRACKER_API_BASE,
  YORK_FACTORY_API_URL, LUMA_API_KEY) and recommended analytics vars.
CI lint job was failing due to two pre-existing issues on main:

- src/app/tracker/commitments/page.tsx: react-hooks/preserve-manual-memoization
  could not preserve the useCallback wrapping the debounced search handler.
  React Compiler auto-memoizes; the consumer wraps the handler in an inline
  arrow anyway, so manual memoization had no benefit. Convert to a plain
  function declaration and drop the unused useCallback import.

- src/components/tracker/ui/select.tsx: lint:tokens bans Tailwind arbitrary
  values that interpolate CSS variables (e.g. h-[var(--radix-...)]). Move
  the Radix popper sizing variables into the style prop, keeping behavior
  identical.
The /builders OG image was rendering with the title clipped vertically and
the description truncated mid-word — Satori (next/og) doesn't honour the
-webkit-box / WebkitLineClamp combo cleanly, and the chrome (header +
dividers + footer) consumed enough height that any wrapping title
overflowed its flex:1 container.

- Switch palette from dark mode (#1a1a1a / #fff) to Build Canada brand:
  cream linen-100 background (#f6ece3), charcoal-1000 foreground (#272727),
  auburn-800 accent (#932f2f, unchanged), with a fine charcoal-tinted
  border on the footer.
- Drop -webkit-box/WebkitLineClamp; rely on natural text wrapping.
- Drop the maxWidth caps on title/description (was 1900/1600 in a 1200-wide
  canvas — never doing anything anyway).
- Tighten chrome: padding 100/120 -> 72/96, header marginBottom 60 -> 36,
  divider 4 -> 3, divider marginBottom 60 -> 36, footer paddingTop 60 -> 32.
- Reduce title 80 -> 60, description 36 -> 28, badge 32 -> 24, fineprint
  28 -> 22, with -0.02em title letter-spacing for the new size.
- Add a default footer left-side string ("Canada's Voice for Builders")
  when no badge is provided, so the layout never has an empty left slot.

Verified all five top-level OG endpoints render correctly via
`next dev`: /builders, /memos, /memos/[slug], /projects, /content.
- Root layout description and openGraph description: trim the leading
  "Canada's Voice for Builders." sentence, keep "Bold thinking from
  builders, reformers, and leaders pushing Canada to new frontiers."
- Homepage OG image: title becomes "Build Canada", drop the "Homepage"
  label badge.
- OG template: drop the default footer fallback that used the tagline;
  render an empty span when no badge is provided.

Wireframe HTML at the repo root still contains the phrase but is a static
design reference, not served by the app.
@xrendan xrendan merged commit f8c3b2c into main Apr 28, 2026
1 check passed
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.

2 participants