Conversation
The status command computed "today's logged time" via BuildReport without passing activity entries, so idle gaps from precise mode were never trimmed — causing inflated numbers compared to the report command. Extract ComputeDayBudget() and ComputeManualLogBudget() into internal/timetrack/budget.go, and LoadProjectEntries() into internal/cli/entries.go. Rewire status, log, and report commands to use these shared functions, ensuring consistent time attribution everywhere. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
statuscommand computed today's logged time without passing activity entries toBuildReport, so idle gaps from precise mode were never trimmed — showing inflated numbers compared toreportComputeDayBudget()andComputeManualLogBudget()intointernal/timetrack/budget.goto centralize all day-level time computationLoadProjectEntries()intointernal/cli/entries.goto load all 5 entry types in a single call, reducing boilerplate instatusandreportNew files
internal/timetrack/budget.go+budget_test.gointernal/cli/entries.go+entries_test.goModified files
internal/cli/status.go— usesLoadProjectEntries+ComputeDayBudgetwith activity entriesinternal/cli/log.go—checkBudgetWarningusesComputeManualLogBudget;getDayScheduleWindowsreturns[]DayScheduleinternal/cli/report.go—loadReportInputsusesLoadProjectEntriesTest plan
task testpasses (all existing + new tests)task lintpasseshourgit statusshows correct logged time with precise mode enabled (idle gaps trimmed)hourgit reportnumbers matchhourgit statusfor the same dayhourgit logbudget warnings still fire correctly🤖 Generated with Claude Code