Skip to content

feat: improve tm auto-update display#1444

Merged
Crunchyman-ralph merged 3 commits intonextfrom
ralph/feat/improve.tm.update.cli.display
Nov 25, 2025
Merged

feat: improve tm auto-update display#1444
Crunchyman-ralph merged 3 commits intonextfrom
ralph/feat/improve.tm.update.cli.display

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Nov 24, 2025

What type of PR is this?

  • 🐛 Bug fix
  • ✨ Feature
  • 🔌 Integration
  • 📝 Docs
  • 🧹 Refactor
  • Other:

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

  • Created changeset: npm run changeset
  • Tests pass: npm test
  • Format check passes: npm run format-check (or npm run format to fix)
  • Addressed CodeRabbit comments (if any)
  • Linked related issues (if any)
  • Manually tested the changes

Changelog Entry


For Maintainers

  • PR title follows conventional commits
  • Target branch correct
  • Labels added
  • Milestone assigned (if applicable)

Summary by CodeRabbit

Release Notes

  • Refactor

    • Reorganized auto-update system for improved code maintainability and clarity.
  • Dependencies

    • Added cli-progress library to enhance visual feedback during update installations.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Nov 24, 2025

⚠️ No Changeset found

Latest commit: 8e9694b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

Walkthrough

The PR refactors the monolithic auto-update utility from a single file into a modular structure with separate concerns. It replaces apps/cli/src/utils/auto-update.ts with a new apps/cli/src/utils/auto-update/ directory containing specialized modules for version management, changelog processing, update checking, display, tarball download with progress tracking, installation, and restart logic. The overall functionality remains equivalent while improving code organization.

Changes

Cohort / File(s) Summary
Package Configuration
apps/cli/package.json
Added cli-progress dependency and corresponding @types/cli-progress type definitions.
Auto-Update Module Refactoring
apps/cli/src/utils/auto-update.ts
Removed monolithic auto-update file containing version checking, changelog processing, installation, and restart logic.
Auto-Update Modular Structure
apps/cli/src/utils/auto-update/types.ts, version.ts, changelog.ts, check-update.ts, display.ts, download.ts, install.ts, restart.ts, index.ts
Created new modular structure: types.ts defines UpdateInfo and TarballInfo interfaces; version.ts handles version retrieval and comparison; changelog.ts fetches and parses changelog highlights; check-update.ts queries npm registry; display.ts renders upgrade notifications; download.ts implements tarball download with progress UI and formatting utilities; install.ts orchestrates multi-phase installation workflow with fallback to direct npm install; restart.ts spawns CLI restart; index.ts re-exports public API.
Public API Re-export Update
apps/cli/src/utils/index.ts
Updated auto-update re-export path from ./auto-update.js to ./auto-update/index.js; exported identifiers unchanged.
Test Import Refactoring
tests/unit/commands.test.js
Replaced dynamic imports with static imports for compareVersions, displayUpgradeNotification, and parseChangelogHighlights; removed per-suite dynamic import setup.

Sequence Diagram

sequenceDiagram
    participant User as CLI Process
    participant Check as checkForUpdate()
    participant Registry as npm Registry
    participant Changelog as fetchChangelogHighlights()
    participant Display as displayUpgradeNotification()
    participant Download as downloadTarballWithProgress()
    participant Install as installFromTarball()
    participant Restart as restartWithNewVersion()

    User->>Check: Check for update
    Check->>Registry: Query latest version
    Registry-->>Check: Return dist-tags.latest
    Check->>Check: Compare versions
    alt Update Available
        Check->>Changelog: Fetch changelog highlights
        Changelog-->>Check: Return highlights array
        Check-->>User: Return UpdateInfo (needsUpdate=true)
        User->>Display: Display upgrade notification
        Display-->>User: Show banner with highlights
        User->>Download: Download tarball
        Download-->>User: Stream with progress bar
        User->>Install: Install from tarball
        Install-->>User: Complete installation
        User->>Restart: Restart CLI process
        Restart->>Restart: Spawn new process
        Restart-->>User: Exit current process
    else No Update
        Check-->>User: Return UpdateInfo (needsUpdate=false)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas requiring extra attention:
    • apps/cli/src/utils/auto-update/download.ts — New implementation for tarball download with progress tracking, redirect handling, timeout enforcement (120s request, 10s fetch), and cleanup logic; verify error handling and progress bar behavior.
    • apps/cli/src/utils/auto-update/install.ts — Complex orchestration of multi-phase installation with npm output parsing, phase detection, progress calculation, and fallback flow; verify phase transitions and error propagation.
    • apps/cli/src/utils/auto-update/changelog.ts — Dynamic regex-based changelog parsing with version validation and bullet extraction; verify parsing logic against actual changelog format.
    • Module boundaries and re-export chain (index.tsutils/index.ts) — Confirm all public APIs are correctly exposed and no internal functions are leaked.

Possibly related PRs

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat: improve tm auto-update display' is vague and does not accurately reflect the comprehensive refactoring of the auto-update system from a monolithic module into a modular architecture with significant new functionality including tarball-based downloads and enhanced progress tracking. Consider a more specific title that captures the scope of changes, such as 'refactor: restructure auto-update into modular architecture with tarball downloads' or 'feat: refactor auto-update system with tarball download and progress improvements'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 94.74% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ralph/feat/improve.tm.update.cli.display

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49da445 and 8e9694b.

