Skip to content

Ralph/feat/implement.new.update task#1214

Merged
Crunchyman-ralph merged 3 commits intonextfrom
ralph/feat/implement.new.update-task
Sep 17, 2025
Merged

Ralph/feat/implement.new.update task#1214
Crunchyman-ralph merged 3 commits intonextfrom
ralph/feat/implement.new.update-task

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Sep 17, 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

  • New Features

    • Added a CLI command to update task status (supports single or multiple IDs, validated statuses, optional project selection).
    • Outputs results in text (with colored statuses) or JSON, with clear per-task error handling.
  • Refactor

    • Consolidated status update handling to a shared command across CLI tooling for consistent behavior.
  • Chores

    • Updated extension version metadata.
    • Simplified development script to a generic watch command.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new CLI set-status command and wires it into the scripts and CLI exports. Extends core to support updating task status, including new service and storage methods, repository update logic, and mapper visibility. Adjusts dev script watching, bumps extension version, and relaxes API storage tag gating.

Changes

Cohort / File(s) Summary of changes
CLI: set-status command module
apps/cli/src/commands/set-status.command.ts
New command implementing set-status with validation, multi-ID handling, rendering (text/JSON), and integration helpers; invokes core updateTaskStatus and tracks last result.
CLI exports
apps/cli/src/index.ts
Re-exports SetStatusCommand from the new command module.
Scripts wiring to @tm/cli
scripts/modules/commands.js
Replaces local set-status wiring with SetStatusCommand from @tm/cli; removes dependency on local setTaskStatus.
Core service and facade: update status
packages/tm-core/src/task-master-core.ts, packages/tm-core/src/services/task-service.ts
Adds TaskMasterCore.updateTaskStatus delegating to TaskService.updateTaskStatus; service loads current task, validates, updates status, and returns structured result.
Storage interface and file storage
packages/tm-core/src/interfaces/storage.interface.ts, packages/tm-core/src/storage/file-storage/file-storage.ts
Adds IStorage/BaseStorage.loadTask API; implements loadTask in FileStorage via loadTasks(tag) and ID match.
API storage behavior
packages/tm-core/src/storage/api-storage.ts
Removes tag-based gating in getTask; always fetches from repository; minor formatting in updateTask.
Supabase task repository
packages/tm-core/src/repositories/supabase-task-repository.ts
Changes getTask to use brief context; adds updateTask with Zod validation and DB status mapping; returns mapped Task with relations.
Mapper visibility
packages/tm-core/src/mappers/TaskMapper.ts
Makes mapStatus public static (was private).
Tooling: dev script
package.json
Simplifies dev script to generic tsdown --watch.
Extension version
apps/extension/package.json
Version changed from 0.25.0-rc.0 to 0.24.2.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CLI as CLI SetStatusCommand
  participant Core as TaskMasterCore
  participant Service as TaskService
  participant Storage as Storage (Api/File)
  participant Repo as Task Repository (Supabase)

  User->>CLI: set-status -i <id[,ids]> -s <status> [-p project] [--format]
  CLI->>Core: updateTaskStatus(taskId, status, tag?)
  Core->>Service: updateTaskStatus(taskId, status, tag?)
  Service->>Storage: loadTask(taskId, tag?)  %% to capture oldStatus
  alt task found
    Storage->>Repo: getTask(context.briefId, display_id)
    Repo-->>Storage: Task | null
    Storage-->>Service: Task
    Service->>Storage: updateTask({ id, status })
    Storage->>Repo: updateTask(context.briefId, display_id, updates)
    Repo-->>Storage: Updated Task
    Storage-->>Service: Updated Task
    Service-->>Core: { success, oldStatus, newStatus, taskId }
    Core-->>CLI: result
    CLI-->>User: Render text/JSON per ID
  else not found / error
    Service-->>Core: error (TASK_NOT_FOUND/other)
    Core-->>CLI: error
    CLI-->>User: per-ID error output
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • eyaltoledano
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ralph/feat/implement.new.update-task

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 137ef36 and 0d0db63.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • apps/cli/src/commands/set-status.command.ts (1 hunks)
  • apps/cli/src/index.ts (1 hunks)
  • apps/extension/package.json (1 hunks)
  • package.json (1 hunks)
  • packages/tm-core/src/interfaces/storage.interface.ts (2 hunks)
  • packages/tm-core/src/mappers/TaskMapper.ts (1 hunks)
  • packages/tm-core/src/repositories/supabase-task-repository.ts (3 hunks)
  • packages/tm-core/src/services/task-service.ts (1 hunks)
  • packages/tm-core/src/storage/api-storage.ts (1 hunks)
  • packages/tm-core/src/storage/file-storage/file-storage.ts (1 hunks)
  • packages/tm-core/src/task-master-core.ts (1 hunks)
  • scripts/modules/commands.js (2 hunks)

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

@changeset-bot
Copy link

changeset-bot bot commented Sep 17, 2025

⚠️ No Changeset found

Latest commit: 0d0db63

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

@Crunchyman-ralph Crunchyman-ralph merged commit 170d6f2 into next Sep 17, 2025
7 of 9 checks passed
github-actions bot added a commit that referenced this pull request Sep 17, 2025
  This PR was automatically generated to update documentation based on recent changes.

  Original commit: feat: implement api update-task (#1214)\n\n\n

  Co-authored-by: Claude <claude-assistant@anthropic.com>
@coderabbitai coderabbitai bot mentioned this pull request Nov 7, 2025
16 tasks
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