-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(todo-continuation-enforcer): include remaining todo list in system reminder #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
All contributors have signed the CLA. Thank you! ✅ |
Greptile Summary
Important Files Changed
Confidence score: 5/5
Sequence DiagramsequenceDiagram
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"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (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
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this 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.
There was a problem hiding this 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.
| // Should list pending tasks with content | ||
| expect(promptText).toContain("Fix authentication bug") | ||
| expect(promptText).toContain("Add unit tests") | ||
| expect(promptText).toContain("Review code changes") |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
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.
|
|
||
| const lines = incompleteTodos.map((todo, idx) => { | ||
| const statusIndicator = todo.status === "in_progress" ? "🔄" : "⏳" | ||
| const priorityLabel = todo.priority === "high" ? "[HIGH]" : todo.priority === "medium" ? "[MED]" : "[LOW]" |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
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.
| 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]" |
| function getIncompleteTodos(todos: Todo[]): Todo[] { | ||
| return todos.filter(t => t.status !== "completed" && t.status !== "cancelled") | ||
| } |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
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.
- 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
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". |
There was a problem hiding this 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.
…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
|
I believe this has been completed in #638 if still relevant feel free to reopen and @ me. |
Summary
[Status: 1/4 completed, 3 remaining]New Format
Changes
getIncompleteTodos()helper functionformatRemainingTodos()to format todos with status indicators (🔄/⏳) and priority labels ([HIGH]/[MED]/[LOW])Testing
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
Bug Fixes
Written for commit 8a56eca. Summary will update on new commits.