📒 Files selected for processing (2)
  • apps/cli/src/utils/auto-update/download.ts (1 hunks)
  • apps/cli/src/utils/auto-update/install.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
**/{utils,utilities,helpers}/**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/{utils,utilities,helpers}/**/*.{js,ts}: Document all parameters and return values in JSDoc format, include descriptions for complex logic, and add examples for non-obvious usage
Support multiple log levels (debug, info, warn, error) with appropriate icons for different log levels and respect the configured log level

Files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
**/{utils,utilities}/**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/{utils,utilities}/**/*.{js,ts}: Use try/catch blocks for all file operations and return null or a default value on failure rather than allowing exceptions to propagate unhandled
Log detailed error information using the log utility in catch blocks for file operations
Create utilities for consistent task ID handling that support different ID formats (numeric, string, dot notation)
Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results
Implement cycle detection using graph traversal by tracking visited nodes and recursion stack, returning specific information about cycles
Detect circular dependencies using DFS and validate task references before operations
Export all utility functions explicitly in logical groups and include configuration constants from utility modules
Do not use default exports in utility modules - use named exports only
Group related exports together in utility modules and avoid creating circular dependencies
Make the log function respect silent mode by skipping logging when silent mode is enabled

Files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
🧠 Learnings (17)
📓 Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.805Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.000Z
Learning: Pull Request descriptions must include: Task Overview, Subtasks Completed (checklist), Implementation Details, Testing approach, Breaking Changes (if any), and Related Tasks.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Integrate version checking in the runCLI function by starting the update check in the background, parsing commands, and displaying update notifications after command execution
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement semantic version comparison and display attractive update notifications using boxen.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-11-25T18:32:29.805Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.805Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:02:49.769Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.769Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:02:36.361Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.361Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: The Task Master CLI uses a modular architecture with distinct modules responsible for different aspects: commands.js (CLI command handling), task-manager.js (task data & core logic), dependency-manager.js (dependency management), ui.js (output formatting), ai-services-unified.js (unified AI service layer), config-manager.js (configuration management), utils.js (core utility functions), and mcp-server/ (MCP interface)

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Integrate version checking in the runCLI function by starting the update check in the background, parsing commands, and displaying update notifications after command execution

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/core/task-master-core.js : Update `task-master-core.js` by importing and re-exporting direct functions and adding them to the directFunctions map

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:02:36.361Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.361Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates using non-blocking checks that don't delay command execution, displaying notifications after command completion

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
🧬 Code graph analysis (2)
apps/cli/src/utils/auto-update/download.ts (1)
apps/cli/src/utils/auto-update/types.ts (1)
  • TarballInfo (12-15)
apps/cli/src/utils/auto-update/install.ts (1)
apps/cli/src/utils/auto-update/download.ts (2)
  • fetchTarballInfo (25-83)
  • downloadTarballWithProgress (88-213)
🔇 Additional comments (8)
apps/cli/src/utils/auto-update/download.ts (3)

16-20: LGTM!

The byte formatting logic is correct and handles the common cases appropriately.


25-83: LGTM!

The tarball info fetching logic is well-implemented with appropriate timeout, error handling, and validation. The 10-second timeout is reasonable for a registry query, and returning null on all error cases provides a clean fallback path.


88-213: Previous issue resolved - redirect limit now enforced.

The unbounded redirect recursion issue from the previous review has been properly addressed. The function now includes a maxRedirects parameter (default 5) with proper bounds checking and recursive decrement. The download implementation is robust with good progress feedback, error handling, timeout management, and cleanup on failures.

apps/cli/src/utils/auto-update/install.ts (5)

32-52: LGTM!

The phase detection logic appropriately maps npm output patterns to installation phases, with a safe fallback return value of -1 for unmatched output.


57-70: Previous issue resolved - bounds check now in place.

The out-of-bounds array access issue from the previous review has been properly addressed with a bounds check at lines 58-60. The function now safely handles invalid phaseIndex values by returning appropriate progress values (0 or 100).


75-240: LGTM!

The tarball installation implementation is well-designed with time-based fallback progress, proper resource cleanup (interval and tarball file), smart error filtering, and good user feedback. The progress animation that never goes backwards and caps at 95% within phases provides a polished user experience.


245-317: LGTM!

The fallback installation method provides a simpler but effective alternative with appropriate error handling and helpful user guidance for manual installation when needed.


322-381: LGTM!

The main update orchestration is well-structured with appropriate environment guards, graceful fallback mechanisms at each stage, and clear user communication. The flow from tarball-based installation to direct npm install fallback provides good resilience.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
apps/cli/src/utils/auto-update/download.ts (1)

166-176: Potential race condition between finish and error events.

The finish event on fileStream can fire even when the write stream encounters an error during the final flush. Calling fileStream.close() after finish is redundant since finish implies the stream is already closed, but more importantly, if both finish and error fire, resolve will be called twice.

Consider using a guard to ensure resolve is only called once:

+			let resolved = false;
+
 			fileStream.on('finish', () => {
+				if (resolved) return;
+				resolved = true;
 				if (totalSize > 0) {
 					progressBar.stop();
 				}
 				console.log(
 					chalk.green('✓') +
 						chalk.dim(` Downloaded ${formatBytes(downloadedSize)}`)
 				);
-				fileStream.close();
 				resolve(true);
 			});

 			fileStream.on('error', (err) => {
+				if (resolved) return;
+				resolved = true;
 				if (totalSize > 0) {
 					progressBar.stop();
 				}
apps/cli/src/utils/auto-update/install.ts (1)

187-222: Progress bar completes to 100% even on failure.

At line 191, progressBar.update(100, { phase: 'Complete' }) is called before checking the exit code. This means even on failure (code !== 0), the user briefly sees 100% complete before the error message.

Consider updating the final phase text based on success/failure:

 		installProcess.on('close', (code) => {
 			clearInterval(progressInterval);

-			// Complete the progress bar
-			progressBar.update(100, { phase: 'Complete' });
+			// Complete the progress bar with appropriate status
+			progressBar.update(100, { phase: code === 0 ? 'Complete' : 'Failed' });
 			progressBar.stop();
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0308a3e and 1a5ba8a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • apps/cli/package.json (1 hunks)
  • apps/cli/src/utils/auto-update.ts (0 hunks)
  • apps/cli/src/utils/auto-update/changelog.ts (1 hunks)
  • apps/cli/src/utils/auto-update/check-update.ts (1 hunks)
  • apps/cli/src/utils/auto-update/display.ts (1 hunks)
  • apps/cli/src/utils/auto-update/download.ts (1 hunks)
  • apps/cli/src/utils/auto-update/index.ts (1 hunks)
  • apps/cli/src/utils/auto-update/install.ts (1 hunks)
  • apps/cli/src/utils/auto-update/restart.ts (1 hunks)
  • apps/cli/src/utils/auto-update/types.ts (1 hunks)
  • apps/cli/src/utils/auto-update/version.ts (1 hunks)
  • apps/cli/src/utils/index.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/cli/src/utils/auto-update.ts
🧰 Additional context used
📓 Path-based instructions (7)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/types.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
**/{utils,utilities,helpers}/**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/{utils,utilities,helpers}/**/*.{js,ts}: Document all parameters and return values in JSDoc format, include descriptions for complex logic, and add examples for non-obvious usage
Support multiple log levels (debug, info, warn, error) with appropriate icons for different log levels and respect the configured log level

Files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/types.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/types.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
**/{utils,utilities}/**/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/{utils,utilities}/**/*.{js,ts}: Use try/catch blocks for all file operations and return null or a default value on failure rather than allowing exceptions to propagate unhandled
Log detailed error information using the log utility in catch blocks for file operations
Create utilities for consistent task ID handling that support different ID formats (numeric, string, dot notation)
Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results
Implement cycle detection using graph traversal by tracking visited nodes and recursion stack, returning specific information about cycles
Detect circular dependencies using DFS and validate task references before operations
Export all utility functions explicitly in logical groups and include configuration constants from utility modules
Do not use default exports in utility modules - use named exports only
Group related exports together in utility modules and avoid creating circular dependencies
Make the log function respect silent mode by skipping logging when silent mode is enabled

Files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/types.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/types.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/types.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
**/{utils,utilities}/*.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

Implement the silent mode control functions (enableSilentMode, disableSilentMode, isSilentMode) in utility modules and always use isSilentMode() to check current state

Files:

  • apps/cli/src/utils/index.ts
🧠 Learnings (50)
📓 Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.000Z
Learning: Pull Request descriptions must include: Task Overview, Subtasks Completed (checklist), Implementation Details, Testing approach, Breaking Changes (if any), and Related Tasks.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Integrate version checking in the runCLI function by starting the update check in the background, parsing commands, and displaying update notifications after command execution
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates using non-blocking checks that don't delay command execution, displaying notifications after command completion
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement semantic version comparison and display attractive update notifications using boxen.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Display attractive update notifications using boxen with clear messaging showing current and latest version, installation instructions, and feature highlights
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Display attractive update notifications using boxen with clear messaging showing current and latest version, installation instructions, and feature highlights

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/index.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement semantic version comparison and display attractive update notifications using boxen.

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/package.json
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T18:02:49.769Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.769Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates using non-blocking checks that don't delay command execution, displaying notifications after command completion

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T18:04:01.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.617Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
📚 Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/index.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Integrate version checking in the runCLI function by starting the update check in the background, parsing commands, and displaying update notifications after command execution

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/changelog.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
📚 Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
  • apps/cli/package.json
📚 Learning: 2025-11-24T18:04:01.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.617Z
Learning: Applies to scripts/modules/ui.js : Use chalk.blue for informational messages, chalk.green for success messages, chalk.yellow for warnings, chalk.red for errors, chalk.cyan for prompts and highlights, and chalk.magenta for subtask-related information

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Use boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions.

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
📚 Learning: 2025-11-24T18:04:01.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.617Z
Learning: Applies to scripts/modules/ui.js : Provide next step suggestions after command completion using a consistent format with a boxen container displaying suggested commands using chalk formatting

Applied to files:

  • apps/cli/src/utils/auto-update/display.ts
📚 Learning: 2025-11-24T18:00:06.781Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:06.781Z
Learning: Applies to scripts/modules/**/* : Restart the MCP server if core logic in `scripts/modules` or MCP tool definitions change

Applied to files:

  • apps/cli/src/utils/auto-update/restart.ts
📚 Learning: 2025-11-24T17:58:07.977Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.977Z
Learning: The Task Master CLI uses a modular architecture with distinct modules responsible for different aspects: commands.js (CLI command handling), task-manager.js (task data & core logic), dependency-manager.js (dependency management), ui.js (output formatting), ai-services-unified.js (unified AI service layer), config-manager.js (configuration management), utils.js (core utility functions), and mcp-server/ (MCP interface)

Applied to files:

  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration

Applied to files:

  • apps/cli/src/utils/auto-update/restart.ts
  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:05:02.103Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.103Z
Learning: Use the global CLI command `task-master` instead of `node scripts/dev.js` for all task management operations

Applied to files:

  • apps/cli/src/utils/auto-update/restart.ts
📚 Learning: 2025-11-24T18:00:32.587Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to changeset.mdc for guidelines on using Changesets (npm run changeset) to manage versioning and changelogs

Applied to files:

  • apps/cli/src/utils/auto-update/changelog.ts
📚 Learning: 2025-11-24T17:58:19.822Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-11-24T17:58:19.822Z
Learning: Run `npm run changeset` after staging a logical set of changes that should be communicated in the next release's `CHANGELOG.md` for new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or build/tooling changes

Applied to files:

  • apps/cli/src/utils/auto-update/changelog.ts
📚 Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/**/*.js : Process AI result responses using `cli-highlight` library to apply syntax highlighting to code blocks with language detection in the format ```language\ncode```

Applied to files:

  • apps/cli/src/utils/auto-update/changelog.ts
📚 Learning: 2025-08-02T14:54:52.216Z
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.

Applied to files:

  • apps/cli/src/utils/auto-update/changelog.ts
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/package.json
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/download.ts
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to mcp-server/src/core/task-master-core.js : Update `task-master-core.js` by importing and re-exporting direct functions and adding them to the directFunctions map

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T18:02:36.361Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.361Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/package.json
  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-09-26T19:03:33.225Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: package.json:130-132
Timestamp: 2025-09-26T19:03:33.225Z
Learning: In the eyaltoledano/claude-task-master repository, packages are bundled using tsdown during the build process, which means dependencies imported by the source code (including tm internal packages like tm/ai-sdk-provider-grok-cli) are included in the final bundle and don't need to be available as separate runtime dependencies, so they should remain as devDependencies rather than being moved to dependencies.

Applied to files:

  • apps/cli/src/utils/auto-update/install.ts
  • apps/cli/package.json
  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Implement semantic version comparison function that compares version strings and returns -1, 0, or 1 for version differences

Applied to files:

  • apps/cli/src/utils/auto-update/version.ts
📚 Learning: 2025-09-22T19:45:04.337Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.

Applied to files:

  • apps/cli/src/utils/auto-update/version.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Export all utility functions explicitly in logical groups and include configuration constants from utility modules

Applied to files:

  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Create utilities for consistent task ID handling that support different ID formats (numeric, string, dot notation)

Applied to files:

  • apps/cli/src/utils/auto-update/version.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Group related exports together in utility modules and avoid creating circular dependencies

Applied to files:

  • apps/cli/src/utils/auto-update/version.ts
  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Do not use default exports in utility modules - use named exports only

Applied to files:

  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-10-08T19:57:00.982Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1282
File: packages/tm-core/src/utils/index.ts:16-34
Timestamp: 2025-10-08T19:57:00.982Z
Learning: For the tm-core package in the eyaltoledano/claude-task-master repository, the team prefers a minimal, need-based export strategy in index files rather than exposing all internal utilities. Exports should only be added when functions are actually consumed by other packages in the monorepo.

Applied to files:

  • apps/cli/src/utils/index.ts
  • apps/cli/package.json
  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-11-24T17:57:31.390Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.390Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js, scripts/modules/ai-services-unified.js : Do not import or call anything from deprecated AI service files (`ai-services.js`, `ai-client-factory.js`, `ai-client-utils.js`)

Applied to files:

  • apps/cli/src/utils/index.ts
📚 Learning: 2025-11-24T17:58:47.001Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Export the registerCommands function along with setupCLI, runCLI, checkForUpdate, compareVersions, and displayUpgradeNotification functions

Applied to files:

  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-11-24T17:59:00.042Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.042Z
Learning: Applies to scripts/modules/utils/{contextGatherer,fuzzyTaskSearch}.js : Export utility modules using named exports: `ContextGatherer`, `createContextGatherer` from contextGatherer.js and `FuzzyTaskSearch`, `PURPOSE_CATEGORIES`, `RELEVANCE_THRESHOLDS` from fuzzyTaskSearch.js

Applied to files:

  • apps/cli/src/utils/index.ts
  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Track and report changes made during dependency cleanup

Applied to files:

  • apps/cli/package.json
📚 Learning: 2025-11-24T22:09:45.426Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.426Z
Learning: Applies to apps/cli/**/*.{spec,test}.ts : In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Applied to files:

  • apps/cli/package.json
📚 Learning: 2025-11-24T18:03:13.408Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.408Z
Learning: Applies to package.json : package.json scripts must include: 'test', 'test:watch', 'test:coverage', 'test:unit', 'test:integration', 'test:e2e', and 'test:ci' commands for testing framework integration

Applied to files:

  • apps/cli/package.json
📚 Learning: 2025-09-26T19:07:10.485Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:21-35
Timestamp: 2025-09-26T19:07:10.485Z
Learning: In the eyaltoledano/claude-task-master repository, the tsdown build configuration uses `noExternal: [/^tm\//]` which means internal tm/ packages are bundled into the final output while external npm dependencies remain external and are resolved from the root package.json dependencies at runtime. This eliminates the need for peer dependencies in internal packages since the root package.json already provides the required external dependencies.

Applied to files:

  • apps/cli/package.json
  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:03:46.699Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.699Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.

Applied to files:

  • apps/cli/package.json
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Place utilities used primarily by the core task-master CLI logic and command modules into scripts/modules/utils.js

Applied to files:

  • apps/cli/src/utils/auto-update/index.ts
📚 Learning: 2025-11-24T18:02:36.361Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.361Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:01:44.137Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.137Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/utils/auto-update/download.ts
📚 Learning: 2025-11-24T18:05:02.103Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.103Z
Learning: Update dependent tasks when implementation differs from original plan using `task-master update`

Applied to files:

  • apps/cli/src/utils/auto-update/check-update.ts
📚 Learning: 2025-11-24T18:04:43.949Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.949Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/utils/auto-update/check-update.ts
🧬 Code graph analysis (6)
apps/cli/src/utils/auto-update/restart.ts (2)
apps/cli/src/utils/auto-update/index.ts (1)
  • restartWithNewVersion (30-30)
apps/cli/src/utils/index.ts (1)
  • restartWithNewVersion (30-30)
apps/cli/src/utils/auto-update/changelog.ts (2)
jest.resolver.cjs (1)
  • resolve (3-3)
apps/cli/src/utils/auto-update/index.ts (1)
  • parseChangelogHighlights (18-18)
apps/cli/src/utils/auto-update/install.ts (1)
apps/cli/src/utils/auto-update/download.ts (2)
  • fetchTarballInfo (25-83)
  • downloadTarballWithProgress (88-201)
apps/cli/src/utils/auto-update/types.ts (1)
apps/cli/src/utils/auto-update/index.ts (2)
  • UpdateInfo (12-12)
  • TarballInfo (12-12)
apps/cli/src/utils/auto-update/download.ts (1)
apps/cli/src/utils/auto-update/types.ts (1)
  • TarballInfo (12-15)
apps/cli/src/utils/auto-update/check-update.ts (3)
apps/cli/src/utils/auto-update/types.ts (1)
  • UpdateInfo (5-10)
apps/cli/src/utils/auto-update/version.ts (2)
  • getCurrentVersion (10-20)
  • compareVersions (28-50)
apps/cli/src/utils/auto-update/changelog.ts (1)
  • fetchChangelogHighlights (10-56)
🪛 ast-grep (0.40.0)
apps/cli/src/utils/auto-update/changelog.ts

[warning] 72-75: Regular expression constructed from variable input detected. This can lead to Regular Expression Denial of Service (ReDoS) attacks if the variable contains malicious patterns. Use libraries like 'recheck' to validate regex safety or use static patterns.
Context: new RegExp(
## ${version.replace(/\./g, '\\.')}\\s*\\n,
'i'
)
Note: [CWE-1333] Inefficient Regular Expression Complexity [REFERENCES]
- https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS
- https://cwe.mitre.org/data/definitions/1333.html

(regexp-from-variable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Typecheck
🔇 Additional comments (19)
apps/cli/package.json (1)

29-29: LGTM!

The cli-progress dependency and corresponding type definitions are appropriately added to support the new progress bar functionality during tarball downloads in the auto-update workflow.

Also applies to: 37-37

apps/cli/src/utils/auto-update/types.ts (1)

1-15: LGTM!

The type definitions are clean and focused. UpdateInfo appropriately captures version comparison results with optional changelog highlights, and TarballInfo encapsulates tarball metadata for download operations.

apps/cli/src/utils/index.ts (1)

25-31: LGTM!

The import path correctly updated to reference the new modular auto-update structure while maintaining backward compatibility by preserving the same exported identifiers.

apps/cli/src/utils/auto-update/restart.ts (1)

14-42: LGTM!

The restart implementation correctly handles:

  • Argument stripping and forwarding
  • Seamless stdio inheritance for better UX
  • Windows platform compatibility via shell option
  • Proper exit code and signal propagation
  • Clear error messaging with fallback suggestions

The spawn of task-master assumes the global command is updated before this function is called, which aligns with the intended workflow where this is invoked after performAutoUpdate completes.

apps/cli/src/utils/auto-update/display.ts (1)

11-38: LGTM!

The display notification follows project conventions:

  • Uses boxen for important update messages with clear formatting
  • Applies appropriate chalk colors (blue for info, green for new version, cyan for highlights, yellow border)
  • Provides conditional "What's New:" section when highlights are available
  • Clean, user-friendly presentation

Based on learnings, this aligns with the preferred approach for attractive update notifications.

apps/cli/src/utils/auto-update/check-update.ts (1)

14-88: LGTM!

The update check implementation follows the non-blocking pattern from project guidelines:

  • All error paths gracefully resolve with needsUpdate: false rather than rejecting
  • 3000ms timeout prevents hanging
  • Fetches changelog highlights only when an update is available (efficient)
  • Silent error handling is appropriate for opportunistic background checks that shouldn't interrupt user workflow

Based on learnings, this correctly implements non-blocking version checks that don't delay command execution.

apps/cli/src/utils/auto-update/version.ts (2)

10-20: LGTM!

The version retrieval correctly reads from the build-time injected TM_PUBLIC_VERSION environment variable with an appropriate fallback to '0.0.0' when unavailable, logging a warning for development visibility.


28-50: LGTM!

The semantic version comparison correctly implements:

  • Numeric part comparison with proper zero-padding for different lengths
  • Pre-release precedence rules (pre-release < release per semver)
  • Basic pre-release tie-breaking via string comparison

The comment at line 49 appropriately acknowledges the simplified "basic prerelease tie-break" approach. For CLI auto-update purposes, this simplified pre-release comparison is acceptable and avoids the complexity of full semver pre-release identifier parsing.

apps/cli/src/utils/auto-update/index.ts (1)

1-30: LGTM!

The index file provides a clean, well-organized public API entry point:

  • Logical grouping by functionality (types, version, changelog, checking, display, install, restart)
  • Clear section comments documenting purpose
  • Uses named exports only (no default exports) per guidelines
  • Appropriate use of export type for TypeScript types
  • Comment explaining parseChangelogHighlights is exported for testing is helpful
  • All imports use .js extension for ESM compatibility

The export surface aligns with the consumption points in apps/cli/src/utils/index.ts while appropriately exposing types and testing utilities. Based on learnings, this follows the minimal, need-based export strategy.

apps/cli/src/utils/auto-update/changelog.ts (2)

10-56: LGTM - Well-structured network request with proper error handling.

The function correctly handles non-200 responses, request errors, and timeouts. Silent failure (returning []) is appropriate for a non-critical feature like changelog highlights.


66-76: ReDoS mitigation is correctly implemented.

The static analysis tool flagged the new RegExp() at lines 73-76 as a potential ReDoS vector. However, the version string is validated at line 68 with a strict semver pattern before being used in the regex construction. This validation ensures only safe characters (digits, dots, hyphens, alphanumerics) reach the dynamic regex, effectively mitigating the ReDoS risk.

apps/cli/src/utils/auto-update/download.ts (2)

16-20: LGTM - Clean byte formatting utility.

The function handles the common cases (B, KB, MB) appropriately for typical tarball sizes.


25-83: LGTM - Registry query with proper timeout and error handling.

The function correctly handles non-200 responses, parse errors, missing tarball URL, network errors, and enforces a 10-second timeout. Returning null on failure allows callers to implement fallback logic.

apps/cli/src/utils/auto-update/install.ts (6)

17-28: LGTM - Clear phase-based progress model.

The weighted phases provide a reasonable estimation framework for the npm installation process.


32-52: LGTM - Reasonable phase detection heuristics.

The keyword-based parsing of npm output is a practical approach for progress estimation, and returning -1 for unknown output prevents false progress updates.


72-140: LGTM - Progress bar with smooth animation and phase tracking.

The time-based fallback estimation when npm is silent is a nice UX touch. The interval-based animation ensures the progress bar remains responsive.


142-149: Tarball path is safely constructed - no command injection risk.

The tarballPath originates from os.tmpdir() and a constructed filename with only the version string (already validated upstream). The spawn call with array arguments (not shell string) prevents command injection.


240-312: LGTM - Clean fallback implementation with spinner feedback.

The direct npm install path provides good user feedback and helpful manual instructions on failure.


317-376: LGTM - Well-structured main entry point with appropriate skip conditions.

The environment variable checks for CI, test mode, and explicit skip flag are appropriate. The fallback chain (tarball → direct npm) provides resilience.

Comment on lines +103 to +111
// Extract all bullet points (lines starting with -)
// Format: - [#PR](...) Thanks [@author]! - Description
const bulletRegex = /^-\s+\[#\d+\][^\n]*?!\s+-\s+(.+?)$/gm;
let match;

while ((match = bulletRegex.exec(minorChangesContent)) !== null) {
const desc = match[1].trim();
highlights.push(desc);
}
Copy link
Contributor

@coderabbitai coderabbitai bot Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Bullet regex may miss changelog entries with different formats.

The regex ^-\s+\[#\d+\][^\n]*?!\s+-\s+ expects a specific format: - [#PR](...) Thanks [@author]! - Description. If the CHANGELOG uses a slightly different format (e.g., missing the "Thanks" acknowledgement or different punctuation), entries will be silently skipped.

Consider whether this strict format is intentional or if a more flexible pattern would be beneficial. For now, returning an empty array on mismatch is a safe fallback.


🌐 Web query:

What is the format of changeset-generated CHANGELOG.md entries?

💡 Result:

Changesets’ default changelog entries are grouped by release (version + date) and by importance (Major/Minor/Patch). Each release block looks like:

x.y.z (YYYY-MM-DD)

Minor

  • :

Patch

  • :

(Internally Changesets uses getReleaseLine/getDependencyReleaseLine functions to produce that format; earlier formats used “[patch] …” list items but were changed to the ordered Major/Minor/Patch headings shown above.) [1][2]

Sources:
[1] changesets changelog format change (example output).
[2] Changesets config docs (changelog/getReleaseLine).


Update regex to match changeset-generated changelog format.

The regex pattern is incompatible with standard changeset output. Changesets generates changelog entries as - <commit-or-PR>: <first line of changeset summary>, but the regex expects - [#PR](...) Thanks [@author]! - Description. The pattern includes !\s+-\s+ which matches the "Thanks [@author]! -" structure that doesn't appear in changeset-generated changelogs.

Update the regex at lines 106-107 to match the actual format: ^-\s+(.+?):\s+(.+?)$/gm or similar, extracting the description appropriately for this format.

🤖 Prompt for AI Agents
In apps/cli/src/utils/auto-update/changelog.ts around lines 103 to 111, the
existing bulletRegex expects a GitHub PR/author "Thanks" pattern and fails for
changeset-generated entries; replace it with a pattern that matches changeset
format like "- <commit-or-PR>: <summary>" and capture the summary (e.g. use a
regex equivalent to ^-\s+(.+?):\s+(.+?)$ with the second capture group used as
the description), then update the loop to push the captured summary (trimmed)
into highlights.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current regex is correct for this project's changelog format. No change is needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crunchyman-ralph, understood! Thank you for clarifying that the regex pattern matches your project's specific changelog format. I'll note this for future reference.


✏️ Learnings added
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.805Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.587Z
Learning: Refer to changeset.mdc for guidelines on using Changesets (npm run changeset) to manage versioning and changelogs

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1035
File: .changeset/quiet-rabbits-bathe.md:5-10
Timestamp: 2025-07-23T16:03:42.784Z
Learning: For changeset files (.changeset/*.md), avoid suggesting punctuation for bullet points as the project intentionally omits punctuation to make the generated changelog feel more natural.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1091
File: .changeset/wide-actors-report.md:0-0
Timestamp: 2025-08-06T21:14:23.071Z
Learning: For changeset files (.changeset/*.md), the first line after the frontmatter must be a plain, unstyled summary line that gets integrated directly into the changelog. Do not add markdown headings or styling as this would interfere with the changelog generation process. Ignore markdownlint MD041 rule for these files.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1285
File: .changeset/nice-ways-hope.md:5-17
Timestamp: 2025-10-08T12:21:14.455Z
Learning: For changeset files (.changeset/*.md): The first line should be concise and in imperative mood, but the body after the first line can include as many user-facing details as desired (bullets, explanations, links, etc.) to provide context for the CHANGELOG.md.

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-11-24T17:58:19.822Z
Learning: Distinguish between changeset summaries (concise, user-facing, for `CHANGELOG.md`) and Git commit messages (detailed, developer-facing, explaining context and implementation)

Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-11-24T17:58:19.822Z
Learning: Run `npm run changeset` after staging a logical set of changes that should be communicated in the next release's `CHANGELOG.md` for new features, bug fixes, breaking changes, performance improvements, significant refactoring, user-facing documentation updates, dependency updates, or build/tooling changes

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/changeset.mdc:0-0
Timestamp: 2025-11-24T17:58:19.822Z
Learning: Provide a concise, single-line changeset summary in imperative mood (e.g., 'Add feature X', 'Fix bug Y') that describes what changed from a user/consumer perspective, not implementation details

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Implement version checking to notify users of available updates, use non-blocking version checks, and display update notifications after command completion.

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Track and report changes made during dependency cleanup

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.001Z
Learning: Applies to scripts/modules/commands.js : Integrate version checking in the runCLI function by starting the update check in the background, parsing commands, and displaying update notifications after command execution

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.769Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.

Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.

Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.000Z
Learning: Pull Request descriptions must include: Task Overview, Subtasks Completed (checklist), Implementation Details, Testing approach, Breaking Changes (if any), and Related Tasks.

@Crunchyman-ralph Crunchyman-ralph force-pushed the ralph/feat/improve.tm.update.cli.display branch from 1a5ba8a to a1a3ec3 Compare November 25, 2025 17:33
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
apps/cli/src/utils/auto-update/changelog.ts (1)

103-111: Fix changelog parsing regex to match changeset format.

The regex pattern at lines 105-106 expects - [#PR](...) Thanks [@author]! - Description, but changesets generates entries as - <commit-or-PR>: <summary>. The current pattern will fail to extract highlights from the actual changelog format.

Update the regex to match the changeset format:

-		// Extract all bullet points (lines starting with -)
-		// Format: - [#PR](...) Thanks [@author]! - Description
-		const bulletRegex = /^-\s+\[#\d+\][^\n]*?!\s+-\s+(.+?)$/gm;
+		// Extract all bullet points (lines starting with -)
+		// Format: - <commit-or-PR>: <summary>
+		const bulletRegex = /^-\s+.+?:\s+(.+?)$/gm;
apps/cli/src/utils/auto-update/download.ts (1)

105-117: Unbounded redirect recursion could cause stack overflow.

This issue was previously flagged. The recursive redirect handling at lines 110-113 has no depth limit.

apps/cli/src/utils/auto-update/install.ts (1)

57-67: Potential out-of-bounds access when phaseIndex is -1 or exceeds array length.

This issue was previously flagged. parseNpmPhaseIndex can return -1, and if passed to calculateProgress, accessing INSTALL_PHASES[phaseIndex] will throw. The callers at lines 131, 159, 177 should guard against -1, or calculateProgress should handle invalid indices.

🧹 Nitpick comments (5)
apps/mcp/tests/integration/tools/generate.tool.test.ts (1)

1-199: Comprehensive integration test suite for generate MCP tool.

The test suite correctly:

  • Uses real MCP framework via inspector CLI (aligns with integration test guidelines)
  • Provides good test isolation with temporary directories
  • Covers key scenarios: basic generation, counts, tag handling, orphaned files, custom output
  • Uses proper fixture utilities from @tm/core/testing
  • Includes appropriate timeouts (15s) for integration tests
  • Verifies both MCP response format and actual file creation

Based on learnings, MCP integration tests should use real MCP framework to test response formatting, which this suite does well.

Minor optional improvement:

Consider adding error handling to the callMCPTool helper (lines 68-82) to provide clearer test failure messages when MCP invocation fails.

 const callMCPTool = (toolName: string, args: Record<string, any>): any => {
 	const toolArgs = Object.entries(args)
 		.map(([key, value]) => `--tool-arg ${key}=${value}`)
 		.join(' ');
 
-	const output = execSync(
-		`npx @modelcontextprotocol/inspector --cli node "${mcpServerPath}" --method tools/call --tool-name ${toolName} ${toolArgs}`,
-		{ encoding: 'utf-8', stdio: 'pipe' }
-	);
+	try {
+		const output = execSync(
+			`npx @modelcontextprotocol/inspector --cli node "${mcpServerPath}" --method tools/call --tool-name ${toolName} ${toolArgs}`,
+			{ encoding: 'utf-8', stdio: 'pipe' }
+		);
+		
+		// Parse the MCP protocol response: { content: [{ type: "text", text: "<json>" }] }
+		const mcpResponse = JSON.parse(output);
+		const resultText = mcpResponse.content[0].text;
+		return JSON.parse(resultText);
+	} catch (error: any) {
+		throw new Error(`MCP tool invocation failed: ${error.message}\nStderr: ${error.stderr}`);
+	}
-
-	// Parse the MCP protocol response: { content: [{ type: "text", text: "<json>" }] }
-	const mcpResponse = JSON.parse(output);
-	const resultText = mcpResponse.content[0].text;
-	return JSON.parse(resultText);
 };
apps/cli/tests/integration/commands/generate.command.test.ts (1)

65-79: Good error handling in runGenerate, but consider combining stdout and stderr.

The helper captures output from error.stderr or error.stdout, but some CLI tools output to both on failure. Consider capturing both:

 } catch (error: any) {
   return {
-    output: error.stderr?.toString() || error.stdout?.toString() || '',
+    output: (error.stdout?.toString() || '') + (error.stderr?.toString() || ''),
     exitCode: error.status || 1
   };
 }
apps/cli/src/utils/auto-update/download.ts (1)

166-176: Potential race: fileStream.close() called after resolve(true).

fileStream.close() is called after resolve(true), but the order suggests the promise resolves before the file handle is fully released. While typically safe, it's cleaner to close before resolving:

 fileStream.on('finish', () => {
   if (totalSize > 0) {
     progressBar.stop();
   }
+  fileStream.close(() => {
     console.log(
       chalk.green('✓') +
         chalk.dim(` Downloaded ${formatBytes(downloadedSize)}`)
     );
-  fileStream.close();
-  resolve(true);
+    resolve(true);
+  });
 });
apps/cli/src/utils/auto-update/install.ts (1)

187-195: Tarball cleanup on success should verify file exists first.

The fs.unlink call at line 195 doesn't check if the file exists, though this is typically safe since the callback ignores errors. For consistency with error handlers:

-      fs.unlink(tarballPath, () => {});
+      if (fs.existsSync(tarballPath)) {
+        fs.unlink(tarballPath, () => {});
+      }

This is a minor defensive improvement.

packages/tm-core/src/modules/tasks/services/task-file-generator.service.ts (1)

197-207: Consider using Promise.allSettled for consistency with file generation.

The Promise.all on line 198 will short-circuit on the first failed deletion, potentially leaving some orphaned files undeleted. While the outer catch handles this gracefully, using Promise.allSettled would be more consistent with the parallel file generation approach and ensure all deletion attempts are made.

-			await Promise.all(
+			const results = await Promise.allSettled(
 				filesToRemove.map(async (file) => {
 					const filePath = path.join(outputDir, file);
 					await fs.unlink(filePath);
 				})
 			);
-			removedCount = filesToRemove.length;
+			removedCount = results.filter(r => r.status === 'fulfilled').length;

@Crunchyman-ralph Crunchyman-ralph changed the base branch from main to next November 25, 2025 18:28
@Crunchyman-ralph Crunchyman-ralph merged commit 77b3b77 into next Nov 25, 2025
9 checks passed
@Crunchyman-ralph Crunchyman-ralph deleted the ralph/feat/improve.tm.update.cli.display branch November 25, 2025 20:27
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant