fix: codebase scan — duplicate import, prompt injection, grammar safety, BYOK onboarding #4742
ccantynzcommented Jun 13, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| voxlen | Preview, Comment | Jun 13, 2026 5:10am |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/voxlen/pull/59
Summary
Codebase scan — 7 bug fixes across desktop app, Rust backend, iOS keyboard, Vercel API, and Web SDK.
src/components/onboarding/):canProceed()step 2 only checkedvoxlenApiKey, blocking BYOK users from completing onboarding. Now acceptssttApiKeyas well.src/components/dictation/): Removed duplicateuseShallowimport causing TS2300 compile error.translate.ts(Vercel),grammar.ts(Vercel),grammar.rs(Rust),translate.rs(Rust),grammar.ts(Web SDK), andKeyboardViewController.swift(iOS). Fixed with XML delimiter tags (<text>...</text>) in all six locations.try/catcharound bothJSON.parsecalls (Claude + OpenAI paths) so malformed model responses return a graceful fallback instead of throwing.ios/VoxKeyboard/):correctGrammar()read"apiKey"and"aiProvider"from UserDefaults but the companion app stores them as"grammarApiKey"/"voxlenApiKey"/"grammarProvider"— grammar correction always failed withnoApiKey. Added Voxlen proxy path (preferred) and fixed all UserDefaults key names.subin the minted JWT. Changed to use an email-derived sub for cross-user issuance.src/lib/export.ts):formatAsSrtused wall-clockDate.getHours()/.getMinutes()/.getSeconds()for SRT timestamps, so exported files started at e.g.22:30:25,000instead of00:00:00,000. Fixed to compute millisecond offsets from the first segment's timestamp.src/lib/settings.ts,src-tauri/src/commands/settings.rs):update_settingscalledpersist_settingswhich re-serialized only Rust-known fields —billableRatePerHour,legalAcceptedVersion, andlegalAcceptedAtwere silently dropped on every settings save. Added these as round-trip fields to RustAppSettings(with#[serde(default)]) and toBackendAppSettings/toBackendSettings/fromBackendSettingsin the TS settings lib.Test plan
npx tsc --noEmit— 0 errors)00:00:00,000for first segmentgrammarApiKey