TaskLite

by SunnyYYLin
5
4
3
2
1
Score: 52/100

Description

Reviews

No reviews yet.

Stats

0
stars
521
downloads
0
forks
108
days
3
days
3
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
202
commits

Latest Version

4 days ago

Changelog

TaskLite 0.5.0: Dual-Mode Syntax Standardization, Fallback Rendering & Core Concurrency Hardening

这是一个里程碑式(Major)架构升级版本,全面打通并标准化了 Dataview 与 Tasks 双模式语法,引入原生回退渲染引擎、单文件互斥写屏障与领域事件总线,彻底消灭高并发并发竞态并大幅提升库内响应速度。


🌟 核心亮点 (Highlights)

  1. 双模式语法全面收敛与标准化 (Dual-Mode Task Syntax)

    • 属性收敛:Dataview 行内字段统一并严格收敛为 recurrence、assignee、location、dependsOn。全面废除不一致别名,彻底统一 DQL 解析逻辑。
    • 平滑双向转换:支持在 Dataview 括号语法([field:: value])与 Tasks Emoji 语法(🔁 / 📍 / ⛔)之间无损互转与混用,并提供按库批量规范化命令 Normalize Vault Task Format。
  2. 原生 Dataview 回退渲染引擎 (Native Fallback Renderer)

    • 在未安装或关闭 Dataview 插件的环境中,TaskLite 自动接管并渲染漂亮的胶囊状行内字段徽标(InlineFieldWidget),无需重型外部插件依赖即可享受一致的美化体验。
  3. 单文件互斥锁与并发写屏障 (KeyedMutex Concurrency Hardening)

    • 核心 API 全面接入 KeyedMutex。针对同一文件的高频操作(如快速连击勾选子任务、批量编辑、父子级联完成)采用 Promise 互斥排队,从根源上杜绝读-改-写时序错位(Read-Modify-Write Race Condition)导致的丢任务问题。
  4. 跨插件领域事件总线 (Domain Event Bus)

    • 移除第三方插件对全局 vault.on("modify") 的低频轮询依赖。TaskLite 在任务写盘与状态变动后通过 Workspace 主动广播 tasklite:tasks-changed 领域事件,避免全库任意笔记输入惊醒看板重绘。
  5. DQL AST 语义化推断引擎 (DQL Semantic Analysis)

    • 暴露 isQueryExcludingCompleted(query) Core API。基于 DQL 抽象语法树进行严密的已完成任务语义推断(递归识别 status != "DONE"、status = "TODO"、is(todo)、NOT 逻辑与复合 AND/OR 条件),彻底淘汰易失效的字符串切片检测。
  6. 子树级联失效与缓存自愈 (Subtree Invalidation)

    • 增强文件夹删除与重命名监听。当整个文件夹发生移动或删除时,底层 taskDocumentStore 自动调用 forgetFolder 清理全部失效子树缓存,彻底杜绝僵尸任务残留。

🛠 缺陷修复与稳定性提升 (Bug Fixes & Refinements)

  • 级联落盘安全:合并并强化了 0.4.12 级联保存机制,修复 Frontmatter 文件级任务在自动级联完成时子任务未落盘的边缘缺陷。
  • 设备本地独立身份:配置的默认 Assignee 采用设备本地存储隔离,避免多端云同步 data.json 时相互覆盖个人身份。
  • 地点字段 📍 原生支持:支持 [location:: ...] 与 📍 双模式双向解析、建议自动补全与 DQL 过滤。
  • 100% 测试覆盖与官方合规:新增 1150+ 行边界单元测试(全量 156 项测试通过),严格遵循 eslint-plugin-obsidianmd 社区安全规范,0 错误 0 警告。

⚠️ 迁移指南 (Migration Notes)

  • 插件已保持向下兼容解析,但推荐在笔记和查询中统一使用标准化字段:
    • 循环任务:推荐 [recurrence:: ...](兼容 [recur:: ...])
    • 责任人:推荐 [assignee:: ...](兼容 [person:: ...])
    • 依赖关系:推荐 [dependsOn:: ...](兼容 [blockedBy:: ...])

README file from

Github

TaskLite

TaskLite is a lightweight, tree-aware Obsidian task plugin compatible with the Tasks plugin's emoji metadata format. It focuses on editing and rendering standard Markdown task lines.

Features

  • Tasks-compatible emoji metadata (dates, recurrence, priority, assignee, etc.)
  • Tree-aware toggling: finish/unfinish cascades to children and bubbles to parent
  • Recurring tasks with automatic next occurrence creation
  • Automatic done/cancelled dates
  • Live Preview checkbox interception
  • @ emoji input suggestions on task lines
  • Best-effort import of custom status settings from the Tasks plugin
  • External task reconciliation (detects checkbox changes from other plugins)
  • tasks: ignore frontmatter to exclude files from scanning

Task Line Format

- [ ] Task description ⏳ 2026-01-01 📅 2026-01-15 🔁 every week 👤 Mary

Supported Emoji Fields

Emoji Field Example
🔺 Priority: highest 🔺
⏫ Priority: high ⏫
🔼 Priority: medium 🔼
🔽 Priority: low 🔽
⏬ Priority: lowest ⏬
🛫 Start date 🛫 2026-01-01
➕ Created date ➕ 2026-01-01
⏳ Scheduled date ⏳ 2026-01-01
📅 Due date 📅 2026-01-15
✅ Done date ✅ 2026-01-10
❌ Cancelled date ❌ 2026-01-10
🔁 Recurrence 🔁 every week
🏁 On completion 🏁 delete
⛔ Depends on ⛔ task-id
🆔 Task ID 🆔 my-task
👤 Assignee 👤 Mary

Supported Recurrence Rules

  • every day, every week, every month, every year
  • every N days, every N weeks, every N months, every N years
  • every weekday
  • every week on Monday, every week on Friday
  • every month on the 1st
  • every day when done (recurrence relative to completion date)

Ignoring Files

Add tasks: ignore to a file's YAML frontmatter to exclude it from TaskLite scanning:

---
tasks: ignore
---

File-level Tasks (Frontmatter Tasks)

You can turn an entire file (like a project note or a daily note) into a single task. This is particularly useful for tracking high-level projects or notes that themselves represent a task.

To enable this, add task: true (or a status symbol) to the file's YAML frontmatter:

---
task: true
description: "Review quarterly roadmap"
status: " "
priority: "⏫"
due: "2026-06-30"
assignee: "Alice & Bob"
---
Supported Frontmatter Fields
  • task: Set to true (or any truthy value) to enable the file task.
  • status: The status symbol (e.g. " " for todo, "x" for done) or keywords (e.g., todo, done, in-progress, cancelled). Keywords are case-insensitive and format-preserving. Status symbols with spaces (like " ") should be quoted.
  • description: The task description. If omitted, the file's basename will be used.
  • priority: Task priority. Supports emoji (🔺, ⏫, 🔼, 🔽, ⏬) or keyword (highest, high, medium, low, lowest).
  • due / scheduled / start / created / done / cancelled: Dates in YYYY-MM-DD format.
  • recurrence: Recurrence rules (e.g., every week).
  • assignee / person: The person assigned (supports array or a single string with names separated by &).
  • onCompletion: On-completion actions (delete or keep).
  • id: Unique task ID.
  • dependsOn: Depends on task IDs.
Body Tasks Connection

Any root-level task lines (indented at depth 0, i.e. not indented under another list item) within the body of a file-task note are automatically treated as subtasks of the file task.

  • Toggling the status of a file task can cascade status changes to all list tasks in its body (depending on settings).
  • Completing all list tasks in the body can bubble up to automatically complete the file-level task (depending on settings).

Creating Tasks & Task Syntax

A task in TaskLite is a standard Markdown checklist item (e.g., - [ ]) followed by a description and metadata emojis.

Task Emojis & Fields

Append these emojis to your task description to add metadata:

  • 📅 Due Date: 📅 YYYY-MM-DD (e.g., 📅 2026-06-30)
  • ⏳ Scheduled Date: ⏳ YYYY-MM-DD (e.g., ⏳ 2026-06-25)
  • 🛫 Start Date: 🛫 YYYY-MM-DD (e.g., 🛫 2026-06-20)
  • ➕ Created Date: ➕ YYYY-MM-DD (automatically added upon creation)
  • 🔁 Recurrence: 🔁 <rule> (e.g., 🔁 every week, 🔁 every weekday, 🔁 every 2 days)
  • 👤 Assignee: 👤 <name> or 👤 <name1> & <name2> (e.g., 👤 Mary, 👤 Alice & Bob)
  • 🏁 On Completion: 🏁 delete or 🏁 keep (controls whether a recurring task is deleted/kept on completion)
  • 🆔 Task ID: 🆔 <id> (for task dependency identification)
  • ⛔ Depends On: ⛔ <id> (specifies parent/dependent tasks)
  • Priority: Add one of the following priority emojis at the end of the task line:
    • Highest: 🔺
    • High: ⏫
    • Medium: 🔼
    • Low: 🔽
    • Lowest: ⏬

Indentation and Subtasks (Tree Structure)

TaskLite is tree-aware. Simply indent your list items using tabs or spaces to create subtasks:

- [ ] Parent task
    - [ ] Subtask 1 (completes automatically when Parent task is finished)
    - [ ] Subtask 2

Quick Input with Emoji Auto-Suggest

When typing a task line, type @ to open the emoji auto-suggest menu, allowing you to quickly insert date placeholders, priority symbols, assignees, or recurring rules.

Commands

Command ID Description
Toggle task toggle-task Cycle through task states (todo → done → todo)
Toggle task cancellation toggle-task-cancellation Cycle through cancellation states
Cancel task cancel-task Mark task as cancelled
Uncancel task uncancel-task Restore cancelled task
Import status settings import-tasks-status-settings Import from Tasks plugin

Development

bun install          # Install dependencies
bun test             # Run tests
bun run build        # Production build (tsc + esbuild)
bun run dev          # Development mode (watch)
bun run lint         # ESLint check

Release

Push a tag matching x.y.z to trigger automatic GitHub release:

npm version patch    # Bumps version in manifest.json and versions.json
git push && git push --tags

License

MIT