Keyboard
- Only jump to the app when the voice surface is shown (tab tap / opened
there); typing tabs no longer leave the host on keyboard open.
- Wait up to 0.4 s for the arbiter to report the host app before leaving,
and late-bind an id that arrives within 6 s of the jump.
- Empty arbiter callbacks no longer wipe an already captured host id;
install the capture handler in every build configuration.
App
- Return to the previous app with up to four retries using iOS's real
open result, and honor the skip-app-switch preference.
- Keep the pending host id across cold-start zombie reconciliation, and
expire it after two minutes (legacy values without a timestamp stay valid).
- Show a light tip pointing at the system back control when we cannot
return automatically ("点击返回,立即使用").
Tests: TTL behaviour and return retry policy.
Version: CURRENT_PROJECT_VERSION 130 -> 131 (project.yml, AGENTS.md, READMEs,
docs/llms.txt).
fix(flow): host-app identification now compiles in every build configuration
(Debug, TestFlight, Release). The arbiter probe and HostAppIdentity were
DEBUG-only, so TestFlight/App Store builds never knew the host bundle id and
could not auto-return after a startflow handoff. Debug-only logging and the
Home test card are unchanged.
Also includes the pending work in the tree:
- Home: single account/setup card surface (HomeAccountSurfacePolicy/Views)
- Wide screens: voice key row and centred mic placement, iPhone Duo layout
- Keyboard: clipboard skill ranking and AI skill layout updates
- Debug: account session handoff to the Simulator (+ import script)
- Docs: portfolio assets, privacy policy URL, site/README refresh
- KeyboardState moves from ObservableObject/@Published to @Observable, so a view re-renders only for the properties it reads. Previously unpublished state and injected action hooks are @ObservationIgnored.
- KeyboardViewController replaces the $phase/$surface Combine sinks with Observations loops tied to the same cancellables.
- AIKeyboardView reads the 200 ms mic level and live ASR partials in small child views (AssistantWaveform, LiveTranscriptReader), so those ticks no longer rebuild the whole assistant surface.
- Tests observe changes with withObservationTracking instead of Combine publishers.
- ProviderConfig is now @MainActor instead of @unchecked Sendable; AppL10n reads the persisted UI language key directly so off-main string lookups stay valid.
- EnglishLearningStore serializes its read-modify-write with a type-wide lock (several instances share one defaults key).
- URLSession-only transports, GatewayGrantKeychainStore and Keychain conform to Sendable without @unchecked. UserDefaults/DeviceCheck wrappers keep @unchecked because those SDK types are not Sendable.
Hiding the keyboard on the typing surface kept librime's LevelDB userdb
LOCK open in the App Group, so RunningBoard killed the suspended extension.
Finalize the runtime on every hide (and when schema selection fails);
viewWillAppear re-prepares Rime in about 30-50 ms.
- Rebuild the return-to-host whitelist from the CN/US top charts plus Apple
system apps; drop the canOpenURL pre-check (LSApplicationQueriesSchemes
is capped at 50) and let open() report failure.
- Never record an OSG bundle id as the host to return to.
- DEBUG only: probe the host bundle id through the keyboard arbiter
callback and surface the log on a Home test card. Release builds keep
the previous behaviour (no host identification).
- Invite opens an appearance-matched poster with the app icon, inviter name,
QR code, and short code; tap for a full-brightness QR view; save (add-only
Photos access), share, or copy the link. Mac shows the poster in a popover
and can save it as PNG.
- Accounts get look-alike-free 8-character codes. "I have a code" accepts a
code, link, or pasted message during the server-defined binding window.
- Permanently rejected redemptions show a specific message and drop the
stored code instead of retrying on every sign-in.
Regeneration merges the on-device learned evidence with dictation and reply
choices since the last generation instead of re-reading only the newest
~2,500 characters. It unlocks after 500 new characters, fades traits that
stop getting support, and fully relearns styles without saved evidence.
- Keep recording after a streaming ASR error and retry the captured PCM
through batch ASR before reporting a failure.
- Treat an expired ASR wait as a stall so batch fallback still runs.
- Prime the managed Volcengine stream on mic touch and adopt it only while
fresh and open.
- Auto-scroll the live transcript to the newest recognized text.
The speak-as-me skill inherited the Reply contract's JSON variants and
occasionally echoed the personal-style XML tags into the output. The
prompt now demands one ready-to-send plain-text paragraph, forbids JSON,
code fences, Markdown, lists, preambles, and multiple variants, and marks
the style block as prompt-internal packaging. Length follows the user's
natural voice instead of the mechanical ±20% cap.
- record analytics/usage only in the host app; the extension no longer opens the
SQLite queues, so hiding the keyboard cannot hold WAL locks (0xdead10cc)
- sync clipboard history writes across processes so deletes made on one side
are not reverted by the other
- guard memory-relief reentrancy on controller and telemetry sides to break
the recursive crash loop
- resolve credentials off the main thread and migrate legacy keys once per
install, so Keychain reads cannot be caught in the suspend window
- gate Volcengine ASR ping completion to once (SIGTRAP on double resume)
- treat same-text captures as the same logical copy and dedupe auto actions
by content fingerprint within 30s, stopping Universal Clipboard storms
- realign version line to 2.1.0 (build 110)
Squashes the working tree that had accumulated on cloud-agent. Two
strands of work, kept in one commit at the maintainer's request.
Crash and stability (this session):
- Subscribe to MetricKit so crash, hang, CPU, and disk-write diagnostics
are recorded on device. Keyboard-extension memory kills are the most
likely way a user loses the keyboard mid-sentence and iOS does not
classify them as crashes, so they never reach App Store Connect.
- Upload those reports to POST /v1/analytics/diagnostics from internal
builds only (local Debug and TestFlight), reusing the analytics
installation identifier and skipping entirely when analytics are off.
App Store builds keep everything on device.
- Shed the Chinese engine, English lexicon, and in-flight pipeline work
at the 40 MiB and 48 MiB budget thresholds instead of waiting for a
system memory warning that jetsam often preempts.
- Install audio taps with the input node's live format through one
shared adaptive resampler, so an audio-route change mid-recording no
longer raises an uncatchable format-mismatch exception. Covers the
dictation preview and the Mac recorder, which still used the pattern
the Flow capture path had already moved away from.
- Harden the librime bridge: never pass a nil string across a nonnull
boundary when a user dictionary holds malformed UTF-8, null-check the
engine API vector, and distrust a candidate count without its array.
- Guard the expanded candidate grid against a list that shrinks while
the collection view is still laying out against the previous count.
- Resolve localized text without the App Group so the screen shown when
that container is missing renders its message instead of crashing on
launch, which is the one situation it exists to handle.
- Gate CI on the App Group and Keychain wiring that the keyboard
extension hard-depends on, with a self-test proving the check fails.
Clipboard, reply, and semantics (pre-existing working tree):
- Unify the reply center, refresh keyboard AI features, and add native
event and reminder exporters.
- Expand clipboard semantic routing with authored corpora and a
product-blind holdout, plus the scripts that build and validate them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merges the wip/local-snapshot-20260901 safety commit (94 uncommitted files:
in-flight Account/Mac/Tip work, clipboard-semantics improvements, and the
feature-preview recording tooling) into the newer cloud-agent line.
Conflict resolutions:
- docs/*: honour the branch's deliberate removal in eac44da; drop the now
dangling docs/archive/README.md that only pointed at the deleted files.
- CHANGELOG: both sides describe separate [Unreleased] features; keep both.
- ClipboardSkillSemanticRanker: take the branch's reply routing, which retires
ranking playfulReply/acceptInvitation/... as separate skills in favour of
ordinary/formal/playful variants inside one reply action. Keep the local
link/phone/CJK-density work, which is orthogonal and still referenced.
- OfficialSkillCatalogTests: keep the local "installed exactly once" assertion;
it matches the test's own comment and does not hardcode the default set.
- ClipboardSkillSemanticRankerTests: keep both sides' disjoint test functions;
retarget the two link/phone cases at the branch's row, which no longer
surfaces the retired specialised reply skills.
Verified: xcodebuild build succeeds and the 77 ranker/catalog/analyzer tests
pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Safety commit so the 94 uncommitted files in the working tree (in-flight
Account/Mac/Tip work plus the feature-preview recording tooling) survive the
move onto cursor/cloud-agent-1787824905651-vxuwc.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Remove the test-mode unlimited personal-style corpus bypass and replace it with a real 1,250-character minimum gate. Production stays at 2,500. Training-corpus export and the diagnostics view now use a 5,000-character upper bound so the user's full private history never leaves the device in a single export.
- Add PolishStyleLearningCorpusBuilder.testBuildEffectiveCharacterCount (1,250) and trainingExtractionMaximumCharacterCount (5,000); trainingWindow(from:maximumCharacterCount:) accepts a custom cap.
- PolishStylesView: drop bypassesStyleLearningCharacterGate in favor of styleLearningMinimumCharacterCount, unify the ready/remaining text, remove the obsolete polishStyles.learn.testBuildReady key.
- PolishStyleCorpusExportStore: pass the 5,000 cap to trainingWindow and expose trainingExtractionMaximumCharacterCount in the export schema.
- FlowDiagnosticsSettingsView: show the export-sized (5,000-cap) corpus so the diagnostics match what the export ZIP actually contains.
- Tests: rewrite the export cap test for 5,000, add below-cap coverage, add trainingWindow(maximumCharacterCount:) unit coverage, and convert the old UI test into a regression test for the 1,250 test-build minimum.
- L10n: drop the testBuildReady string in en + zh-Hans, update diagnostics.corpus.ready to mention 5,000.
- CHANGELOG: bilingual entry under [Unreleased].
Removes assets and docs that are zero-references in the codebase and the
GitHub Pages site (scanned with ripgrep across *.swift / *.md / *.html).
Removed assets (no Swift / NSImage / UIImage / Image callers):
- 19 provider logo imagesets in OSGKeyboard/Assets.xcassets/:
anthropic, apple, ark, codingplanx, cometapi, custom, deepseek,
gemini, groq, mimo, minimax, mistral, moonshot, openai, openrouter,
qwen, siliconflow, xai, zhipu
- docs/assets/badges/appstore-{en,zh}.svg (README badges in use are
ios-{en,zh}.svg and macos-{en,zh}.svg)
Removed dead code:
- OSGKeyboardShared/Models/ProviderLogo.swift (no callers; only maps
provider ids to the now-deleted logo imagesets)
Removed placeholder screenshots:
- docs/screenshots/6.1/ and docs/screenshots/6.7/ (10 PNGs generated
by scripts/generate_screenshot_placeholders.py; never replaced with
real captures, no README/HTML/Swift references)
Removed zero-reference planning / audit md (no code, no README, no
CHANGELOG, no GitHub Pages HTML references):
- docs/ACCOUNT_MANAGED_GATEWAY_TESTING.md
- docs/APPSTORE_METADATA.md
- docs/STOREKIT_TESTING.md
- docs/TYPING_KEYBOARD_BASELINE.md
- docs/ios-pip-voice-session-plan.md
- docs/keyboard-accuracy-plan.md
- docs/keyboard-memory-budget.md
- docs/local-asr-architecture.md
- docs/mac-parity-audit-2026-08-23.md
- docs/personal-dictionary-icloud-kvs-checklist.md
- docs/screenshots/README.md (described the deleted placeholders)
Kept (still referenced):
- Brand marks: OSGBrandMark, OSGLogoWide, OSGStatusMark, osglogo
- docs/TESTING.md (referenced by README.md / README.en.md / CONTRIBUTING.md)
- docs/FLOW_BLUETOOTH_TESTING.md (referenced by docs/TESTING.md)
- docs/RELEASE_NOTES_1.8.0.md (referenced by CHANGELOG.md)
- docs/assets/{badges,whats-new,logo,app-icon,hero-devices} (GitHub Pages)
- AppStoreScreenshots/, marketing/ (App Store /策划素材, not in repo refs)
Updated .gitignore so the deleted md cannot be re-added locally and
pushed back by accident. Asset placeholders, dead code, and unused
badges are also covered by patterns under the same rationale.
No version bump: this is a pure cleanup (chore:) with no user-visible
behavior change.
- Merge invitation, task, blessing, clarification, and empathy actions
into a single Reply flow, with three fixed, clearly labeled stance
choices whenever user intent must not be guessed.
- Refine clipboard semantic routing with bilingual schedule,
confirmation, and follow-up models, conservative language thresholds,
and explicit-assignment guard for complaint-only text.
- Persist Apple account refresh state, harden session recovery, and
surface durable account diagnostics across keyboard and app.
- Derive personal-style prompts through two-stage corpus evidence and
apply real low-confidence ASR tendencies instead of neutral templates.
- Localize the new reply center, clipboard semantics, and personal-style
surfaces in both English and Simplified Chinese.
Resolve the pinned XcodeGen archive layout and let the keyboard derive bounded clipboard recommendations from the full catalog independently of installation state.
Unify PiP recovery across startup and foreground transitions, surface actionable status, and add privacy-safe analytics plus the refreshed onboarding and account experience. Update documentation assets and advance the release build to 84.
Introduce optional Apple account-backed credits with scoped gateway access while preserving local and BYOK paths. Refresh assistant behavior, tests, privacy disclosures, docs, and the website for the 2.0 experience.
Merge dictation and AI controls into one assistant surface, preserve safe insertion and clipboard actions, and align settings and tests with the new flow.
Replace the unclear CLM source, align release and privacy disclosures, complete third-party notices, and keep the expanded test suites deterministic for release validation.
Keep English QuickType/mmap and Chinese schema hygiene on one branch.
Secure fields skip Rime; English still loads its lexicon only while English is active.
Erase dialect syllables before abbrev so wom prefers 我们, flush librime
on leave, and add a settings action to forget learned Chinese and English order.
Add save-to-Notes export and direct map handoff while aligning multi-touch typing, period shortcuts, return actions, and navigation visuals with system behavior.
Rotate AI idle suggestions with optional remote packs, move history/dictionary onto self-sizing Home preview cards, harden clipboard capture/prompting, and simplify keyboard chrome by dropping most liquid-glass shadows.
Ship optional keyboard clipboard history with settings, suggestion strip, and paste-permission guidance; let undo roll back clipboard inserts; bump build to 64.
Add the AI keyboard tab, Agent settings, and user-owned LLM key path for 1.7.0, including streaming answers and web-search transports without the built-in DeepSeek fallback.
Adapt typing/voice surfaces for iPad width and height, add the system globe
key and last-input editing flow, harden host-only Rime deployment, and remove
clipboard voice commands. Bump build to 61.
Keep marketing version at 1.6.6 and bump build to 59. Strengthen never-answer
polish safeguards, clipboard reply-intent continuity, voice undo UX, device
UITests harness, eval fixtures, and What's New assets.
Stabilize clipboard long-press prepare/resume across paste alerts and cold start, add an in-app release-notes sheet with remote bilingual HTML, localize typing input settings, and bump build to 55.
Long-press mic runs ASR as an instruction over eligible clipboard text,
with host-confirm recording UI, min-record gate, and light ASR prewarm.
Bump CURRENT_PROJECT_VERSION to 53.