23 Commits
Author SHA1 Message Date
Muran Jiang 09828b7ea6 docs(readme): restore jiangmuran and Cooper (#971) 2026-08-20 13:00:00 +08:00
jmr 1df2838604 NO AI SLOP PLEASE
AI SLOP 会导致项目产生大量垃圾内容 且在此workflow被跳过的情况下无法正常merge pr
2026-06-27 14:05:38 +08:00
jmr 95920a6b41 Merge pull request #729 from Open-Less/fix/issue-643-traditional-chinese-output
fix(ime): 繁中用户语音输入始终输出繁体 / enforce 简繁 script on output (#643)
2026-06-21 20:57:47 +08:00
Andy Jiang 48e190be20 fix(ime): always enforce 简/繁 script preference on dictation output (#643)
Traditional-Chinese users got Simplified output. finalize_polished_text only ran
the deterministic OpenCC conversion for Raw mode / polish failures, leaving
successful polish modes to the LLM — which defaults to Simplified for Chinese.
The streaming-insert path bypassed the conversion entirely.

- finalize_polished_text: for non-translation dictation, always apply
  apply_chinese_script_preference. It is a no-op for ChineseScriptPreference::Auto
  (the default), so zero impact on users who didn't pick a script; for Simplified/
  Traditional it now guarantees the output script instead of trusting the LLM.
- streaming_insert_eligible: gains the script preference and disables streaming
  insert when it is non-Auto, so the one-shot path runs (streaming types live and
  has no finished text to post-process).

Tests: polish_output_honors_chinese_script_preference (S2t actually converts;
Auto is a no-op) + streaming_disabled_for_non_auto_script_so_opencc_runs. 470 lib
tests pass.

Closes #643
2026-06-21 19:22:46 +08:00
Andy Jiang 950ad58006 chore(release): 1.3.11 2026-06-21 13:55:15 +08:00
Andy Jiang 65361606f7 feat(dictation): failure-resilience, record-next queue, manual re-transcribe
- preserve audio on ASR failure + auto silent retry: always-archive recordings
  (delete on success unless debug), route all engine failure arms through a single
  fail_dictation -> recoverable transcribeFailed history; auto-retry re-feeds the
  archived WAV via retranscribe_pcm; fix empty-transcript id mismatch (#613)
- hotkey: queue-chain -- a press buffered during processing auto-starts the next
  recording (grace window distinguishes it from the #545 post-session cooldown)
- history: wire the manual re-transcribe button for transcribeFailed/emptyTranscript
  entries with audio

Rebased onto beta 1.3.10; my capsule multi-monitor fix dropped (superseded by #714).
2026-06-21 13:53:56 +08:00
Andy Jiang e05025a7e7 chore(release): 1.3.9 (stable / 正式版)
内存优化:webview 代码分割 + i18n 按需加载(index 440→285KB) + 胶囊录音帧节流 + qa/less-computer/glow 窗口懒创建(idle WebKit 进程 5→2)。含 #661 暗色模式。
2026-06-15 21:39:49 +08:00
Andy Jiang 6e502840d8 fix(build): gate lazy qa-window builder to desktop (Android webview builder lacks decorations)
ensure_qa_window was un-gated, so it compiled on the Android target where WebviewWindowBuilder has no decorations/shadow/etc. Gate the desktop builder + WebviewUrl/WebviewWindowBuilder import to not(android/ios); add an Android/iOS stub returning get_webview_window (QA routes to main there; show_qa_window early-returns on Android so it's compile-only). Desktop (Win/macOS/Linux) already passed.
2026-06-15 17:14:54 +08:00
Andy Jiang bdfaa89f05 perf(macos): lazy-create qa/less-computer/glow windows — 3 fewer idle WebKit processes
These 3 windows were declared in tauri.conf.json and created eagerly at startup, each holding a resident WKWebView content process even though they're rarely shown. Remove them from tauri.conf; create on first show via WebviewWindowBuilder (ensure_qa_window / ensure_less_computer_window / ensure_less_computer_glow_window) with config matching the old declarations exactly. QA drag-fix (make_qa_window_draggable_macos) was startup-only — re-applied on create. Drops ~3 resident WebKit processes (~30-50MB each) when idle.

Tradeoffs to verify on macOS: (1) first QA/Less-Computer open builds the webview before showing (slight first-use delay); (2) QA emit-race is benign (first emit = idle/empty = panel default); Less-Computer's first turn bubble could be missed on cold open (recovers next emit) — verify. Confirm QA still drags + positions; glow shows over fullscreen.
2026-06-15 17:00:04 +08:00
Andy Jiang cab7dc205d perf(i18n): lazy-load non-zh-CN locales — shared index chunk 440KB→285KB
All 5 locales (en/ja/ko/zh-CN/zh-TW) were statically bundled into the index chunk that every one of the 5 webviews loads. Keep only zh-CN (fallback + source of truth) inline so init stays synchronous; lazy-load the other 4 as separate chunks on demand (initial non-zh-CN locale loads async after first paint, then changeLanguage; setLocalePreference awaits the locale before switching). Worst case = graceful zh-CN fallback, never broken keys. Cuts ~155KB raw / ~75KB gzip from the per-webview index; zh-CN users never load the other 4.

Build-verified: index 285KB + en/ja/ko/zh-TW separate chunks. Runtime-sanity: switch language in settings (en/ja/ko/zh-TW) to confirm it loads + applies.
2026-06-15 13:13:13 +08:00
Andy Jiang 1c0f55716c perf(ui): memoize capsule buttons + metrics to cut per-frame work during recording
During recording the audio level updates ~60Hz, re-rendering the whole Pill. The cancel/confirm SVG buttons and the pill metrics don't depend on level, so: React.memo(CircleButton) + useCallback(onCancel/onConfirm) lets the two buttons skip re-render per frame, and useMemo the os-derived metrics. Pure render optimization — identical output, no behavior/NSPanel change. Build-verified.
2026-06-15 12:03:54 +08:00
Andy Jiang 6aedfb087a perf(ui): code-split per-window screens so each webview loads only its own code
All 5 webviews (settings/capsule/qa/less-computer/glow) shared one ~942KB bundle, so every WebKit content process parsed+held the entire app (settings UI + LocalAsr 3.4k LOC + Style + Marketplace + chat panels). React.lazy each window root: FloatingShell (settings, 352KB) + QaPanel + LessComputerPanel + LessComputerGlow + Onboarding + AutoUpdateGate are now separate chunks loaded on demand. Capsule kept eager (tiny + latency-sensitive). Secondary webviews no longer load the settings UI → much lower resident memory per process.

Frontend-only, build-verified (chunks split, tsc+vite pass). Runtime-sanity: open settings / QA / Less Computer / glow once to confirm they still render (Suspense fallback is blank during first chunk load).
2026-06-14 13:57:43 +08:00
Andy Jiang a5188b8935 chore(release): 1.3.8 (stable / 正式版)
fix(macos): 胶囊转非激活 NSPanel,可叠加在全屏 app 之上(在 1.3.7 跨桌面修复之上)。注:Cargo.lock 的 tauri-nspanel 依赖由 CI/构建时解析。
2026-06-14 11:34:59 +08:00
Andy Jiang b29c624d08 fix(macos): convert capsule to non-activating NSPanel so it overlays fullscreen apps
v1.3.7 fixed cross-desktop but not fullscreen: a plain NSWindow can't draw over ANOTHER app's fullscreen Space even with CanJoinAllSpaces+FullScreenAuxiliary+level (known Tauri limit: tauri#9556/#11488). The window must be a non-activating NSPanel. Add tauri-nspanel (macOS-only git dep), register the plugin, and convert the capsule via to_panel() at setup with NSNonactivatingPanel mask + FullScreenAuxiliary|CanJoinAllSpaces + level 25, per the plugin's own fullscreen example.

Note: Cargo.lock not regenerable here (no local cargo) — CI resolves the git dep; commit the lock update after the first local 'tauri dev'. Runtime-verify on macOS before release.
2026-06-14 11:16:42 +08:00
Andy Jiang ffeb0c4412 chore(release): 1.3.7 (stable / 正式版)
性能优化批 + macOS 胶囊跨桌面&全屏修复 + ink-4 对比度(AA)修复 + 清理 12 个死文件。将以 stable 渠道(v1.3.7-tauri)推送给所有用户(in-app updater + Homebrew)。
2026-06-14 00:07:49 +08:00
Andy Jiang 12fa110795 fix(macos): raise capsule window level to 25 so it overlays fullscreen apps
v1.3.6-5 fixed cross-desktop following but not fullscreen: FULL_SCREEN_AUXILIARY only lets the capsule JOIN the fullscreen Space; at alwaysOnTop's floating level (~3) it still renders behind the fullscreen window. setLevel(25) (above the menu bar, matching show_less_computer_glow which does overlay fullscreen) makes it render on top. Add a contract assertion to lock it in.

Runtime-verify on macOS: enter a fullscreen app, trigger dictation, capsule should now appear over it.
2026-06-13 23:59:43 +08:00
Andy Jiang 2e27f70472 chore(release): bump version to 1.3.6-5 (Beta)
性能优化:发布 profile(LTO/strip)、空闲轮询修复(托盘麦克风/全局热键/coding-agent supervisor)、LLM 连接复用、流式 markdown 帧率节流、胶囊每帧 style 提取。

fix(macos): 胶囊跨桌面/全屏跟随(collectionBehavior 绝对值)。fix(a11y): 恢复 --ol-ink-4 WCAG AA 对比度。chore: 删除 12 个未编译的孤儿 coordinator/*.rs。
2026-06-13 23:33:16 +08:00
Andy Jiang 35831499e3 fix(a11y): restore --ol-ink-4 WCAG AA contrast; trim stale aura-skin contract
AURA->beta-3 revert lowered light --ol-ink-4 alpha 0.58->0.42 (muted text 2.88:1, fails WCAG AA); restore 0.58 (~5.1:1). Trim aura-skin contract: drop assertions for revert-deleted theme switching / solid tokens / .ol-aura-* classes. Dark-mode-only guards parked pending the post-revert dark-mode decision.
2026-06-13 23:18:13 +08:00
Andy Jiang 11e536d3c5 perf(ui): rAF-throttle streaming markdown + capsule per-frame style
Add useRafThrottle; QaPanel/LessComputerPanel parse streamed markdown at frame-rate instead of per-token (was O(n^2)); LessComputer DOM-measure + IPC window-resize coalesced to one per frame. Capsule keyframes injected once into document.head instead of re-created every ~60Hz audio-level frame.
2026-06-13 23:18:13 +08:00
Andy Jiang 33b0e5ea38 perf(backend)+fix(macos): perf quick-wins, capsule across Spaces, drop dead coordinator files
Backend perf: add [profile.release] (lto=thin/codegen-units=1/strip); tray mic watcher 1.5s->10s; global-hotkey dispatcher blocks on recv() instead of 250ms poll; coding_agent supervisor exits on non-macOS instead of 5s poll; cache+reuse reqwest client across utterances (net.rs) in OpenAI/Codex/Gemini providers (kills per-utterance cold TLS handshake).

fix(macos): capsule joins all Spaces + fullscreen via an absolute setCollectionBehavior(273) matching show_less_computer_glow; drop the racy Tauri set_visible_on_all_workspaces that deferred-overwrote the manual FullScreenAuxiliary bit.

chore: remove 12 orphaned coordinator/*.rs (never mod-declared -> not compiled); repoint macos-capsule-spaces contract test to the live coordinator.rs.
2026-06-13 23:18:13 +08:00
jmr c14d61e8a5 Merge pull request #611 from H-Chris233/fix/linux-fcitx-clipboard-fallback
fix(linux): enable Wayland clipboard fallback
2026-06-07 00:18:21 +08:00
jmr 898c6911c6 Update fmt.Println message from 'Hello' to 'Goodbye' 2026-06-03 22:28:57 +08:00
jmr b0fe9ccb52 Revise README for improved clarity and structure
Updated README.md to enhance clarity and formatting.
2026-06-03 22:20:54 +08:00