github lifedever/TaskTick v1.8.3
TaskTick v1.8.3

4 hours ago

What's Changed

🐛 Bug Fixes

  • #28 UI freeze with high-output scripts — Running scripts that emit heavy log streams (npm run dev + Spring Boot dual-streaming) no longer pegs the main thread and freezes the UI. Replaced the per-chunk O(N) string concatenation in LiveOutputManager with an O(1) line buffer; pipe I/O is now coalesced at 50ms before crossing to the main thread; the log viewer renders via NSTextView (TextKit fragmented layout) instead of SwiftUI Text, which choked on the 512KB ceiling. Sample shows main-thread time in the live-output pipeline went from 97% → 0%.
  • "0秒后" stuck in task rows — Task list, Quick Launcher, and log rows no longer freeze on "0秒后" / "in 0 seconds" after a task completes. The relative-time formatter quantizes |diff| < 1s to "0秒后" in zh-Hans, and SwiftUI didn't auto-refresh the row. Added TimelineView and a "just now" / "刚刚" short-circuit; rows now tick every minute.
  • Log truncation now keeps the suffix instead of prefix — When stdout/stderr exceeds 512KB, the last 256KB is kept (with the stack trace and exit reason) rather than the first 256KB. For build/start scripts this is the part you actually need.

✨ New Features

  • tasktick create CLI command — Create tasks from a script file via the command line:
    tasktick create "stress test" --script /path/to/script.sh --manual
    tasktick create "daily backup" --script ~/scripts/backup.sh --repeat daily --at 08:00
    Supports --shell, --cwd, --timeout, --manual, --repeat, --at, --no-enable, --json. The GUI owns the SwiftData write — CLI generates the UUID and posts a cli.create notification, then polls the read-only store to confirm.

🔧 Internal

  • New IOBatcher (per-task pipe coalescer) and LogTextView (NSTextView wrapper for virtualized rendering).
  • 12 new unit tests covering LineBuffer edge cases (CR / CRLF, amortized trim, pending overflow). All 23 tests pass.

更新内容

🐛 Bug 修复

  • #28 大量日志输出会卡死 UI — 跑日志输出量大的脚本(比如 npm run dev + Spring Boot 同时输出)不再把主线程占满、界面卡死。重写了 LiveOutputManager:用 O(1) 行缓冲替代之前每个 chunk 都做 O(N) 字符串拼接和截断;I/O 在 50ms 窗口内合批后再切到主线程;日志查看器从 SwiftUI Text(500KB 字符串撑不住)换成了 NSTextView(TextKit 分片布局)。采样显示主线程在 live output 链路上的占用 从 97% 降到 0%
  • 任务列表卡在"0秒后" — 任务列表、Quick Launcher、日志行不再卡死在 "0秒后" 上。系统的相对时间格式化器在中文 short 风格下,会把 |diff| < 1秒 量化成 "0秒后",而 SwiftUI 任务完成后不会自动重画那一行。加了 TimelineView + "刚刚" 短路逻辑,每分钟自动 tick 一次。
  • 日志截断改为保留末尾而不是开头 — stdout/stderr 超过 512KB 时保留最后 256KB(错误堆栈和退出原因都在那),而不是开头那 256KB。对于编译/启动脚本来说,结尾才是你真正需要的部分。

✨ 新功能

  • tasktick create CLI 命令 — 从命令行直接创建任务:
    tasktick create "stress test" --script /path/to/script.sh --manual
    tasktick create "daily backup" --script ~/scripts/backup.sh --repeat daily --at 08:00
    支持 --shell--cwd--timeout--manual--repeat--at--no-enable--json。CLI 只生成 UUID 并发送 cli.create 通知,由 GUI 负责实际写入 SwiftData,避免多进程写库竞争。

🔧 内部改进

  • 新增 IOBatcher(每任务一个的管道合批器)和 LogTextView(NSTextView wrapper,虚拟化渲染)。
  • 12 个新单测覆盖 LineBuffer 边界情况(CR / CRLF、amortized trim、pending 溢出等),全部 23 个测试通过。

Full Changelog: v1.8.2...v1.8.3

Don't miss a new TaskTick release

NewReleases is sending notifications on new releases.