Skip to content

refactor: restructure CLI command hierarchy#10

Merged
Flyrell merged 2 commits intomainfrom
refactor/log-command-api
Mar 15, 2026
Merged

refactor: restructure CLI command hierarchy#10
Flyrell merged 2 commits intomainfrom
refactor/log-command-api

Conversation

@Flyrell
Copy link
Owner

@Flyrell Flyrell commented Mar 15, 2026

Summary

  • Restructure schedule commands under project schedule and defaults schedule groups (previously config prefix)
  • Move log, edit, remove under a log group command (log add, log edit, log remove)
  • Remove duplicate resolveProjectFromRepo in favor of shared ResolveProjectContext
  • Extract shared utilities: timeFields helper, entries.go loader, budget.go, deduct.go, placement.go
  • Add from/to time range display to report detail panel and overlay forms
  • Allow all three --from/--to/--duration flags in edit when values are consistent
  • Centralize day budget computation and fix status idle trimming

Test plan

  • task lint passes
  • task test passes (all tests updated for new command paths)
  • Manual: verify hourgit log add, log edit, log remove work as expected
  • Manual: verify hourgit project schedule get/set/reset/report work
  • Manual: verify hourgit defaults schedule get/set/reset/report work
  • Manual: verify shell completion reflects new command structure

🤖 Generated with Claude Code

Flyrell and others added 2 commits March 15, 2026 23:01
Convert top-level `log`, `edit`, and `remove` commands into subcommands
`log add`, `log edit`, and `log remove` under a new `log` group command.
This groups all time entry operations under a single namespace, improving
CLI discoverability and consistency with the existing project/defaults
group pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The landing page and quick-start guide still used the old `hourgit log`
syntax after the command was moved under the `log` group. This aligns
them with the refactored CLI structure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Flyrell Flyrell merged commit a00df3a into main Mar 15, 2026
2 checks passed
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.

1 participant