Skip to content

Conversation

@ahogappa
Copy link
Owner

@ahogappa ahogappa commented Jan 25, 2026

Summary

  • Fix task count mismatch in SimpleProgressDisplay when using sections
  • Track section candidates and mark unselected ones as completed when a section implementation is selected
  • Ensures total count remains constant throughout execution and matches completed count at the end

Problem

Previously, unselected section implementation candidates caused a mismatch between completed tasks and total tasks in the final display (e.g., "3/5" instead of "5/5").

Solution

  • Added @section_candidates to track section class → candidate classes mapping
  • Added collect_section_candidates method to build the mapping from the tree structure
  • Modified on_section_impl_registered to mark unselected candidates as completed (skipped)

Test plan

  • All existing tests pass
  • Code style check passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Enhanced progress tracking for section implementations with improved candidate management, ensuring unselected candidates are properly accounted for in progress reporting and display.

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

…ssDisplay

Previously, unselected section implementation candidates were excluded
from the task count, causing a mismatch between completed tasks and
total tasks in the final display (e.g., "3/5" instead of "5/5").

This fix tracks section candidates and marks unselected ones as completed
when a section implementation is selected, ensuring the total count
remains constant throughout execution and matches the completed count
at the end.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

Walkthrough

Changes to SimpleProgressDisplay introduce state tracking for section implementation candidates. The class now collects candidate implementations during tree construction, marks unselected candidates as completed after registration, and exposes candidates through a new instance variable for external access.

Changes

Cohort / File(s) Summary
Section Candidate Tracking
lib/taski/execution/simple_progress_display.rb
Initialize @section_candidates instance variable to store section class → candidate implementation mappings. Introduce collect_section_candidates(node) helper method to recursively traverse and populate candidates from tree nodes. After tree building, invoke candidate collection to establish the complete mapping.
Candidate Completion Logic
lib/taski/execution/simple_progress_display.rb
Modify on_section_impl_registered method signature (remove underscore prefix from section_class parameter). After implementation registration, mark all unselected candidates for the section by updating their TaskProgress run_state to :completed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through task trees tall,
Collecting candidates, marking all,
Unselected ones get completed with grace,
Section tracking finds its rightful place!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: marking unselected section candidates as completed in SimpleProgressDisplay to fix task count mismatch.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ahogappa ahogappa merged commit 2023f8d into master Jan 25, 2026
8 checks passed
@ahogappa ahogappa mentioned this pull request Jan 25, 2026
2 tasks
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.

2 participants