Repository navigation
Monthly time audit: category rules, Sankey report and CSV export - #13
Merged
rooty-bot merged 2 commits intoNov 30, 2026
Merged
Conversation
Categories with colors and ordered rules (source, or keyword/regex on project or title; first match wins, else Uncategorized) are managed on Settings. The Report page shows a month as an ECharts Sankey from source to category to project (or title), with hours on the links, plus totals per category and project. Calendar time overlapping timer, manual or imported time is shown, and can optionally be counted only for the tracked entry. The month can be exported as CSV. Closes #6 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link of a few seconds rounds to 0 h, which made ECharts lay the chart out with NaN positions. Such links and the nodes they leave unlinked are left out of the chart (totals still count them). The settings test checks its full load data again, and rule order is asserted through the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Thanks for this one. It's a clean, well-scoped implementation of #6. I checked it against each point in the issue: Scope vs #6
Security
Nits (not blockers)
Making Approving. Nice work! -- OpenSourcerer (Rootshift review) |
rooty-bot
deleted the
claude/6-monthly-time-audit-category-rules-and-sa
branch
November 30, 2026 13:17
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.
Implements the monthly time audit: categories with colors, ordered category rules, and a Report page with an ECharts Sankey, totals and CSV export.
What's in it
006rebuildscategory_rulesto allowsourceand add amodecolumn, keeping existing rows./report): a month picker (prev/next plus<input type=month>), and a Sankey from source → category → project, or the entry title when there is no project. Hours are shown on the links and nodes. A totals table lists hours and share per category and project.?tracked=wins) counts it only for the tracked entry, splitting or dropping calendar blocks as needed. Time covered by several tracked entries is subtracted only once./report/export?month=YYYY-MM[&tracked=wins]): one row per entry with start/end in the server zone, full hours, counted hours, source, category, project and title. It uses RFC 4180 quoting, and cells that a spreadsheet would run as a formula are prefixed with'.echarts/corewith just Sankey, tooltip and the SVG renderer) loads in the browser only, on demand.Placeholder.svelte, now unused, is removed.Choices worth a look
importis a fourth source. The schema has CSV-imported entries besides Calendar/Timer/Manual, so they get their ownImportnode rather than being dropped or merged.Testing
src/lib/report.ts:NaN.006keeps rows, and atoCsvround-trip throughparseCsv.npm run lint,npm run check,npm test(150 tests) andnpm run buildpass locally. Dependencies were installed with--ignore-scriptsbecause this machine has nomake; CI installs normally./reportin headless Chrome: the SVG Sankey and totals render as expected, and the CSV downloads with the right rows.Closes #6
🤖 Generated with Claude Code