Skip to content

test: pin first-visit task cards and Sign in click-through - #464

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-1435
Draft

test: pin first-visit task cards and Sign in click-through#464
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-1435

Conversation

@cursor

@cursor cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

#463 made the homepage “Start with a task” cards and the canvas / shared-app Sign in buttons the first-click path. Those handlers only ran in smoke-first-run.mjs, which is a separate Chromium workflow and is not in the regular check-*.mjs suite. A gallery slug rename (common on EXAMPLES sync) makes a task card a silent no-op (findIndex === -1). A dropped #hintsignin / #recwelcome-signin click-through leaves the new Sign in CTA dead. A signed-in renderAuth that forgets to hide those pitches sends people around OAuth again.

#463 already pinned the money path (mdl DEMO_CTX vs paid drift, starter/gallery catalog fixtures). This PR covers the remaining first-click wiring.

Test files added/updated

  • scripts/check-onboarding.mjs (new)
  • .githooks/pre-commit (run the check when index/play/the issue form change)

Pins, offline, zero API spend (real handlers in node:vm):

  • Every #exampletasks data-example-slug resolves to an EXAMPLES entry; at least three cards stay present.
  • The shipped click handler calls loadExample(i) for a match and ignores an unknown slug.
  • Canvas #hintsignin and play #recwelcome-signin click through to #signin.
  • Editor renderAuth hides #hintauth / #hintsample once a key is stored; play builder renderAuth hides #recwelcome-signin.
  • In-app Examples / Share CTAs keep pointing at share-workflow.yml (required share_link field), not built-with-nanoodle.

Why these tests materially reduce regression risk

First-click onboarding is how a new NanoGPT user reaches a runnable workflow. The Playwright smoke is optional and environment-dependent; this check runs in CI and pre-commit with no browser. Losing slug lockstep, or the Sign in click-through, is a dead homepage with every other paid-path guard still green.

node scripts/check-onboarding.mjs is green. No production behavior change.

Open in Web View Automation 

#463 made the homepage task cards and canvas/welcome Sign in the
first-click path, but those handlers only ran in the optional
Playwright smoke. An EXAMPLES slug rename would silently no-op a
task card, and a dropped click-through would leave Sign in dead.

Co-authored-by: mikkel <mikkel@255bits.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
nanoodle 845f9c4 Commit Preview URL

Branch Preview URL
Sep 05 2026, 10:18 AM

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