Skip to content

feat(growth): star-on-GitHub CTA on the exam results screen#184

Draft
nastaso wants to merge 1 commit into
mainfrom
feat/results-star-cta
Draft

feat(growth): star-on-GitHub CTA on the exam results screen#184
nastaso wants to merge 1 commit into
mainfrom
feat/results-star-cta

Conversation

@nastaso

@nastaso nastaso commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Problem

Growth lever A7. The site-to-repo funnel is nearly invisible: ~32 github_click/30d against ~49k question events, and the repo sits around 41 stars, short of its 50-star gate. There is no star ask at the highest-intent moment (a just-finished exam).

What changed

Added a quiet, recessed star-on-GitHub CTA to the mock-exam results screen, placed BELOW the primary result actions (Review / Back / Retake) and below the existing Ko-fi support ask, so it never competes with them.

  • Self-contained block in the screen === 'results' branch of src/pages/_MockExam.tsx, following the existing quiet-panel pattern (rounded-2xl border border-border-hairline, muted copy, design tokens only). It is the most recessed element on the screen: no fill, hairline border only, so it sits a rung below the (filled) Ko-fi card.
  • Real <a> to the repo via the existing GITHUB_REPO_URL constant (= https://github.com/nastaso/cloudcertprep), honest link text, a lucide-react Star icon (already a dependency), and a min-h-[44px] touch target.
  • Analytics: reuses the existing github_click event with a new { location: 'results' } param (joins the existing header / mobile_drawer locations). No new KNOWN_EVENTS entry.
  • Shown on both pass and fail results (it lives in the shared bottom action stack, so no branching was needed).
  • No changes to scoring, timers, or the dup-submit guard.

Copy (no dashes): "CloudCertPrep is free and open source. If it helped, star the repo on GitHub so others can find it."

Files touched

  • src/pages/_MockExam.tsx - import Star + GITHUB_REPO_URL; new CTA block in the results branch.
  • e2e/mock-exam-hardening.spec.ts - one new assertion.

Overlap with #178

Open PR #178 also edits _MockExam.tsx (a cross-cert nudge in the pass branch). This insertion is small and self-contained (an appended sibling in the shared bottom action stack, plus two import additions), so whichever merges second should rebase trivially. No overlap with the pass-branch region #178 touches.

Verification

All run against a fresh npm ci in an isolated worktree branched from origin/main.

  • npm run lint - clean (no output).
  • npm run test - Test Files 25 passed (25), Tests 296 passed (296).
  • npm run build - full prebuild + postbuild guard chain green: citation guard PASSED (9/9), internal-graph 0 violations, person-graph byte-identical, SEO <head> snapshot byte-identical across all 18 indexable pages, CSP hash + cf:headers regenerated.
  • Pre-push hook (npm run check: astro check + lint + unit tests) ran on push - green.
  • e2e (new assertion, isolated port): PW_PORT=4411 PW_REUSE_SERVER=0 npx playwright test mock-exam-hardening -g "star-on-GitHub" -> 1 passed. It drives the guest start -> submit path to the results screen and asserts the CTA link is visible with href="https://github.com/nastaso/cloudcertprep".

Build-drift note

npm run build also regenerated public/sitemap.xml (lastmod churn) and functions/_csp.generated.js (a single style-src hash shifted from the stats-snapshot/OG prebuild, script-src byte-identical). The island is mounted client:only="react" and the results JSX never appears in prerendered HTML, so my change adds no inline script/style to built output. Both drift files were reverted (not committed), per the repo rules.

Screenshots (results screen, reduced motion)

Recessed hairline CTA, light and dark:

Light: quiet panel, muted copy, star the repo on GitHub bolded.
Dark: same, on the dark surface.

Context (dark): the CTA renders at the very bottom of the results stack, below Review/Back/Retake and below the filled Ko-fi card, confirming it does not compete with the primary actions.

(Element + context shots captured via a throwaway spec using the guest start -> submit path with the matchMedia reduced-motion patch; the spec was not committed.)


Model: Claude Opus 4.8 (claude-opus-4-8[1m])

The site-to-repo funnel is nearly invisible (32 github_click/30d vs ~49k
question events) and the repo is short of its 50-star gate. Add a quiet,
recessed star-on-GitHub ask to the mock-exam results screen (the highest
-intent moment), below the primary result actions and the Ko-fi ask so it
never competes with them.

- New self-contained block in the results branch of src/pages/_MockExam.tsx,
  following the existing quiet-panel pattern (rounded-2xl, hairline border,
  muted copy, design tokens only, no new colors or web fonts).
- Real anchor to the repo (GITHUB_REPO_URL) with honest link text, a
  lucide-react Star icon, and a min 44px touch target.
- Reuses the existing github_click event with a new location: 'results'
  param; no new KNOWN_EVENTS entry.
- Shown on both pass and fail results.
- One e2e assertion in mock-exam-hardening.spec.ts confirms the CTA renders
  on the results screen with the correct href.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying cloudcertprep with  Cloudflare Pages  Cloudflare Pages

Latest commit: 32d7858
Status: ✅  Deploy successful!
Preview URL: https://fca0d3dd.cloudcertprep.pages.dev
Branch Preview URL: https://feat-results-star-cta.cloudcertprep.pages.dev

View logs

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant