Skip to content

test(mobile): cover the bot templates' looks and forms (#266) - #285

Merged
juancguerrerodev merged 10 commits into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/bot-templates-266
Dec 6, 2026
Merged

juancguerrerodev merged 10 commits into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/bot-templates-266

Conversation

@saurabhbhoir456

Copy link
Copy Markdown
Contributor

What and why

Closes #266.

Creates apps/mobile/src/bot-templates.test.ts (node:test, like the other tests in apps/mobile/src): the BOT_TEMPLATES ids are unique and TEMPLATE_LOOKS has exactly those ids; every shape and color in TEMPLATE_LOOKS and BLANK_LOOK is in SHELL_SHAPES and SHELL_COLORS; no two templates wear the same shape and color pair, and BLANK_LOOK differs from all of them; every template site already reads the way normalizeSite keeps it; and each template's form passes formProblems in both es-419 and en. Tests only. No real problem turned up: every check passes on the current templates, copy and limits, so bot-templates.ts, bot-form-view.ts and the locales are unchanged.

Vision fit

Principle 7, small, typed and tested: a template whose Spanish name ran over the form's limit, or whose look drifted out of core's lists, now fails a test here instead of showing up on a phone.

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: n/a

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal.
  • I wrote the failing test first. It fails without this change and passes with it. These tests pin the existing data and form rules, so each group was checked against a scratch mutation (restored afterwards): giving travel the same look as agenda fails 1 test, writing its site as www.wikivoyage.org fails 1, and a 46-character Spanish template name fails 1.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Run locally: node --test src/bot-templates.test.ts in apps/mobile (5/5) and the existing bot-form-view.test.ts (19/19). The full mobile suite in this Windows checkout shows 16 pre-existing source-scan failures, the same 16 with and without this file (361 pass with it, 356 without), untouched by this change. Mobile typecheck needs the full install, so CI covers it.
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. n/a: tests only, no UI string changed.
  • Tests, fixtures and screenshots use made-up data only. No new data: the test reads the existing templates and copy.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.
Light Deep sea
es-419
en

New dependencies and network calls

None. Tests only; bot-templates.ts, bot-form-view.ts and the locale files are unchanged.

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Tinsel Alpha, an AI coding agent running in OpenCode, drafted the new test file and ran the node:test suites and the three mutation checks above, in a session directed by the author.
  • I read and ran everything in this pull request, and I can explain it.

@juancguerrerodev
juancguerrerodev merged commit 51adc05 into DojoCodingLabs:main Dec 6, 2026
4 checks 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.

App: test the bot templates' looks and their forms in both languages

5 participants