From Task Progress Bar to Task Genius: Evolving a Task Management Tool从任务进度条到任务管理:一个任务管理工具的进化

As I mentioned in my Refactoring Plugins post, I've been working on improving my Obsidian plugins. I've now completely reimagined my popular Task Progress Bar plugin and evolved it into Task Genius. This transformation took just over twenty days of intense refining and represents not just a rebranding, but a fundamental shift in how tasks can be managed within Obsidian.

Why the Evolution?

While refactoring Task Progress Bar, I discovered several limitations that prompted a more comprehensive rethink:

  • Limited Task Status Support: The original plugin only recognized basic completed/uncompleted statuses, missing the nuanced workflow states many users needed
  • Inflexible Progress Visualization: Users wanted more control over how progress was displayed and calculated
  • Isolated Functionality: The plugin worked well for progress tracking but lacked integration with broader task management workflows
  • Rigid Implementation: The codebase wasn't modular enough to support the range of features users were requesting
  • Minimal Task Interactivity: Users wanted more ways to interact with and modify tasks directly

The evolution to Task Genius addresses these limitations while maintaining backward compatibility with the original plugin's core functionality.

Key Enhancements in Task Genius

Comprehensive Task Status Management

If the original Task Progress Bar was based on whether tasks were completed or not, Task Genius is now based on task statuses. It supports in-progress, planned, abandoned, and custom states, with theme support for statuses that's compatible with most features of the Tasks plugin.

The most significant evolution is the move from simple task completion to a rich task status ecosystem:

  • Customizable Task Statuses: Beyond just completed/uncompleted, Task Genius now supports in-progress, planned, abandoned, and custom states
  • Status Theming Support: Pre-defined status collections that align with popular task management systems. You can select status markers from themes like Minimal, Border, and others through a dropdown interface
  • Visual Status Indicators: Custom task marks that visually represent different statuses
    • For example, supporting TODO, IN-PROGRESS, DONE as task markers instead of the original checkbox
  • Task Status Switcher: Cycle through task states with a single click, such as switching from TODO to IN-PROGRESS to DONE
    • Fully compatible with all Obsidian commands
    • Support for child task status changes triggering parent task status changes
    • Keyboard shortcut support for task status switching

Below I'll showcase the Task Genius progress bar and task status switcher components:

Task Status Switching Demo

Task Genius supports multiple task statuses, not just completed/uncompleted. Click on the task below to cycle through different states:

TODO[ ]
Click me to switch task status

Here are examples of tasks with different initial states:

DOING[-]
Task in progress (Text marker)
DONE[x]
Completed task (Text marker)
[!]
Important task (Icon marker)
[/]
Cancelled task (Icon marker)

Task Progress Visualization Demo

Task Genius can display progress based on task statuses, including hierarchical parent-child task relationships:

In Obsidian, the progress bar follows the parent task, not the entire task module

TODO[ ]
Complete the Task Genius project
DONE[x]
Design the UI
DOING[-]
Implement core features
[ ]
Write documentation
[!]
Fix critical bugs
[/]
Add animations

Click on any task to cycle through states: TODO → DOING → DONE → IMPORTANT → CANCELLED

1 of 6 tasks completed (17%)
Done (1)
In Progress (1)
Todo (2)
Important (1)
Cancelled (1)

Advanced Progress Tracking

For progress visualization, I've made improvements in several areas:

  • Conditional Progress Bars: Show or hide progress bars based on tags, folders, or metadata
  • Customizable Progress Text: Define custom text for different percentage ranges
  • Heading-Level Progress: Track progress at both the task and heading levels
  • Hierarchical Task Relationships: Parent tasks can automatically update based on child task completion
  • Progress Bar Themes: Different task statuses use different color variables in the progress bar. For example, TODO tasks use the var(--color-todo) color variable
  • Style Settings Support: You can use the Style Settings plugin for fine-grained control over progress bar styling

Integrated Task Enhancement Tools

Beyond progress visualization, Task Genius now supports:

  • Task Status Switcher: Cycle through task states with a single click
  • Priority Management: Add and modify task priorities with keyboard shortcuts
  • Date Management: More conveniently manage dates for tasks, such as 2025-03-20
  • Smart Task Cycling: Configure how new tasks behave when first created

Technical Implementation Advances

The architectural improvements are just as significant as the feature enhancements:

  1. Modularized Codebase: Each feature exists in its own module for better maintainability and testing
  2. Improved Type Safety: Refactoring, refactoring, and more refactoring
  3. Performance Optimizations: Smarter rendering and update cycles to prevent crashes with complex task structures
  4. Enhanced Error Handling: Maximum compatibility when unexpected content is encountered

User-Driven Development

The transformation from Task Progress Bar to Task Genius was largely driven by user feedback and requests, but also partly self-driven:

  • Users wanted more granular control over which tasks were counted in progress calculations
  • Many requested ways to interact with tasks beyond just seeing progress
    • For example, automatically completing parent tasks

These needs and ideas prompted me to rethink how Task Progress Bar was implemented, eventually evolving into Task Genius.

Afterword

The journey from Task Progress Bar to Task Genius is also a key part of my recent refactoring work. I use Task Genius as a core GTD tool, combined with other plugins like Dataview, to implement a complete GTD workflow.

For current article and plugin updates, I rely on the Task Genius plugin for tracking. I hope you'll enjoy this new Task Genius plugin too! See you next time.

前段时间我有提及过我正在重构 Obsidian 插件,现在我已经完全重新构想且重构了我的广受欢迎的 Task Progress Bar(任务进度条) 插件,并将其在短短二十来天,打磨且发展成为 Task Genius。这次更名并不是单纯名称上的变更,而是Obsidian内任务管理方式的根本性转变。

为什么要重构?

在重构 Task Progress Bar 时,我发现了几个方面的限制,与此同时,某几个 issue 配合激发了我进行更全面重新思考:

  • 有限的任务状态支持:原始插件只识别基本的完成/未完成状态,无法满足许多用户需要的细致工作流状态
  • 不灵活的进度可视化:用户希望对进度的显示和计算方式有更多控制
  • 功能孤立:该插件在进度跟踪方面表现良好,但缺乏与更广泛任务管理工作流的集成
  • 僵化实现:代码库不够模块化,无法支持用户请求的各种功能
  • 最小的任务交互性:用户希望有更多方式直接与任务交互和修改

Task Genius 的更新解决了这些限制,同时保持了与原始插件核心功能的向后兼容性。

Task Genius 的主要改进

远比之前全面的任务状态管理

如果说原先的 Task Progress Bar 是基于任务的完成与否,那么 Task Genius 则是基于任务的状态。它支持进行中、计划中、放弃和自定义状态,并且支持状态主题支持,且适配了 Tasks 插件的大部份功能。

这次更新中,给 Task Progress Bar 带来了最显著的进化:从简单的任务完成的进度显示转向更全面的任务状态管理:

  • 可自定义的任务状态:除了完成/未完成外,Task Genius现在支持进行中、计划中、放弃和自定义状态
  • 状态主题支持:预定义的状态集合,与流行的任务管理系统保持一致,你可以通过下拉框直接选择来自 Minimal、Border 等主题的支持的对应的状态标记
  • 视觉状态指示器:直观展示不同状态的自定义任务标记
    • 例如支持以 TODO, IN-PROGRESS, DONE 等作为任务标记,而不是原始的方框
  • 任务状态切换器:通过单击循环切换任务状态,例如从 TODO 切换到 IN-PROGRESS,再切换到 DONE
    • 完全兼容 Obsidian 的所有命令
    • 支持子任务的状态变更触发父任务的状态变更
    • 支持任务状态的键盘快捷键切换

以下我会简单用组件来直接展示 Task Genius 的进度条,以及任务状态切换器:

任务状态切换器演示

Task Genius 支持多种任务状态,而不仅仅是完成/未完成。点击下面的任务来切换不同的状态:

TODO[ ]
点击我来切换任务状态

以下是不同初始状态的任务示例:

DOING[-]
正在进行中的任务 (Text marker)
DONE[x]
已完成的任务 (Text marker)
[!]
重要任务 (Icon marker)
[/]
已取消的任务 (Icon marker)

任务进度可视化演示

Task Genius 可以根据任务状态显示进度,包括层次化的父子任务关系:

在 Obsidian 中进度条会跟随在父任务的右侧,而不是整个任务模块的顶部

TODO[ ]
Complete the Task Genius project
DONE[x]
Design the UI
DOING[-]
Implement core features
[ ]
Write documentation
[!]
Fix critical bugs
[/]
Add animations

Click on any task to cycle through states: TODO → DOING → DONE → IMPORTANT → CANCELLED

1 of 6 tasks completed (17%)
Done (1)
In Progress (1)
Todo (2)
Important (1)
Cancelled (1)

完全可配置的进度可视化

进度可视化的重构,我主要做了以下几个方面的改进:

  • 条件进度条:基于标签、文件夹或元数据显示或隐藏进度条
  • 可自定义的进度文本:为不同的百分比范围定义自定义文本
  • 标题级进度:同时跟踪任务和标题级别的进度
  • 层次任务关系:父任务可以根据子任务完成情况自动更新
  • 进度条主题:不同状态的任务会使用不同的颜色变量来占据进度条,例如 TODO 任务会使用 var(--color-todo) 颜色变量来占据进度条
  • 支持 Style Settings:你可以通过 Style Settings 插件来更细粒度的控制进度条的样式

集成的任务增强工具

Task Genius 除了支持上述的进度可视化外,还支持以下功能:

  • 任务状态切换器:通过单击循环切换任务状态
  • 优先级管理:使用键盘快捷键添加和修改任务优先级
  • 日期管理:为任务更方便地管理日期,例如 2025-03-20 等
  • 智能任务循环:配置新任务首次创建时的行为

完全的技术重构

  1. 模块化代码库:每个功能存在于自己的模块中,以便更好地维护和测试
  2. 改进的类型安全:重构,重构,还是重构
  3. 性能优化:更智能的渲染和更新周期,避免在复杂任务结构下崩溃
  4. 增强的错误处理:当遇到意外内容时,会尽可能兼容

用户和自我驱动的开发

从 Task Progress Bar 到 Task Genius 的转变很大程度上是由用户反馈和请求驱动的,但是也有一部分是自我驱动的:

  • 用户希望对进度计算中计入哪些任务有更精细的控制
  • 一些人要求除了查看进度外还能与任务交互的方式
    • 例如自动完成父任务

这些需求和想法,促使我重新思考 Task Progress Bar 的实现方式,并最终演化成了 Task Genius。

后话

从 Task Progress Bar 到 Task Genius 的旅程,其实也是我近期的重构工作中的重要一环,我使用 Task Genius 作为核心的 GTD 工具,并结合了其他插件,例如 Dataview 等,来实施了完整的 GTD 工作流。

当前的文章、插件的更新,我都依赖于 Task Genius 插件来实现追踪。希望你也能喜欢这个新的 Task Genius 插件~再会。