You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sticky note on the forehead carries the screen: the table reads the person on it, the guesser sees a "?", Jev's warmth runs along its edge. On one shared phone it stays covered until held.
Your path as a spine: every question with a check or a cross, Jev's warmth after each step, a gold star at the end.
Voice with a live wave: hold to talk or hands-free, typing always one tap away. Voice can be switched off in the settings (then nothing audible leaves the phone).
Starter questions before the first one; Ja / Nein / Erraten in thumb reach.
Writing a person means writing on the note; Luna's suggestions are one big tap.
Back arrow: keep playing, home, or (host) cancel the game.
Installable as an app; after a first game phones get the install card.
AI
Swiss German: speech-to-text is now gpt-transcribe with language=de, the best of 18 setups in a new Swiss German benchmark (57/63 end to end vs 48 before). Luna knows dialect forms and missing question marks.
Luna goes straight to OpenAI first, so a table of jokers at once doesn't hit OpenRouter's new-account limit.
Under the hood
Git hooks (prek) on commit, message and push, and the same hooks in CI; Claude Code guard and check hooks.
Code review fixes: the CI secret scan now actually scans, polls can no longer show a stale question, sheets are accessible native dialogs.
…STT gpt-transcribe for Swiss German
- prek: built-ins, secret scan, no env files, Swiss spelling, actionlint, eslint with zero warnings (shadcn), tsc,
unit tests; commit-msg enforces Conventional Commits; pre-push refuses main. CI runs the same config.
- Claude hooks: guard shell commands and edits, eslint --fix and checks after each edit, manual reminder after a
commit, tsc before stopping
- bench-swiss: dialect TTS voices through STT, Luna and Jev; gpt-transcribe with language=de wins (57/63 vs 48)
- Luna's clean-up knows Swiss German forms and that transcripts drop the question mark
- skills: frontend-design, web-design-guidelines, webapp-testing, web-perf in the repo
- shared Sheet component; safe-area utilities instead of arbitrary values
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This PR adds Swiss German STT support and benchmarking, reusable native sheets, and prek/CI/Claude guardrails.
Changes:
Updates STT models and Swiss German prompting.
Adds shared sheet UI and safe-area utilities.
Adds hooks, CI validation, secret helpers, and benchmarks.
Adds frontend, performance, and testing skills.
File
Reviewed change
Final review note
src/lib/i18n.ts
Updates spelling guidance.
—
src/lib/ai.ts
Configures STT/chat models and Swiss German prompting.
Nit (2 votes): Update AGENTS.md to match the new production STT models. Nit (1 vote): Update docs/MANUAL.md for the player-facing transcription changes.
src/components/Sheet.tsx
Adds reusable native bottom sheet.
Moderate (3 votes): Associate dialogs with localized labels or headings for assistive technology.
src/components/Settings.tsx
Migrates settings to the shared sheet.
Moderate (2 votes): Update docs/MANUAL.md for the player-facing speech-to-text changes.
src/components/Back.tsx
Migrates leave confirmation to the shared sheet.
—
src/app/layout.tsx
Applies safe-area utilities.
—
src/app/globals.css
Defines safe-area and sheet utilities.
—
skills-lock.json
Locks added skills.
—
scripts/gh-secret.sh
Adds GitHub secret helper.
—
scripts/env.sh
Adds local/Vercel secret helper.
Moderate (1 vote): Escape values containing single quotes so generated dotenv files remain valid.
scripts/commit-msg.sh
Adds commit-message validation.
—
scripts/bench-swiss.mts
Adds Swiss German benchmarking.
Moderate (2 votes): Add the documented just bench-swiss recipe or correct the command. Moderate (1 vote): Throw on HTTP errors so transient failures are retried instead of scored as incorrect.
.pre-commit-config.yaml
Expands prek hooks.
Critical (4 votes): Ensure CI scans checked-out contents rather than only staged diffs. Moderate (2 votes): Install or manage actionlint during setup.
.github/workflows/ci.yml
Runs prek and actionlint in CI.
Critical (3 votes): Pin actionlint to a reviewed version rather than downloading mutable latest content.
-`scripts/with_server.py` - Manages server lifecycle (supports multiple servers)
**Always run scripts with `--help` first** to see usage. DO NOT read the source until you try running the script first and find that a customized solution is abslutely necessary. These scripts can be very large and thus pollute your context window. They exist to be called directly as black-box scripts rather than ingested into your context window.
dominikpeter
changed the title
Guard rails: prek + Claude hooks, Swiss German STT
UI overhaul (forehead note, voice wave, path, PWA), guard rails, Swiss German STT
Sep 28, 2026
…thumb dock, PWA with install hint
- Home: the title is a taped sticky note; writing a person means writing on the note
- Play: the note on top (person for the table, "?" for the guesser, warmth along its edge), the path as a spine of
check/cross nodes with warmth per step, starter questions instead of an empty box, a dock with the live voice wave,
a bigger mic, typing one tap away, Ja/Nein/Erraten in thumb reach
- Luna's button is a full-width action; lobby lists players in turn order
- Installable (manifest, icons); after a first game, phones get the install card (Android prompt, iPhone steps)
- Luna straight at OpenAI first (OpenRouter rate-limits new accounts); give-up shows no line-up rather than one with
only the answer in it
- Web Interface Guidelines: visible focus ring, no click handlers on divs, joker on the native dialog sheet,
aria-live for what was heard and errors, no autofocus that throws the keyboard up, touch-action, image sizes
- Guard hook: a force flag must belong to the push itself
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pinned actionlint, named sheets); ordered polls
- CI's secret scan read `git diff --cached`, which is empty on a checkout, so it always passed: it greps the tracked
tree there now (Copilot)
- guard-bash: env files may only be sourced, read for names, or piped into vercel/gh; `sed -n`, awk, grep, python on
them are refused (Copilot). A force flag must belong to the push.
- actionlint pinned to v1.7.12 in CI; a laptop without it gets a note instead of a blocked commit
- dialogs are named (aria-label); the joker sheet opens once and no longer re-registers on every poll; the celebration
keeps its text readable to screen readers
- polls: an older response that arrives late no longer overwrites a newer view (the table briefly saw a stale question)
- the answer buttons no longer bounce in: they must not move under a thumb (e2e caught taps landing beside them)
- bench-swiss / hooks recipes, AGENTS.md models and guard rails, the manual reminder covers ai.ts
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Found 5 issues at 79b1e32 (score 80 or higher); all fixed in e0efb51:
CI secret scan could never fail: it read git diff --cached, which is empty on a fresh checkout, so prek run --all-files passed any committed key (bug; also raised by Copilot)
The env-file guard was a blocklist of readers; sed -n, awk, grep or python on the env file printed keys (AGENTS.md says "Agents never type, paste, or commit secrets")
# keys: an env file may only be sourced, read for its names, or have one value piped straight into the tool that stores
# it (allowlist: a list of forbidden readers always misses one, sed -n or python); a key variable is never echoed
envfile=$(printf '%s'"$cmd"| grep -oE "[^[:space:]\"'=]*\.env[A-Za-z.]*"| grep -vE "^\.env(ignore|\.example)?$|vercelignore"| head -1)
reads_env() {
[ -n"$envfile" ] ||return 1
local rest
rest=$(printf '%s'"$cmd"|
sed -E "s#(source|\.) [^;&|]*\.env[A-Za-z.]*##g; s#sed 's/=\.\*//' [^;&|]*\.env[A-Za-z.]*##g; s#grep -q[^;&|]* [^;&|]*\.env[A-Za-z.]*##g"|
sed -E "s#grep '\^[A-Z_]+=' [^;&|]*\.env[A-Za-z.]*( \| head -1)? \| cut -d= -f2-[^;&|]*\| tr [^|]*\| (vercel env add|gh secret set)##g")
printf'%s'"$rest"| grep -qE "\.env[A-Za-z.]*"
}
if reads_env ||printf'%s'"$cmd"| grep -qE "(echo|printf)[^|;&]*\\\$\{?[A-Z_]*(KEY|TOKEN|SECRET)";then
decide deny "That would print a secret. Read names only (sed 's/=.*//' .env.local) or pipe the value straight into the tool that stores it."
fi
Polls and post-move refreshes overlapped: a slow older response could overwrite a newer view, so a phone showed a stale question and its tap missed (bug; reproduced in 2 of 4 WebKit e2e runs)
The joker sheet re-ran its dialog effect on every poll (a new onClose each render) and called showModal() on an already open dialog, which throws in older Safari (bug)
Also addressed from Copilot's review: pinned actionlint, named dialogs, AGENTS.md models, the bench-swiss recipe, the manual reminder covers ai.ts. Not changed: installed third-party skills (webapp-testing), which are updated only through npx skills.
This listener is only installed when InstallHint is imported by the home page, but players commonly arrive directly at /r/[code] by scanning the lobby QR code. On Android, beforeinstallprompt can fire on that room page before this module is loaded; the event is then lost, and when the player later returns home deferred is null, so no install prompt is ever offered. Register the event in a module mounted from the root layout (or otherwise on every route) and share the deferred prompt with the home card.
Localize the crown host accessibility label
src/components/Lobby.tsx:43
The crown's new aria-label="host" bypasses the three-language dictionary, so this status is announced in English for German and French users. Add a localized host label (or make the icon explicitly decorative if the surrounding player text is sufficient) instead of hard-coding it.
… job timeouts
CI hung for 10+ minutes in prek run --all-files: the newer prek the action installed also runs the commit-msg
hook there, with no message file, and the script read stdin.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
<
8
div clas
10BC8
s="flex-auto d-flex flex-column flex-md-row">
The helper starts a shell with shell=True but only tracks and terminates that shell process. Its npm run dev/server child can survive cleanup and keep the port occupied, making the next test run fail with an already-used port. Start a process group and terminate the group, or avoid the extra shell process.
Implement complete modal focus management
src/components/Play.tsx:308
This custom role="dialog" aria-modal="true" never moves focus into the celebration, traps focus, handles Escape, or restores focus when it closes. A keyboard user can remain focused on a control behind the modal while assistive technology is told that background content is unavailable; use the native dialog/sheet pattern or implement the full focus lifecycle.
Localize the accessible host label
src/components/Lobby.tsx:43
This newly added accessible label is a literal English UI string, so German and French screen readers announce host instead of the selected locale. UI strings, including accessible names, are kept in all three dictionaries (AGENTS.md:59-60); add a localized key and use t(...) here.
prek gives hooks a pseudo-terminal when it colours output, so `git grep` in the CI branch of the secret scan
opened less and waited for a key until the job timed out. --no-pager on both git calls. (The previous commit blamed
the commit-msg hook; that guard stays, it is harmless.)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… keyboard; install card after a finished game
- switching to the keyboard left hands-free on, so speech while typing could still be sent (Copilot)
- the covered note on a shared phone is a button again: Space/Enter holds it open
- localized labels for the keyboard toggle and the voice marker
- an obsolete poll's failure no longer shows "offline" over a healthy room
- the install card waits for a game played to its end, not for joining a room
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Implement focus management and Escape handling for the modal
src/components/Play.tsx:309
This is now announced as a modal, but it is only a div: focus is not moved into it or trapped there, and Escape has no close behavior. Keyboard and screen-reader users can remain on the underlying answer control while aria-modal="true" hides that background from assistive technology; use a native dialog or add modal focus management.
Localize the host accessible name
src/components/Lobby.tsx:43
This newly exposed accessible name is always “host”, even when the UI is German or French. Add a host key to all three dictionaries and use t("host") here so screen-reader output follows the selected language.
This guard only compares against the last response that was shown, so it still accepts an older response while a newer request is in flight. For example, if the action-triggered refresh (n+1) is delayed but poll n returns first, this renders t
EB3F
he stale question; if n+1 then fails, that stale state remains. Compare with the newest sent sequence (and apply the same latest-only rule in the catch) so an obsolete poll cannot update the view or error.
Remove inactive card faces from accessibility
src/components/End.tsx:38
When open becomes true, this new face-down <button> remains focusable even though CSS rotates it behind the revealed face. backface-visibility only affects painting, so keyboard and screen-reader users can still reach a duplicate “Still hidden” action on an open card. Render only the active face as a button, or remove the inactive face from the tab and accessibility trees.
Trap focus within the celebration dialog
src/components/Play.tsx:323
This custom role="dialog" does not move focus into the celebration or make the underlying game inert. When it appears, keyboard users can remain on or tab into controls behind the overlay instead of reaching its close button. Use a native modal dialog or add focus management and a real focus trap/inert background.
Localize the host label
src/components/Lobby.tsx:43
host is a new accessible UI string outside src/lib/i18n.ts, so German and French users will hear an untranslated English label. Add a host key to all three dictionaries and use t("host") here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
werbinich.ai 0.2.0
Play
AI
gpt-transcribewithlanguage=de, the best of 18 setups in a new Swiss German benchmark (57/63 end to end vs 48 before). Luna knows dialect forms and missing question marks.Under the hood