Skip to content

Conversation

@ChiR24
Copy link

@ChiR24 ChiR24 commented Jan 4, 2026

Summary

  • Enhanced the todo continuation system reminder to display the actual remaining todos with content, status, and priority
  • Previously only showed: [Status: 1/4 completed, 3 remaining]
  • Now shows the full task list for better agent context

New Format

[Status: 2/8 completed, 6 remaining]

Remaining Tasks:
  1. 🔄 [HIGH] Implement login endpoint
  2. ⏳ [HIGH] Add password hashing utility
  3. ⏳ [MED] Implement token validation middleware
  4. ⏳ [MED] Add auth tests - login success case
  5. ⏳ [LOW] Add auth tests - login failure case
  6. ⏳ [LOW] Update API documentation

Changes

  • Added getIncompleteTodos() helper function
  • Added formatRemainingTodos() to format todos with status indicators (🔄/⏳) and priority labels ([HIGH]/[MED]/[LOW])
  • Updated prompt generation to include formatted todo list
  • Added test case to verify the new format

Testing

  • All 23 tests pass
  • TypeScript compilation passes
  • Manually verified in local OpenCode instance

Summary by cubic

The continuation system reminder now lists the actual remaining todos with content, status icons, and priority labels for better context. It also handles missing priorities with a [NONE] label.

  • New Features

    • Added a "Remaining Tasks" section to the prompt with 🔄/⏳ status icons and [HIGH]/[MED]/[LOW] priority labels.
    • Introduced getIncompleteTodos and formatRemainingTodos helpers and integrated them into prompt generation.
  • Bug Fixes

    • Show [NONE] for undefined/null/empty priorities and added tests to verify labels and formatting (excluding completed tasks).

Written for commit 8a56eca. Summary will update on new commits.

Copilot AI review requested due to automatic review settings January 4, 2026 06:12
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@greptile-apps
Copy link

greptile-apps bot commented Jan 4, 2026

Greptile Summary

  • Enhances the todo continuation enforcer to show detailed remaining task list with status indicators and priority labels instead of just numerical counts
  • Adds getIncompleteTodos() and formatRemainingTodos() helper functions with emoji status indicators (🔄/⏳) and priority labels ([HIGH]/[MED]/[LOW]/[NONE])
  • Improves AI agent context by providing specific task content, status, and priorities for better task continuation decisions

Important Files Changed

Filename Overview
src/hooks/todo-continuation-enforcer.ts Enhanced todo continuation system to include detailed remaining task list with status/priority formatting
src/hooks/todo-continuation-enforcer.test.ts Added comprehensive test coverage for new formatting features and edge cases

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects well-tested enhancement with comprehensive coverage and good software engineering practices
  • No files require special attention as changes are straightforward improvements to existing functionality

Sequence Diagram

sequenceDiagram
    participant User
    participant TodoContinuationEnforcer as "Todo Continuation Enforcer"
    participant Client as "OpenCode Client"
    participant UI as "Toast UI"

    User->>TodoContinuationEnforcer: "session.idle event"
    TodoContinuationEnforcer->>Client: "Get todos from session"
    Client-->>TodoContinuationEnforcer: "Return todo list"
    TodoContinuationEnforcer->>TodoContinuationEnforcer: "Check if incomplete todos exist"
    TodoContinuationEnforcer->>UI: "Show countdown toast (2s, 1s)"
    TodoContinuationEnforcer->>TodoContinuationEnforcer: "Wait 2 seconds countdown"
    TodoContinuationEnforcer->>TodoContinuationEnforcer: "Format remaining todos with status and priority"
    TodoContinuationEnforcer->>Client: "Inject continuation prompt with todo list"
    Client-->>TodoContinuationEnforcer: "Prompt sent successfully"
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. src/hooks/todo-continuation-enforcer.ts, line 90-91 (link)

    style: This function duplicates the filtering logic from getIncompleteCount(). Consider reusing the existing helper to maintain consistency.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@ChiR24
Copy link
Author

ChiR24 commented Jan 4, 2026

I have read the CLA Document and I hereby sign the CLA

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

