Skip to content

feat: Time breakdown in stats sidebar - #174

Merged
dkorecko merged 4 commits into
mainfrom
feature/time-breakdown
Jan 4, 2026
Merged

dkorecko merged 4 commits into
mainfrom
feature/time-breakdown

Conversation

@dkorecko

@dkorecko dkorecko commented Jan 4, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a "Column time totals" section in the stats panel showing total time per column with expandable per-user breakdowns and toggle controls for each column.
  • Bug Fixes / Improvements

    • Improved counting and time-aggregation logic for more accurate displayed totals and subtasks/time summaries.
  • Chores

    • Updated Devity.Extensions package to a newer version.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 4, 2026 •

Copy link
Copy Markdown

Walkthrough

Updates add time-aggregation helpers and UI for column-level time totals. TimeRecord.GetTotalTime() now returns a TimeSpan (using EndedAt or DateTime.Now), and Card.GetTotalTime() sums its TimeRecords. CardView.razor switches to Card.GetTotalTime() and simplifies count predicates. BoardView.razor gains a "Column time totals" section that iterates columns, computes per-column and per-user totals from cards' TimeRecords, and implements per-column expand/collapse state via a HashSet with ToggleExpand/IsExpanded and calls to StateHasChanged(). Global using for Devity.Extensions was added, package references bumped, and .idea/ was added to .gitignore.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a time breakdown feature to the stats sidebar in BoardView.razor.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/time-breakdown

📜 Recent review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between ee3aae8 and d4d4e57.

📒 Files selected for processing (1)
  • Ticky.Base/Entities/TimeRecord.cs
🧰 Additional context used
🧬 Code graph analysis (1)
Ticky.Base/Entities/TimeRecord.cs (1)
Ticky.Base/Entities/Card.cs (2)
  • TimeSpan (34-35)
  • DateTime (37-86)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (1)
Ticky.Base/Entities/TimeRecord.cs (1)

17-18: Good simplification from past review.

The redundant TimeSpan construction has been correctly addressed, and the method's use of DateTime.Now is consistent with the rest of the codebase, where local time is used throughout for all datetime operations.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (3)
.idea/.idea.Ticky/.idea/vcs.xml (1)

1-6: IDE configuration files should not be committed to version control.

This VCS configuration file is automatically generated by JetBrains IDEs and is user-specific. It should be excluded from the repository.

.idea/.idea.Ticky/.idea/indexLayout.xml (1)

1-8: IDE configuration files should not be committed to version control.

This index layout configuration is IDE-specific and should be excluded from the repository.

.idea/.idea.Ticky/.idea/encodings.xml (1)

1-4: IDE configuration files should not be committed to version control.

This encoding configuration is IDE-specific and should be excluded from the repository.

📜 Review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between eba4619 and e439a45.

📒 Files selected for processing (7)
  • .idea/.idea.Ticky/.idea/.gitignore
  • .idea/.idea.Ticky/.idea/CSharpierPlugin.xml
  • .idea/.idea.Ticky/.idea/dataSources.xml
  • .idea/.idea.Ticky/.idea/encodings.xml
  • .idea/.idea.Ticky/.idea/indexLayout.xml
  • .idea/.idea.Ticky/.idea/vcs.xml
  • Ticky.Web/Components/Pages/BoardView.razor
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (4)
.idea/.idea.Ticky/.idea/.gitignore (1)

1-15: LGTM! Standard IDE configuration.

The gitignore entries are appropriate for a JetBrains Rider/IntelliJ IDEA project and follow standard conventions for excluding IDE-specific files and local configurations.

Ticky.Web/Components/Pages/BoardView.razor (3)

210-210: LGTM! Appropriate data structure for tracking expanded state.

Using a HashSet<string> provides efficient O(1) lookup for the expand/collapse functionality.


581-591: LGTM! Clean expand/collapse implementation.

The toggle logic is straightforward, and calling StateHasChanged() ensures the UI updates correctly.


593-612: No changes needed. The method correctly uses DateTime.Now consistent with the application's established time zone handling strategy (local time throughout the codebase). The time calculation logic properly handles ongoing records and validates time ranges.

