Repository navigation
Time: CSV import (Toggl/Clockify/generic), built-in timer and month view - #12
Merged
rooty-bot merged 2 commits intoNov 30, 2026
Merged
Conversation
- CSV import on the Time page: Toggl Track and Clockify detailed export presets plus a generic column mapping (start, end or duration, description, project). Preview shows the first rows and row problems without saving; malformed rows are reported by line and skipped; re-imports are deduplicated by content. - Built-in timer with description and project, one running at a time (enforced by a partial unique index), shown in the header with a Stop button. - Manual entry form; month view of all entries with source badges, edit and delete (calendar entries stay read-only since sync would undo changes). - Migration 005 rebuilds time_entries to allow the 'import' source. - Zone helpers moved from ics.ts to zone.ts and shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ate order in preview Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Thanks for this one. It's a careful, well-tested piece of work. I reviewed it against #5, and everything in "What" and "Done when" is covered. Scope vs #5
Tests
Security
Nits (non-blocking)
Great work. Approving. -- OpenSourcerer (Rootshift review) |
rooty-bot
deleted the
claude/5-timer-import-csv-with-toggl-clockify-pre
branch
November 30, 2026 12:42
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.
Summary
CSV import (Time page)
M/D/YYYY/D/M/YYYY(also with-),D.M.YYYY, and 12h or 24h times. The date order is decided once per file: from any value above 12, else your choice, else month first.h:mm[:ss]or decimal hours.external_idwithON CONFLICT DO NOTHING. The same entry exported by another tool is skipped too, and identical rows within one file collapse into one.Timer and entries
?month=YYYY-MM) of entries from every source, with source badges, edit and delete. Only the running timer may be saved without an end.Calendar entries are read-only here, enforced in SQL as well as the UI, because the next sync would undo edits or deletes. This deliberately narrows "edit and delete".
Schema and internals
time_entriesto allow theimportsource. It keeps the columns, constraints, the calendarON DELETE CASCADEand the indexes, and adds the running-timer index.ics.tsto a sharedzone.ts.TZ, and CSV times without an offset are read in that zone (documented in the README).Caveat: a web search did not confirm the exact Toggl and Clockify header names. The presets match case-insensitively with
End/Stopaliases, and Clockify is told apart by itsDuration (h)/Duration (decimal)columns. The fixtures use the commonly documented headers, not a live export.Testing
toggl.csv(BOM, CRLF, quoted commas, quotes and newlines),clockify.csv(US dates, AM/PM),generic.csv(semicolons, duration, offset),malformed.csv(5 bad rows reported, 3 good rows imported).npm run lint,npm run check,npm test(122 tests) andnpm run buildpass locally. Tests also pass withTZset to UTC, Asia/Kolkata, America/Los_Angeles and Pacific/Auckland.make, so dependencies were installed with--ignore-scripts. CI installs normally and builds the Docker image.Closes #5
🤖 Generated with Claude Code