Commit Graph

180 Commits

Author SHA1 Message Date
Rocky 951e9514d7 merge: macOS architecture, cloud providers, and 6-step onboarding into main 2026-07-11 19:10:50 +08:00
Rocky cc8dd1070a feat: macOS architecture, cloud ASR/LLM providers, and 6-step iOS onboarding
- Add macOS menu-bar dictation app with local ASR models (SenseVoice/Qwen3),
  global Option hotkey, and bottom overlay
- Add cloud ASR/LLM providers (Anthropic, Volcengine, Bailian, and more) with
  provider logos, model listing, and connection checks
- Add shared 7-day usage stats UI (UsageStatsCluster / SevenDayUsageChart)
- Add iOS onboarding step 6 for polish LLM setup; hide custom-language-model
  diagnostic toggle behind DEBUG
- Unify iOS onboarding tagline with the macOS brand line ("开口即文字。")
- Rewrite README (Chinese-first, product-oriented) and refresh GitHub Pages
2026-07-11 19:10:20 +08:00
Rocky cdf833935a feat: harden Flow cold-start/force-quit and polish macOS dictation UX
Fix cold-start overlay recursion that overflowed the main-thread stack when
recording began while the ready overlay was still up; also remove temporary
on-screen Flow DEBUG panels after the orange-mic investigation, and land the
macOS overlay/catalog/layout polish plus related Flow recovery hardening.
2026-07-10 12:39:41 +08:00
Rocky ef3dcbb68c Merge pull request #31 from hkgood/feature/macos-architecture
Feature/macos architecture
2026-07-09 17:46:06 +08:00
Rocky dcb66a9849 feat: sync force-quit Flow teardown and polish macOS local ASR UX
End Live Activities and release the audio session synchronously on
applicationWillTerminate, and continue macOS local-model install,
onboarding, and settings polish on this branch.
2026-07-09 17:13:07 +08:00
Rocky 200265fbd6 feat(macos): local ASR model manager, menu-bar polish, and release 0.5.2
Adds a bundled local ASR model catalog for the macOS app with one-click
Sherpa Qwen3 / SenseVoice downloads (pause/resume, inline actions) and a
shared model storage directory used by MLX Qwen3. Fixes the light-mode
sidebar material and makes the menu-bar icon follow the system appearance
with a refreshed status mark. Renames the built product to OSGKeyboard.app.

Bumps version to 0.5.2 (build 19).
2026-07-09 08:55:37 +08:00
Rocky c2f07bd8d2 feat(macos): add macOS menu-bar app and harden cross-device iCloud sync
Introduce a standalone macOS menu-bar app (OSGKeyboardMac) that reuses the
platform-agnostic OSGKeyboardShared core: record -> cloud/local ASR -> polish
-> insert. Local mode uses Qwen3-ASR via mlx-swift-asr (macOS 15+, Apple
Silicon); iOS targets stay zero-SPM.

Harden iCloud sync for multi-device correctness:
- Per-field settings merge (appSettings.v2) so concurrent edits no longer
  clobber each other's unrelated fields.
- Per-device usage statistics (G-Counter) that sum instead of max().
- Tombstoned dictionary/history merge so deletes propagate and entries can't
  resurrect.
- API keys replicate via iCloud Keychain, never iCloud KVS JSON; pulling a
  legacy blob without key fields no longer wipes local Keychain entries.
- Add a low-risk "Sync Now" action in Settings.

Fix Flow keyboard mic state: stay orange until the host publishes a real ready
contract, share a single MicVoiceAvailability gate, and self-heal stale
cross-process heartbeat jitter instead of getting stuck.

Extract shared storage (SpeechHistoryStore/UsageStatisticsStore,
ConfigurationStore) into OSGKeyboardShared and add tests for the new
sync/merge logic.
2026-07-08 18:13:56 +08:00
Rocky 128aab1b02 feat: iCloud settings sync and cold-start return redesign
- Add iCloud key-value settings sync (engine/language/polish/Flow prefs);
  API keys stay on-device. New "Sync settings via iCloud" toggle.
- Redesign cold-start handoff: bottom-bar left-to-right swipe guidance,
  auto-dismiss on app switch, tap-anywhere to close, retained return link.
- Harden keyboard->app handoff with host-disconnected hint.
- Include prior Unreleased ASR fixes (route-change crash, fallback warning,
  multi-utterance recognition, local ASR diagnostics).