Comment thread .idea/.idea.Ticky/.idea/CSharpierPlugin.xml Outdated
Comment thread .idea/.idea.Ticky/.idea/dataSources.xml Outdated
Comment thread Ticky.Web/Components/Pages/BoardView.razor
Comment thread Ticky.Web/Components/Pages/BoardView.razor Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
Ticky.Web/Components/Pages/BoardView.razor (1)

143-143: Linear search causing O(n²) complexity (duplicate concern).

This line performs a linear search through _members for each user in the per-column time breakdown, which was already flagged in a previous review.

As noted in the previous review, consider creating a Dictionary<int, User> lookup before the column loop to enable O(1) user lookups and eliminate the nested iteration overhead.

📜 Review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between e439a45 and ee3aae8.

📒 Files selected for processing (9)
  • .gitignore
  • Ticky.Base/Entities/Card.cs
  • Ticky.Base/Entities/TimeRecord.cs
  • Ticky.Base/GlobalUsings.cs
  • Ticky.Base/Ticky.Base.csproj
  • Ticky.Internal/Ticky.Internal.csproj
  • Ticky.Web/Components/Elements/CardView.razor
  • Ticky.Web/Components/Pages/BoardView.razor
  • Ticky.Web/Ticky.Web.csproj
🧰 Additional context used
🧬 Code graph analysis (2)
Ticky.Base/Entities/Card.cs (1)
Ticky.Base/Entities/TimeRecord.cs (1)
  • TimeSpan (17-20)
Ticky.Base/Entities/TimeRecord.cs (1)
Ticky.Base/Entities/Card.cs (2)
  • TimeSpan (34-35)
  • DateTime (37-86)
🔇 Additional comments (10)
Ticky.Base/Entities/Card.cs (1)

34-35: LGTM! Clean implementation of time aggregation.

The method correctly aggregates total time across all TimeRecords. The implementation is concise and leverages LINQ appropriately. Since TimeRecords is initialized as an empty list, there are no null reference concerns.

.gitignore (1)

365-368: LGTM! Standard IDE exclusion.

Adding .idea/ to gitignore is appropriate for excluding JetBrains IDE configuration files from version control.

Ticky.Web/Ticky.Web.csproj (1)

12-12: Version bump is consistent across the solution.

The Devity.Extensions update aligns with the same version bump in Ticky.Base.csproj. Verification of this package version has been requested in the GlobalUsings.cs review.

Ticky.Base/Ticky.Base.csproj (1)

10-10: Version bump is consistent across the solution.

The Devity.Extensions update aligns with the version bumps in other project files (Ticky.Web.csproj and the global using in GlobalUsings.cs). Verification of this package version has been requested in the GlobalUsings.cs review.

Ticky.Base/GlobalUsings.cs (1)

1-1: No issues found with the Devity.Extensions package reference.

The global using directive is appropriate. The version 2026.1.4.1450 is confirmed in the project file (Ticky.Base/Ticky.Base.csproj), and no public security vulnerabilities were identified. For breaking changes and detailed release notes, refer to the package's NuGet page or GitHub repository.

Ticky.Web/Components/Elements/CardView.razor (2)

37-37: LGTM!

The refactor to use Count(x => x.Completed) is more idiomatic and cleaner than the previous Where().Count() pattern.


40-40: LGTM!

The refactoring to use Card.GetTotalTime() correctly centralizes time calculation logic and aligns with the new domain methods introduced in this PR.

Ticky.Web/Components/Pages/BoardView.razor (2)

100-100: LGTM!

The refactor to use Count(x => x.Column.Finished) is more idiomatic and cleaner than the previous Where().Count() pattern.


581-591: LGTM!

The expand/collapse state management implementation is clean and correct. Using a HashSet<string> for tracking expanded sections and calling StateHasChanged() after updates ensures proper UI reactivity.

Ticky.Internal/Ticky.Internal.csproj (1)

10-10: Version 2026.1.4.1450 is valid and currently free from known security vulnerabilities.

The package is the latest available version on NuGet and no advisories exist in NuGet security database, GitHub Security Advisories, or OSV.

Comment thread Ticky.Base/Entities/TimeRecord.cs Outdated
Comment thread Ticky.Web/Components/Pages/BoardView.razor
@dkorecko
dkorecko merged commit 31249b7 into main Jan 4, 2026
5 checks passed
@dkorecko
dkorecko deleted the feature/time-breakdown branch January 4, 2026 15:28
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