Commit 71b7fa5
committed
Schema validation on every generator + a11y pass on custom forms
Schema rollout (26 pages):
- One file lib/schemas/generators.ts exporting Zod schemas for every
generator that uses GeneratorShell with expectJson:true. Schemas are
deliberately lenient (.passthrough(), most fields optional) so the
retry only fires on genuinely broken shapes — not pedantic mismatches
that would burn tokens.
- Wired into the configs of all generate/* + optimize/* pages.
- Discriminated unions for tiktok (hooks vs scripts), twitter (thread
vs tweets), youtube (variants vs scripts vs headlines).
- Every generator now self-corrects via the retry path added in d1d9da5
when the model returns the wrong shape.
A11y label/input pairing on the 5 non-shell pages:
- Settings: htmlFor/id on api-key input (per provider) + model select
- Setup: htmlFor/id on api-key + website-url + brand-name + aria-label
on the show/hide-key toggle button
- Brand/new: aria-label on the Method-1 URL input, file input, and
stop button (was a tooltip-only "Cancel")
- Competitors: htmlFor/id on all 5 form fields (our_product, our_usp,
competitor_name, target_platform, competitor_ads) + sr-only label
on the library-search input + aria-required on the paste textarea
- Launch wizard: htmlFor/id on all 6 form fields + role="group" +
aria-labelledby on the platforms toggle bank + aria-pressed on each
platform button + py-2 mobile / py-1 desktop touch targets
Smoke filter:
- Filter the benign "Failed to fetch RSC payload" prefetch race that
Next 14 emits in Playwright when the test browser closes before a
Link prefetch lands. Framework falls back to full navigation; not a
real bug. Without this filter 29/47 routes false-flag.
Tooling:
- Added @playwright/test as devDep (was an implicit npx download
before; now an explicit dependency for reproducible smoke runs).
Verified: tsc clean, 53/53 unit tests pass, next build clean, 47/47
Playwright smoke pass against the production build on port 3055.1 parent d1d9da5 commit 71b7fa5
35 files changed
Lines changed: 756 additions & 32 deletions
File tree
- app
- brand/new
- generate
- branded-hashtag-challenge
- creative-prompts
- display
- email-subjects
- google-pmax
- google-shopping
- google
- hashtags
- lead-form
- linkedin
- meta
- reel-ideas
- spark-ads
- tiktok
- twitter
- youtube
- launch/wizard
- optimize
- ab-test
- ad-fatigue
- audience
- bid-strategy
- budget-planner
- budget
- ctr
- keywords
- landing-page
- quality-score
- research/competitors
- settings
- setup
- lib/schemas
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
728 | 729 | | |
729 | 730 | | |
730 | 731 | | |
731 | | - | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
846 | 847 | | |
847 | 848 | | |
848 | 849 | | |
| 850 | + | |
849 | 851 | | |
850 | 852 | | |
851 | 853 | | |
852 | 854 | | |
853 | 855 | | |
854 | 856 | | |
855 | | - | |
| 857 | + | |
856 | 858 | | |
857 | 859 | | |
858 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
0 commit comments