Release 0.5.0 (build 18).
2026-07-07 17:56:01 +08:00
Rocky bf844caa7f feat(dictionary): add iCloud KVS sync, cloud ASR, and lexicon expansion
Mirror the personal dictionary through iCloud Key-Value Store with
deterministic merge rules, main-app-only sync UI, and App Group as the
keyboard runtime cache. Add cloud-engine ASR with dictionary bias and
expand the bundled custom language model lexicon.
2026-07-06 22:44:14 +08:00
Rocky 07df14b546 chore(release): bump version to 0.4.1 (build 17) 2026-07-06 18:22:08 +08:00
Rocky e30a3c5765 merge: tail-drain and chunked ASR hardening into main
Resolve FlowContinuousCapture by combining tail-drain gate/drain logic
with flow-abcd route-change and interruption recovery.
2026-07-06 18:21:34 +08:00
Rocky 8e6640c470 merge: local checkpoint e6e75ed (dictation transcript accumulator) into main 2026-07-06 18:19:52 +08:00
Rocky e33e1cb999 merge: flow-abcd host return, live activity, and session policy into main 2026-07-06 18:19:45 +08:00
Rocky 9ef0196d52 feat(flow): harden host handoff, session UX, and Live Activity brand
- fix(keyboard): drop unusable extensionContext.open; report the real
  result of UIApplication.open and cancel the start watchdog immediately
  on failure with clear "open OSGKeyboard" guidance instead of a 30s spin
- feat(capture): recover from audio route changes (AirPods/wired headset
  plug-unplug) and phone-call interruptions by rebuilding the engine/tap
  against the live hardware format
- feat(home): add a "Start" button in the Home footer when a session is
  inactive and permissions are granted (no-jump manual restart)
- feat(hostapps): expand the return whitelist to 46 apps (Signal, Zoom,
  Instagram, X, Douyin, Zhihu, Bilibili, Things, Firefox, ...) with
  en/zh-Hans names and synced LSApplicationQueriesSchemes
- feat(island): use a "ready" checkmark instead of a mic glyph while idle
  and set a staleDate so an orphaned Live Activity fades after a force-quit
- feat(coldstart): use the template OSG brand mark instead of a system
  waveform glyph in the cold-start overlay
- perf(keyboard): rely on Darwin notifications as the primary session
  signal and drop the fallback poll from 1s to 3s
- fix(keyboard): remove the redundant "Start" text button next to the
  inactive-session hint on the keyboard
- docs: correct the per-take cap to 210s (3.5 min) and document that
  force-quitting no longer resurrects the session (tracker + READMEs)
2026-07-06 17:56:10 +08:00
Rocky e6e75eda31 checkpoint before checking out cursor/flow-abcd-host-return-2b89 2026-07-06 15:58:20 +08:00
Cursor Agent 6a01b6cf71 chore(release): bump version to 0.4.1 (build 12)
Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-06 07:53:10 +00:00
Cursor Agent 13cd7b30f9 feat(flow): implement ABCD session policy and host return whitelist
- Scheme A: on-demand session start, inactivity-based expiry, handoff auto-recording
- Scheme B: cold-start overlay with swipe guidance and return alert
- Scheme C+D: HostAppURLRegistry (20 apps) and sourceApplication capture
- Settings: skip app switch toggle and inactivity duration picker
- Add LSApplicationQueriesSchemes for canOpenURL checks

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-06 07:38:26 +00:00
Cursor Agent 6489340b2e feat(flow): Live Activity Dynamic Island branding and mis PrimaryLanguage
- Add OSGKeyboardLiveActivity widget extension (ActivityKit) with branded
  compactLeading mark in the Dynamic Island during Flow sessions
- Wire FlowLiveActivityController into FlowSessionManager lifecycle
- Set keyboard PrimaryLanguage to mis in project.yml, Info.plist, and at runtime
- Enable NSSupportsLiveActivities on main app and widget extension targets

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-06 05:53:24 +00:00
Cursor Agent 8b105430e3 fix(flow): drain trailing audio and harden chunked ASR pipeline
- P0/P1: tail-drain state machine in FlowContinuousCapture with converter
  flush; FlowSessionManager awaits drain before finalize
- P2: FlowCaptureTailDrain policy/tracker, pipeline diagnostics, unit tests
- P3: short final chunk merged re-transcription in ChunkedUtterancePipeline
- P4: UtteranceTranscriptStitcher composedSafely fallback; preview path parity
  in LiveDictationController

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-06 05:13:58 +00:00
Rocky 537a68552a perf(asr): speed up local Flow dictation and land CLM/keyboard refactor
Reduce perceived latency from key release to final text:
- Adaptive chunking: 2.5s first chunk + 5s follow-ups so short
  utterances start on-device recognition while still recording.
- Session-level ASR warmup and audio-format cache reuse to remove
  per-utterance cold-start of SpeechAnalyzer.
- Mirror live pipelined partials to the keyboard transcript line via
  a new flow.transcriptionPartial App Group key + Darwin ping.

Also commits the accumulated custom language model, Flow session,
keyboard extension restructure, and Xiaomi MiMo provider work in
progress on this branch.
2026-07-06 00:00:19 +08:00
Rocky 6f8ae5a4af docs(pages): redesign landing page with monochrome icons and SEO
Rework the marketing site with a cleaner, more restrained layout, replace emoji with Material Symbols monochrome icons, and add full SEO (Open Graph, Twitter cards, JSON-LD, canonical, robots.txt, sitemap.xml).
2026-07-05 19:26:56 +08:00
Rocky cfbfb542cc docs(pages): redesign landing page with monochrome icons and SEO
Rework the marketing site with a cleaner, more restrained layout, replace emoji with Material Symbols monochrome icons, and add full SEO (Open Graph, Twitter cards, JSON-LD, canonical, robots.txt, sitemap.xml).
2026-07-05 19:26:23 +08:00
Rocky 98abc47600 docs(pages): update site for current app features
Refresh the public Pages copy so setup, privacy, and feature descriptions match the current keyboard behavior.
2026-07-05 18:50:42 +08:00
Rocky c555056173 docs(pages): update site for current app features
Refresh the public Pages copy so setup, privacy, and feature descriptions match the current keyboard behavior.
2026-07-05 18:50:25 +08:00
Rocky d4aec53988 Merge pull request #27 from hkgood/feature/custom-language-model-asr
feat(lexicon): add custom ASR language model v1 (Sogou + AI/tech brands)
2026-07-05 18:38:36 +08:00
Rocky 7ffa7ae3f2 feat(lexicon): add custom ASR language model v1 (Sogou + AI/tech brands)
Build a first-version SFCustomLanguageModelData for on-device ASR
customization, generated offline on macOS (no app code dependency).

- Scripts/lexicon: Python builders for Sogou-derived phrases (scel +
  SogouPopularDict) and a curated bilingual AI/tech/brand seed lexicon
- export_clm.swift / prepare_clm.swift: macOS CLI tools that export the
  .bin training asset and compile it into LM + Vocab via the Speech
  framework
- Resources/CustomLanguageModel: generated phrases.tsv, manifests, the
  129k-phrase .bin, and compiled LM/Vocab assets (zh_CN)
- .gitignore: ignore lexicon build cache and Python bytecode

Note: Sogou-derived data is for internal experimentation only; the
curated AI/tech seed is MIT and safe to ship.
2026-07-05 18:38:07 +08:00
Rocky 05e005e9ce feat: cursor navigation, key sounds, dictionary tooling, key security
Batch of in-progress app work from the working tree.

- feat(keyboard): CursorNavigation + CursorDragPad for caret movement;
  KeyboardSoundFeedback for system key click sounds
- feat(dictionary): DictionaryAliasGenerator + PersonalDictionaryEntrySheet;
  TranscriptPostProcessor quality gate; retire DictionaryLearner
- feat(ui): TabBarVisibility handling; drop PageHeaderRow /
  PageHeaderConfirmButton; refresh views and localizable strings
- fix(security): move the hardcoded DeepSeek key out of
  PreconfiguredKeys.swift into a gitignored PreconfiguredKeys.local.swift
  (seeded from .example by generate-xcodeproj.sh)
- docs(agents): add Conventional Commits versioning + bilingual changelog rules
- chore(gitignore): ignore PreconfiguredKeys.local.swift, .cache/, pycache

Custom language model / lexicon work stays on
feature/custom-language-model-asr. Changelog bullets added under
[Unreleased]; no version bump.
2026-07-05 18:27:23 +08:00
cursor[bot] 074e24d87f Merge pull request #26 from hkgood/cursor/fix-home-stats-background-6baf
fix: HomeStatsCard background ShapeStyle compile error
2026-07-03 10:02:33 +00:00
Cursor Agent c750646e8d fix: use View-backed background for HomeStatsCard gradient
Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 10:02:24 +00:00
cursor[bot] 8dc2cd0310 Merge pull request #25 from hkgood/cursor/fix-usage-stats-import-6baf
fix: import OSGKeyboardShared in UsageStatisticsStore
2026-07-03 10:00:50 +00:00
Cursor Agent 0bccb3c353 fix: import OSGKeyboardShared in UsageStatisticsStore
Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 10:00:36 +00:00
cursor[bot] 8ab5dacb1c Merge pull request #24 from hkgood/cursor/home-stats-card-6baf
首页新增听写/翻译/词库统计卡片
2026-07-03 09:58:59 +00:00
Cursor Agent b909e9082b feat(home): add usage statistics card above preview field
Track dictation duration, dictation/translation character counts, and
personal dictionary size. Record metrics when Flow finalizes utterances.

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 09:54:13 +00:00
cursor[bot] 5cb772d699 Merge pull request #23 from hkgood/cursor/bump-version-0-3-2-6baf
chore: bump version to 0.3.2
2026-07-03 09:37:51 +00:00
Cursor Agent 2169274dd0 chore: bump version to 0.3.2 (build 7)
Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 09:37:40 +00:00
cursor[bot] ff5e89de19 Merge pull request #22 from hkgood/cursor/fix-sync-appcontext-call-6baf
fix: remove stale syncAppContextFromAppGroup call
2026-07-03 09:35:33 +00:00
Cursor Agent 35e5ec2a76 fix: remove stale syncAppContextFromAppGroup call after chip removal
Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 09:35:19 +00:00
cursor[bot] 82c802ccb3 Merge pull request #21 from hkgood/cursor/simplify-polish-context-6baf
统一润色逻辑:全自动场景,移除润色场景与自定义提示词
2026-07-03 09:33:52 +00:00
cursor[bot] 33f5b1ba79 Merge pull request #20 from hkgood/cursor/settings-ui-polish-6baf
设置页与引导页 UI 简化
2026-07-03 09:33:44 +00:00
Cursor Agent 4ab60ba3dc Remove manual polish scenario UI; rely on auto AppContext only
- Hide AppContext chip and remove manual override from keyboard
- Remove polish scenario picker and custom system prompt from settings
- Remove scenario section from onboarding
- Translation prompt uses auto-detected AppContext instead of polish scenario
- Delete ScenarioPrompt, ScenarioStyleDirective, PolishScenario, and related views

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 09:26:51 +00:00
Cursor Agent bdf2d627ad Simplify settings UI and fix personal dictionary page styling
- Remove polish intensity and personal dictionary description subtitles
- Use consistent surface background on personal dictionary page
- Change empty state icon to library (menuBook) style
- Remove polish scenario and translation rows from onboarding

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 09:14:37 +00:00
cursor[bot] 74f33b480f Merge pull request #19 from hkgood/cursor/fix-wrapper-icon-patch-6baf
fix: XcodeGen 2.45 wrapper.icon AppIcon patch
2026-07-03 09:00:53 +00:00
Cursor Agent 1fc91f5e0b fix: patch XcodeGen 2.45 wrapper.icon AppIcon single-line PBX
XcodeGen 2.45 writes AppIcon.icon as a one-line PBXFileReference with
lastKnownFileType = wrapper.icon. Add a fast in-place upgrade to
folder.iconcomposer.icon before the generic brace-matching fallback.

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 09:00:36 +00:00
cursor[bot] 31dd5c8c4c Merge pull request #18 from hkgood/cursor/fix-appicon-xcodegen-native-6baf
fix: XcodeGen native AppIcon.icon + patch fallback v3
2026-07-03 08:53:41 +00:00
Cursor Agent b3f68151d1 fix: rely on XcodeGen native AppIcon.icon; harden patch fallback
Remove fileTypes icon override and explicit type:file so XcodeGen 2.37+
emits folder.iconcomposer.icon directly. Skip patch when native output is
valid; otherwise run patch v3 with broader PBX discovery and validation.

Fixes persistent 'AppIcon.icon entry has unexpected shape' on Xcode 26.

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 08:53:28 +00:00
cursor[bot] 7410627476 Merge pull request #17 from hkgood/cursor/fix-appicon-patch-script-6baf
fix: AppIcon.icon patch script for Xcode 26 XcodeGen output
2026-07-03 08:50:54 +00:00
Cursor Agent 7c83b351aa fix: harden AppIcon.icon patch for newer XcodeGen layouts
Brace-match the AppIcon.icon PBX object instead of relying on fixed
regex shapes. Fixes 'AppIcon.icon entry has unexpected shape' when
XcodeGen/Xcode 26 emits a different PBXFileReference format.

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 08:50:43 +00:00
cursor[bot] e57e88a2fe Merge pull request #16 from hkgood/cursor/settings-keyboard-ui-tweaks-6baf
feat(ui): keyboard chip cleanup and settings preferences merge
2026-07-03 08:30:33 +00:00
Cursor Agent 265b4c9f13 feat(ui): simplify keyboard chips and reorganize settings preferences
- Remove polish scenario and ASR locale chips from keyboard top bar
- Fix polish intensity labels via SharedL10n (Shared.strings table)
- Merge polish intensity and personal dictionary into preferences card
- Personal dictionary: no list icon; detail view uses nav bar + back

Co-authored-by: Rocky <hkgood@users.noreply.github.com>
2026-07-03 08:30:20 +00:00
cursor[bot] d69b88799a Merge pull request #15 from hkgood/cursor/fix-settingsview-stale-sections-6baf
fix: remove stale SettingsView section references
2026-07-03 08:20:46 +00:00