Repository navigation
feat: Time breakdown in stats sidebar - #174
Conversation
WalkthroughUpdates 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)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration 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 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)Ticky.Base/Entities/TimeRecord.cs (1)
⏰ 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)
🔇 Additional comments (1)
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. Comment |
There was a problem hiding this comment.
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
📒 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.xmlTicky.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 usesDateTime.Nowconsistent 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.
There was a problem hiding this comment.
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
_membersfor 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
📒 Files selected for processing (9)
.gitignoreTicky.Base/Entities/Card.csTicky.Base/Entities/TimeRecord.csTicky.Base/GlobalUsings.csTicky.Base/Ticky.Base.csprojTicky.Internal/Ticky.Internal.csprojTicky.Web/Components/Elements/CardView.razorTicky.Web/Components/Pages/BoardView.razorTicky.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 previousWhere().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 previousWhere().Count()pattern.
581-591: LGTM!The expand/collapse state management implementation is clean and correct. Using a
HashSet<string>for tracking expanded sections and callingStateHasChanged()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.
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
Chores
✏️ Tip: You can customize this high-level summary in your review settings.