Skip to content

test(mobile): cover design and motion tokens (#230) - #234

Merged
juancguerrerodev merged 1 commit into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/design-motion-tokens
Dec 6, 2026
Merged

juancguerrerodev merged 1 commit into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/design-motion-tokens

Conversation

@saurabhbhoir456

@saurabhbhoir456 saurabhbhoir456 commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #230

Adds apps/mobile/src/tokens.test.ts covering Hermit mobile design tokens and motion tokens.

What the tests cover

  • mix(a, b, t): holds at a when t=0 and at b when t=1; rounds at the midpoint (mix("#000000", "#FFFFFF", 0.5) -> #808080); always answers in uppercase #RRGGBB even with lowercase inputs; keeps every channel between the two inputs while t is between 0 and 1.
  • staggerDelay(i): starts at 0, steps by stagger.step, caps at stagger.max * stagger.step.
  • duration: positive whole milliseconds, press under 100, sheet is the longest.
  • easing: four numbers per curve with control-x values between 0 and 1.

Verification

  • node --test --experimental-strip-types src/tokens.test.ts -> 7 passed, 0 failed

Tests only — no source files (theme.ts, motion.ts) changed, per the issue constraints.


Pull request template

What and why

Closes #230.

Adds tests for the mobile design and motion tokens, which had none.

Vision fit

Principle 7, small, typed and tested: the tokens every screen is built from now have tests.

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. Tests were added for the existing tokens and pass; there was no behaviour change for them to fail against first.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Gate note: privacy and guard pass on this checkout today; the rest was run per package as listed under AI agents, not as one root gate on this Windows machine, where unrelated pre-existing failures appear in the site badges, the devices table and mobile source scans.
  • 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.
  • Tests, fixtures and screenshots use made-up data only.

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.

New dependencies and network calls

None. No new dependency and no new network call.

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 change and this description and ran the checks below, in a session directed by the author, who reviewed each step's report before it was pushed.
  • I read and ran everything in this pull request, and I can explain it.

What was run: node --test --experimental-strip-types apps/mobile/src/tokens.test.ts (7/7).

@juancguerrerodev

Copy link
Copy Markdown
Contributor

Thanks for all of these! Before they can merge, two things CONTRIBUTING.md asks for:

  1. Fill in the pull request template on each one, including "I read and ran everything in this pull request, and I can explain it", and name the AI agent that helped, if one did. The description should say what you ran.
  2. Claim an issue in a comment before you start (CONTRIBUTING.md, Make a change, step 2). Three of these duplicated issues other people had already claimed, so I closed them (test(core,runtime): backfill titles for chats the upgrade left untitled (#107) #237, fix(scripts): plans.mjs answers --help and refuses bad flags (#217) #238, test(core): cover zone offsets and formatLocalTime around the 2026 clock changes (#231) #239).

Once the template is filled in, I'll merge the ones that are ready: #234, #243, #244, #245, #247, #248, #249, #250, #251, #253, #254, #255. Two need a fix first, noted on #242 and #252. 🦀

@saurabhbhoir456

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed notes, and sorry for the three duplicates, I had not seen the claims on those issues.

Done on my side:

Understood on claiming issues first; I have noted it for anything else. 🦀

@juancguerrerodev
juancguerrerodev force-pushed the test/design-motion-tokens branch from 16cfee9 to 915a811 Compare December 6, 2026 07:57
@juancguerrerodev
juancguerrerodev merged commit 915a811 into DojoCodingLabs:main Dec 6, 2026
4 checks passed
@juancguerrerodev

Copy link
Copy Markdown
Contributor

All 14 merged, thanks for filling in the templates! For next time: claim one issue at a time in a comment before you start, so the newcomers joining this week find some left. 🦀

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.

Test the app's color mix and motion tokens

3 participants