{{ message }}
Enhance CLI commands, fix bugs, and improve code quality#214
Open
HamidMusayev wants to merge 4 commits into
Open
Enhance CLI commands, fix bugs, and improve code quality#214HamidMusayev wants to merge 4 commits into
HamidMusayev wants to merge 4 commits into
Conversation
new: contribution
Bug fixes: - Fix tt report showing wrong end date and negative duration for running tasks by treating zero EndAt as time.Now() (markdown.go) - Fix panic when pressing r on an empty task list (main.go) - Fix empty task being created on blank Enter keypress (main.go) - Fix temp file accumulation in tt edit by adding defer os.Remove (edit.go) - Fix file descriptor leak in tt from-json by adding defer tmp.Close (fromjson.go) Code quality: - Change model.Bytes() to return ([]byte, error) instead of log.Fatalln on error - Extract setTask helper in store.go to eliminate triplicated serialize-and-store pattern - Extract effectiveEndAt helper in project_timer.go; capture time.Now() once per call - Remove debug log.Println calls throughout the TUI Update loop - Fix typo: newRerportCmd -> newReportCmd - Replace deprecated ioutil.TempFile with os.CreateTemp - Restrict exported JSON file permissions from 0o666 to 0o644 - Improve EDITOR missing error message to be platform-neutral
…ilters, list stats New CLI commands: - tt start <title>: stop any running task and immediately start a new one - tt stop: stop all running or paused tasks and print what was stopped - tt pause: freeze the current task's timer (time stops accumulating) - tt resume: continue a paused task from where it left off True pause/resume (same task entry, not a new one) required a data model extension: Task gains PausedAt and PausedFor fields (backwards-compatible via omitempty). CloseTasks now finalizes paused tasks at their pause time so paused-dead time is never counted. TUI changes: - p key: toggle pause/resume on the active task; paused tasks show [paused] - d key: delete the selected task (no confirmation, consistent with tool ethos) - Item description now uses taskDuration which is pause-aware Report improvements: - --since and --until flags (YYYY-MM-DD) filter tasks by start date - Total time in the report header reflects the filtered set only - Paused tasks render as "paused" instead of "in progress" in the end column List improvements: - -v / --verbose flag shows task count and total time per project
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.

This merge request also Closes #56