github-actions bot added a commit that referenced this pull request Jan 4, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the todo continuation system reminder to display the full list of remaining todos with their content, status indicators, and priority labels, providing better context to the agent.

  • Added helper functions to retrieve and format incomplete todos
  • Updated the continuation prompt to include a detailed task list with emojis and priority levels
  • Added test coverage to verify the new format includes remaining todos

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/hooks/todo-continuation-enforcer.ts Added getIncompleteTodos() and formatRemainingTodos() helper functions, updated prompt generation to include formatted todo list
src/hooks/todo-continuation-enforcer.test.ts Added test case verifying continuation prompt includes remaining todos with correct filtering

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +440 to +406
// Should list pending tasks with content
expect(promptText).toContain("Fix authentication bug")
expect(promptText).toContain("Add unit tests")
expect(promptText).toContain("Review code changes")
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The test verifies that the todo content is included in the prompt but doesn't verify the format of status indicators (🔄/⏳) or priority labels ([HIGH]/[MED]/[LOW]). Consider adding assertions to verify the complete formatting, such as checking for the presence of "🔄 [MED] Add unit tests" to ensure the formatRemainingTodos function is working correctly.

Copilot uses AI. Check for mistakes.

const lines = incompleteTodos.map((todo, idx) => {
const statusIndicator = todo.status === "in_progress" ? "🔄" : "⏳"
const priorityLabel = todo.priority === "high" ? "[HIGH]" : todo.priority === "medium" ? "[MED]" : "[LOW]"
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The priority field is optional according to the TodoItem interface definition. This code will incorrectly label todos with undefined priority as "[LOW]". Consider handling undefined/null priority explicitly, or provide a default label like "[NONE]" or omit the priority label entirely when it's not set.

Suggested change
const priorityLabel = todo.priority === "high" ? "[HIGH]" : todo.priority === "medium" ? "[MED]" : "[LOW]"
const priorityLabel =
todo.priority === "high"
? "[HIGH]"
: todo.priority === "medium"
? "[MED]"
: todo.priority === "low"
? "[LOW]"
: "[NONE]"

Copilot uses AI. Check for mistakes.
function getIncompleteTodos(todos: Todo[]): Todo[] {
return todos.filter(t => t.status !== "completed" && t.status !== "cancelled")
}
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The getIncompleteTodos function duplicates the filtering logic from getIncompleteCount. Consider refactoring getIncompleteCount to use getIncompleteTodos to reduce code duplication and maintain a single source of truth for the incomplete filtering logic.

Copilot uses AI. Check for mistakes.
@ChiR24 ChiR24 marked this pull request as draft January 4, 2026 06:26
ChiR24 added a commit to ChiR24/oh-my-opencode that referenced this pull request Jan 4, 2026
- Handle undefined/null/empty priority with [NONE] label instead of
  incorrectly falling back to [LOW]
- Add test assertions for status indicators (🔄/⏳) and priority labels
- Add test case for undefined priority handling
- Verify complete formatted entries like '🔄 [MED] Add unit tests'

Addresses Copilot review comments on PR code-yeongyu#473
@ChiR24 ChiR24 marked this pull request as ready for review January 4, 2026 06:35
@greptile-apps
Copy link

greptile-apps bot commented Jan 4, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

ChiR24 added 2 commits January 4, 2026 15:45
…em reminder

The system reminder now displays the actual remaining todos with their
content, status indicators, and priority labels instead of just showing
a count. This helps the agent know exactly what tasks need to be done.

Format:
  1. 🔄 [HIGH] Task in progress
  2. ⏳ [MED] Pending task
  3. ⏳ [LOW] Another pending task
- Handle undefined/null/empty priority with [NONE] label instead of
  incorrectly falling back to [LOW]
- Add test assertions for status indicators (🔄/⏳) and priority labels
- Add test case for undefined priority handling
- Verify complete formatted entries like '🔄 [MED] Add unit tests'

Addresses Copilot review comments on PR code-yeongyu#473
@kdcokenny
Copy link
Collaborator

I believe this has been completed in #638 if still relevant feel free to reopen and @ me.

@kdcokenny kdcokenny closed this Jan 16, 2026
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