Skip to content

Replace :done with :state in task#143

Merged
strika merged 10 commits intomainfrom
task-state
Nov 26, 2025
Merged

Replace :done with :state in task#143
strika merged 10 commits intomainfrom
task-state

Conversation

@strika
Copy link
Copy Markdown
Contributor

@strika strika commented Nov 26, 2025

No description provided.

@strika strika requested a review from Copilot November 26, 2025 06:32
Copy link
Copy Markdown

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 refactors the task representation by replacing the boolean :done field with a more explicit :state field that uses keyword values (:open, :checked). This change improves code clarity by making task states more explicit and maintainable.

Key changes:

  • Replaced boolean :done field with keyword-based :state field supporting :open and :checked states
  • Updated task builder functions to use the new state system
  • Modified parser and serializer logic to handle state keywords instead of boolean values

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/task.janet Updated task builder functions to use :state field with keyword values instead of :done boolean
src/plan/parser.janet Modified parser to generate :state with :checked/:open keywords from checkbox syntax
src/plan/serializer.janet Updated serializer to convert :state keywords back to checkbox syntax
src/plan.janet Refactored completed-tasks and pending-tasks filters to check :state equality
test/task_test.janet Added comprehensive tests for new task builder functions and updated existing tests
test/schedule_parser_test.janet Updated test assertions to check :state field
test/plan/serializer_test.janet Updated test data to use :state keywords
test/plan/parser_test.janet Updated test assertions to verify :state values
test/examples/todo.md Changed task checkboxes from checked to unchecked
test/commands/schedule_tasks_test.janet Updated test assertions to check :state field
test/commands/schedule_contacts_test.janet Updated test assertions to check :state field

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

Copy link
Copy Markdown

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

Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.


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

@strika strika merged commit 8715c3f into main Nov 26, 2025
2 checks passed
@strika strika deleted the task-state branch November 26, 2025 07:37
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