Add habit management to CLI and TUI - #231
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SDK-backed habit creation, editing, and deletion to the CLI and Calendar TUI, with shared validation and expanded documentation/tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Adds CLI habit CRUD commands with validation and structured output.
- Adds TUI habit forms, selection, deletion confirmation, and refresh behavior.
- Updates models, documentation, command discovery, and test coverage.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.surface |
Records the expanded CLI surface. |
API-COVERAGE.md |
Documents habit CRUD endpoint coverage. |
README.md |
Documents CLI and TUI habit management. |
skills/hey/SKILL.md |
Adds habit management examples. |
internal/cmd/habit.go |
Implements habit CRUD commands. |
internal/cmd/habit_test.go |
Tests CRUD requests and validation. |
internal/cmd/help_test.go |
Updates habit help expectations. |
internal/habit/days.go |
Parses and formats weekdays. |
internal/habit/days_test.go |
Tests weekday parsing. |
internal/habit/values.go |
Defines valid icons and colors. |
internal/habit/values_test.go |
Tests icon and color validation. |
internal/models/calendar.go |
Adds habit fields to recordings. |
internal/tui/calendar.go |
Integrates habit management into Calendar. |
internal/tui/calendar_test.go |
Updates Calendar help tests. |
internal/tui/habit_form.go |
Implements create/edit forms. |
internal/tui/habit_form_test.go |
Tests form and mutation behavior. |
internal/tui/translate_test.go |
Tests habit field translation. |
tests/smoke/habit_test.go |
Adds end-to-end habit CRUD coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
robzolkos
force-pushed
the
feature/habit-management
branch
2 times, most recently
from
August 21, 2026 06:11
9c1cea3 to
8a967d4
Compare
robzolkos
force-pushed
the
feature/habit-management
branch
from
August 21, 2026 06:16
8a967d4 to
709a396
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds habit creation, editing, and deletion to the CLI and Calendar TUI so habits can be managed without returning to the web app. Existing complete/uncomplete behavior remains unchanged.
What changed
hey habit create,hey habit edit(updatealias), andhey habit deletethrough the typed HEY SDK.0–6, validates HEY's supported icon/color values locally, and supports partial edits.Scope
Validation
GOWORK=off make test— passedGOWORK=off make lint— passed, 0 issuesGOWORK=off make build— passedGOWORK=off make test-smoke— passed againstapp.hey.localhost:3003, includingTestHabitCreateEditDeleteDelivery and risk
No migration, configuration, feature flag, or deploy ordering is required. Main review focus: Calendar TUI input/state routing and the shared icon/color/weekday validation.
Basecamp card: https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10206892903
Summary by cubic
Add habit creation, editing, and deletion to the CLI and Calendar TUI so users can manage habits without the web app. Previously only completion/uncompletion was available; now full CRUD is supported, with TUI creation limited to the personal calendar and deletion requiring confirmation bound to the selected habit.
hey habit create,hey habit edit(updatealias), andhey habit delete; accepts weekday names or 0–6, validates icon/color locally (flag help lists accepted values), supports stdin for names, sends partial edits, and returns JSON summaries.ato create on the personal calendar, select visible habits with[/], edit withe, and delete withxtwice. Delete confirmation is tied to the selected habit and resets on other keys, selection change, or recordings reload. After mutations, recordings refresh and notices show results; on API failure, forms keep values, selection stays put, and account switching is blocked only while saving/deleting.icon,color, anddays; calls useHabits().Create/Update/Deletefromhey-sdk.Scope
Written for commit 709a396. Summary will update on new commits.