40 Commits
Author SHA1 Message Date
ZASENJC 2353d8a9a1 docs(readme): 重写 Apple 风格产品文案,优化章节层次与核心特性呈现 2026-10-16 19:38:05 +08:00
ZASENJC 4215c9e768 Add faster TTREE promo v2 showcasing translation OCR and model settings 2026-10-16 19:31:43 +08:00
ZASENJC 0a1c8f1f97 Add 30-second looping TTREE promo with Mac renders and original music 2026-10-16 19:14:20 +08:00
ZASENJC db1a28da00 fix(macos): 修复 Release 优化下动态 NSColor 闭包提前释放导致启动崩溃
- 在 pale_ink 动态提供器闭包中使用 Retained::autorelease_ptr(color) 将 NSColor 放入自动释放池后再返回裸指针,避免 Release 模式下 objc_retainAutoreleasedReturnValue 优化导致函数返回前即被 drop 释放
- 升级版本至 0.2.4
2026-10-16 18:53:08 +08:00
ZASENJC 0df6e9859d fix(macos): 翻译面板根据底层窗口背景亮度动态平滑切换文字对比色
- 将 pale_ink 改为基于 NSColor::colorWithName_dynamicProvider 的动态颜色提供器,并在浅色背景上适度增强低透明度层级的对比度
- 按钮背景改用 NSButtonCell 动态背景色以跟随文字色调切换
- 通过 CGWindowListCreateImage(OnScreenBelowWindow) 采样窗口底层中心区域亮度,结合迟滞阈值(0.44/0.56)与指数平滑过渡(step_ink_tone)实现亮/暗背景间的自然渐变
- 同步更新窗口 NSAppearance 并触发视图树重绘,升级版本至 0.2.3
2026-10-16 18:05:14 +08:00
ZASENJC b0671bbf73 fix(translate): follow Bing geo redirects and surface both provider errors (#3)
- Follow 301/302/303/307/308 redirects within *.bing.com when fetching the Bing translator token and posting to /ttranslatev3, preserving the POST method/form body and caching the resolved origin on BingToken.
- Combine primary and secondary provider error messages when hedged free translation fails on both channels instead of discarding the first error.
- Fix debug-mode objc2 type encoding check in macOS make_button by using typed NSColor::CGColor and CALayer::setBackgroundColor methods.
- Bump workspace version to 0.2.2.
2026-10-16 17:34:59 +08:00
samwong 54b0bea86a Merge pull request #1 from lingr25/shortcut-recorder-and-window-fixes
feat(hotkeys): 原生按键录入快捷键,并修复 Windows 窗口启动与闪烁
2026-10-16 02:29:35 -07:00
ZASENJC a4ddb522af feat: add signed native updates for macOS and Windows 2026-10-16 02:06:09 +08:00
ZASENJC 7d424f059e fix(release): isolate signing material from the preflight compiler 2026-10-16 00:31:22 +08:00
ZASENJC 823ba44d78 fix: register signing keychain and verify signing before universal builds 2026-10-16 00:29:48 +08:00
ZASENJC 63fd5c97f3 feat: use transparent adaptive tray marks on both native apps 2026-10-16 00:20:07 +08:00
ZASENJC ca7b7ad7ba design: shorten E bars for a compact mark 2026-10-16 00:14:01 +08:00
ZASENJC f5fab7ecde fix(release): preserve published releases after ambiguous API responses 2026-10-16 00:12:17 +08:00
ZASENJC a6d14bf5d3 design: tighten horizontal strokes in the monochrome E mark 2026-10-16 00:10:53 +08:00
ZASENJC 3e874c4c94 design: simplify logo to an E with an extended top stroke 2026-10-16 00:09:01 +08:00
ZASENJC 8d4628aeed refactor: separate native platforms and automate signed dual-platform releases 2026-10-16 00:05:02 +08:00
ZASENJC 8e14266c18 feat(windows): align native UI and manage built-in model service
Align the pure-Rust Windows translation, chat, settings, and toolbar design with macOS using shared Lucide icons. Fix hover and scrolling repaint artifacts, dropdown alignment, and native model download folder selection.

Persist manual service stops, cancel active built-in requests, and add confirmed cleanup of built-in models and managed runtime dependencies. Cover lifecycle behavior with Rust tests and add a native Windows repaint regression harness.

Validation: native Windows release build and installed UI verification; isolated Windows service lifecycle checks; six model manager tests; macOS cargo check; git diff --check.
2026-10-15 23:39:28 +08:00
ZASENJC d16722fdf4 feat: add native Windows app and OCR, remove legacy Tauri frontend 2026-10-15 20:29:44 +08:00
ZASENJC 46c2f3664b feat(ai,ui): add built-in HY-MT1.5-1.8B GGUF engine, unified settings UI, translation line spacing, and OCR newline toggle 2026-10-15 02:50:57 +08:00
ZASENJC e77b364750 feat(ai): support local MLX HY-MT1.5 prompt template, sampling params, and API key auth in LocalServer mode 2026-10-14 23:09:03 +08:00
ZASENJC d5de76938b feat(ui): share window dimensions between Translate and AI tabs, default opacity to 100%, and increase top bar margins 2026-10-14 22:53:53 +08:00
ZASENJC cbf0e1a4cc feat(ui): add left/right chat bubbles, history bar, and adaptive settings layout 2026-10-14 21:58:45 +08:00
ZASENJC 8c0140c45d fix(app): pass (source, target, text) in correct order to resolve_language_pair 2026-10-14 20:12:16 +08:00
ZASENJC cb605a5e8e feat(app): add per-pane draggable height splitters, min/max bounds, persistent layout memory, and pale color palette 2026-10-14 20:01:29 +08:00
ZASENJC 618fcc6239 feat(app): redesign pure-Rust AppKit UI into vertical 4-tier stacked layout 2026-10-14 19:36:36 +08:00
ZASENJC 2c47dfc79e refactor(storage): remove macOS Keychain runtime calls and persist config directly in 0600 settings.json 2026-10-14 19:17:38 +08:00
ZASENJC 0f04fefbcc feat: rewrite TTREE into 100% pure-Rust modular workspace with native AppKit UI, fast hedged translation, reliable OCR, and Ollama/LMStudio/GGUF AI backends 2026-10-14 19:07:43 +08:00
ZASENJC 902abb9159 release: prepare v0.1.3 2026-07-13 18:18:51 +08:00
ZASENJC 6dc1e25f26 feat: improve OCR language detection 2026-07-13 18:18:51 +08:00
ZASENJC 5ee697cadc feat: run macOS app from menu bar only 2026-07-12 18:30:07 +08:00
ZASENJC c9e7ca0f9d test: enforce menu bar only macOS mode 2026-07-12 18:29:36 +08:00
ZASENJC f18407e8ac release: prepare v0.1.2 2026-07-10 23:04:00 +08:00
ZASENJC 8021cb995f fix: parse real codesign requirement output 2026-07-10 23:01:45 +08:00
ZASENJC 9327333c2e test: reproduce real codesign requirement output 2026-07-10 23:00:51 +08:00
ZASENJC ca66b75208 release: prepare v0.1.1 2026-07-10 22:46:24 +08:00
ZASENJC a361ca01f7 chore: update CLAUDE.md and gitignore stale lock file
- CLAUDE.md: sync docs with current implementation (Bing engine, Keychain, chat history, updater)
- .gitignore: add .claude/scheduled_tasks.lock
2026-06-27 04:15:54 +08:00
33929c5cbe fix(ci): 为 universal 构建补装 x86_64 目标
macos-latest runner 默认只装 arm64 目标,universal-apple-darwin 需要
x86_64-apple-darwin 才能合体。显式 rustup target add 避免 "Target
x86_64-apple-darwin is not installed" 导致的构建失败。

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-27 02:36:01 +08:00
199241fcdb fix: release workflow 构建为 universal target 并轮换更新签名密钥
- release.yml: --target 由双架构改为 universal-apple-darwin
  (tauri build 仅接受单次 --target;universal 二进制原生支持 arm64 + x86_64)
- 轮换更新签名密钥(原密钥口令状态不明):
  - 生成带强口令的全新 minisign 密钥对,口令存入 macOS Keychain
  - TAURI_SIGNING_PRIVATE_KEY / PASSWORD 两个 CI secret 已更新
    (私钥需以 base64(完整密钥文件内容) 形式设置)
  - tauri.conf.json pubkey 同步为新公钥
- 本地已验证签名链路: 签名 → minisign 校验通过

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-27 02:30:07 +08:00
f4c2f921c1 feat: AI 对话历史、Keychain 凭据、应用内更新与外观打磨
凭据安全:
- API key 改存 macOS Keychain(security-framework),不再明文落盘 settings.json
- OpenAi/ChatAi 配置实现 Debug 脱敏,api_key 永不进入日志
- HTTP 客户端禁止跟随重定向(防 SSRF 二跳),base_url 校验 http(s) scheme
- IPC 对话载荷校验:角色白名单、单条 64KB、单次 200 条上限

对话历史(新增 history 模块):
- JSONL 追加写、永不重写,单行损坏容错、向后兼容旧格式
- 按 session_start 标记切分对话,摘要取首句用户提问
- 新增 load/append/clear/start_new 对应 Tauri 命令
- 前端 chatContext 截取最近 24 条上下文并丢弃孤儿 assistant 开场

应用内更新:
- 接入 tauri-plugin-updater + tauri-plugin-process
- 新增 update store:后台静默检查(≥7 天一次)、下载进度、自动重启
- 配套 CI release.yml(双架构构建 + 签名 + latest.json)与 signing-env.sh(口令取自 Keychain)

外观与窗口:
- 毛玻璃改用 Popover 材质 + 14px 圆角,面板透明度可调(持久化)
- 窗口默认宽度收窄至 480,尺寸调整后持久化、下次呼出沿用
- 前端整体视觉重做(tokens/global、Translate/Chat/Settings 面板、EngineTabs/LangSelector/ResultView)

测试:前端 26 项 + Rust 51 项全部通过

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-27 02:13:58 +08:00
7c73dabb81 feat: ttree 初始提交
轻量 macOS AI 翻译器(Tauri 2 + Svelte 5 + Rust):

- 三引擎翻译:谷歌 / 必应(免费网页端接口)+ OpenAI 兼容(SSE 流式)
- 截图 OCR(Apple Vision)、划词翻译/划词 AI(Accessibility)
- AI 多轮对话、双栏对照、固定窗口、自定义全局快捷键
- 系统托盘、开机自启、毛玻璃界面

工程加固:
- 修复流式译文中文跨 chunk 截断(字节缓冲 + memchr 按行解码)
- 全局复用 reqwest::Client 连接池,OpenAI/Google/Bing 加超时
- 截图临时文件加原子序号防并发覆盖
- 托盘图标 unwrap 改为优雅错误
- 收紧 Tauri CSP(default-src 'self' + 受控白名单)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-26 00:50:48 +08:00