Skip to content

Initialize Percentage field in TaskGroup structs#67

Open
clobrano wants to merge 1 commit into
mainfrom
claude/determined-noether-owe2tq
Open

Initialize Percentage field in TaskGroup structs#67
clobrano wants to merge 1 commit into
mainfrom
claude/determined-noether-owe2tq

Conversation

@clobrano

Copy link
Copy Markdown
Owner

Summary

Updated the GroupByProject and GroupByTag functions to initialize the Percentage field when creating TaskGroup structs. This ensures the field is explicitly set rather than relying on zero-value initialization.

Changes

  • Added Percentage: -1 initialization in GroupByProject function when creating TaskGroup instances
  • Added Percentage: -1 initialization in GroupByTag function when creating TaskGroup instances
  • Aligned struct field formatting for improved readability in both functions

Implementation Details

The Percentage field is initialized to -1 in both grouping functions, which likely serves as a sentinel value indicating that the percentage has not yet been calculated. This explicit initialization makes the intent clearer and ensures consistent behavior across all TaskGroup creation paths.

https://claude.ai/code/session_01Lg8t7KbbcrNAiYcbLT4JZE

Set Percentage to -1 (not applicable) in GroupByTag() and
GroupByProject() so renderGroupLine() skips the percentage display.
The default zero value was being rendered as [  0%].

Fixes #10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lg8t7KbbcrNAiYcbLT4JZE
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