fix(sessions): one project name, one row [#36] - #37
Merged
Conversation
focus off, past add and past modify each check for a session already carrying the project name and offer to fold into it rather than writing a second entry. Accepting sums the durations, opens the note pre-loaded for editing, turns the row duration-only and writes the dropped timestamps to the end of the note. Declining writes nothing.
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.
Closes #36.
focus off,past addandpast modifynow check whether a session already carries the project name before writing. If one does:y — durations sum into the original row,
$EDITORopens pre-loaded with its note, the row becomes duration-only, and the timestamps that drops are appended to the note:A second fold onto the same row appends only the
Newpair — no original timestamps are left to preserve.n — nothing is written.
offleaves the clock running,addadds nothing,modifyleaves the row unchanged.past modifyrenaming onto an occupied name folds and deletes the edited row.past modify <id> --noteschanges neither name nor timing, so it never asks.New
services/merge.shholds the shared prompt/fold;get_session_by_projectandfold_session_intoare the new adapter calls;notes_merge_trailincore/text.shbuilds the timestamp trail.Not covered:
focus-checkinwrites from cron with nobody to prompt, so it can still create a same-named row.audit clean, state-matrix 129/129, time-portability 20/20.