Skip to content

feat(api,landing): deprecation banner, schema-path sweep, hero CTAs, feature-card links (#1337 #1342 #1343 #1344) - #1456

Open
spotkorner-dot wants to merge 5 commits into
solutions-plug:mainfrom
spotkorner-dot:feat/1337-1342-1343-1344
Open

feat(api,landing): deprecation banner, schema-path sweep, hero CTAs, feature-card links (#1337 #1342 #1343 #1344)#1456
spotkorner-dot wants to merge 5 commits into
solutions-plug:mainfrom
spotkorner-dot:feat/1337-1342-1343-1344

Conversation

@spotkorner-dot

Copy link
Copy Markdown

Deprecation banner, schema-path sweep, hero CTAs, feature-card links

Four frontend/ issues (API client + landing page).

What changed and why

#1337 - surface API deprecation headers

New end-to-end path for the Deprecation / Sunset / Link response headers
(API_SPEC.md's 12-month deprecation policy):

  • lib/api/deprecation.ts - a small signal bus. reportResponseHeaders(headers) acts only
    when Deprecation is present and not false (so one stale non-deprecated response can
    neither fabricate nor clear the banner); it parses Sunset and the migration URL from
    Link (rel="deprecation" / "sunset" / "successor-version", falling back to a bare
    <url>).
  • Both request helpers call it after every response.
  • components/DeprecationBanner.tsx - a dismissible, non-blocking role="status" banner
    with the formatted sunset date and migration link. Dismissal is stored in localStorage
    keyed by sunset date: it stays hidden across visits, but a new/changed sunset date
    brings it back.
  • Tests: no-op without the header / with Deprecation: false; opens with parsed
    sunset + link; a later plain response doesn't clear it; dismissal persists per date; a new
    date re-shows.

#1342 - schema-path contract sweep

The client-schema-path-contract.test.ts / client-schema-type-contract.test.ts pair
already exists and passes (the type test fails tsc on drift; the path test checks 10
endpoints). Added a whole-source sweep: every "/api/..." / "/health" string literal in
public-client.ts + admin-client.ts must be a key in schema.d.ts's paths or in an
explicit KNOWN_UNLISTED set (placeBet #78, newsletter, email admin endpoints). A new
client method with a mistyped or un-schema'd path now fails this test at PR time rather than
404ing in production.

#1343 - hero CTAs

The hero had only the newsletter form. Added a primary CTA (Explore markets -> /markets,
into the live product) and a secondary CTA (See how it works -> #how-it-works) as plain
<a> links, plus i18n keys and .hero-cta styles. Motion: the repo's global
prefers-reduced-motion rule (accessibility.css) already disables the hero's entrance
animations; the new CTAs carry no auto-playing motion.

  • Tests: primary CTA href="/markets", secondary href="#how-it-works" and the target
    section exists.

#1344 - feature cards as links + real copy

  • FeatureCard takes an optional href; when set, the whole card is a single
    keyboard-reachable <a> (with an .sr-only "learn more" suffix and a :focus-visible
    outline). Without href it stays a plain <article>.
  • The three feature entries now describe real platform capabilities - multi-outcome markets,
    hybrid oracle + community resolution with a dispute window, and Stellar settlement with
    the referral program - instead of generic "Fast / Secure / Decentralized" copy. Each links
    to /markets.
  • .features-grid gets an explicit grid-template-columns: 1fr below the 520px breakpoint
    (on top of the existing auto-fit reflow) so the single-column layout is unambiguous.
  • Tests: card is/ isn't a link per href; keyboard-reachable; the LandingPage data-driven
    and i18n tests updated for the new copy.

How to test

cd frontend
PUPPETEER_SKIP_DOWNLOAD=true npm ci --legacy-peer-deps --ignore-scripts
./node_modules/.bin/jest src/lib/api src/components/__tests__/FeatureCard.test.tsx \
  src/components/__tests__/DeprecationBanner.test.tsx src/components/__tests__/LandingPage.hero.test.tsx
  • 150 tests pass across the touched suites.
  • tsc --noEmit: no errors in the touched files over the repo's pre-existing count.
  • Pre-existing on main (unchanged by this PR): Statistics.test.tsx,
    LandingPage.keyboard.test.tsx, and LandingPage.accessibility.test.tsx are red
    (identical 12 failures with or without this branch - a stale getStatistics mock shape
    and an ambiguous getByRole('alert') after an earlier Newsletter/Statistics refactor;
    the alert scoping is fixed in the FE-037 PR).

Breaking changes

None. New exports and props only.

Related issues

Closes #1337
Closes #1342
Closes #1343
Closes #1344

PR Checklist

  • Branch is up to date with main
  • Commit messages follow Conventional Commits
  • Tests added or updated for the change
  • Documentation updated if behaviour changed (n/a)
  • No secrets or credentials committed

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@spotkorner-dot Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant