$ show fabiospampinato/vscode-todo-plus
This repository is a VS Code extension that provides a rich, configurable todo list system using a custom plain-text format (.todo, .todos, .task, etc.). It enables users to create, edit, toggle states (box, done, cancelled), archive tasks, track time with a timer, generate project statistics, and scan embedded todos within code files using external search tools (ag, rg). The extension contributes two custom activity bar views (Files and Embedded) and status bar items, all driven by a comprehensive configuration system for symbols, colors, tags, and formatting. The architecture follows a modular design with a clear separation of concerns: document parsing into typed items (Todo, Project, Comment, Tag, etc.), decorator classes for syntax highlighting, utility modules for file operations, time formatting, statistics computation, and embedded code scanning. The item classes form a clean class hierarchy with static `is()` methods for identification and state manipulation methods. The embedded providers abstract over multiple search backends (JavaScript, ag, rg) with a common interface, and the base TreeDataProvider uses an event emitter pattern to notify view updates. The extension is written in TypeScript, bundled with webpack, and relies on several utility libraries (lodash, moment, micromatch, etc.). While the codebase demonstrates solid engineering practicesβreusable components, consistent naming, and a config-driven designβit has notable maintenance risks: heavy reliance on complex regexes for parsing, a moderately large dependency list, and no visible test infrastructure (no test files found in the file tree). The changelog mentions regressions and a fundraising prompt, indicating limited maintenance bandwidth. Overall, it is a functional and feature-rich extension that does its job well, but its internal complexity and lack of tests could hinder long-term reliability.
The LLM identified 4 files worth highlighting for reuse:
Base class for all todo document items (Todo, Project, Comment, Tag, etc.). Defines a common interface with static `is()` methods for type checking and instance methods for state transitions (e.g., toggle, archive). This hierarchy is well-isolated and could be extracted to represent any structured plain-text data model in other editors or tools.
A token class that lazily computes and caches statistical values (percentages, estimates, elapsed times) using memoized getters. Demonstrates a clean pattern for deferred computation in data-heavy views, reusable for any dashboard or reporting feature that needs efficient recomputation on data changes.
Base TreeDataProvider implementation using an onDidChangeTreeData event emitter. Provides a template for building custom tree views in VS Code with minimal boilerplate. The pattern is generic enough to be reused in any extension that requires a dynamic tree view with refresh capabilities.
Abstract base class for embedded code todo providers. Defines a consistent interface (initFilesData, updateFilesData, getTodos) and encapsulates file scanning logic. Concrete implementations (JS, AG, RG) override search methods, making this a textbook example of the Template Method pattern for supporting multiple backends without coupling.