Repository navigation
feat(status): mark what moved since I last looked - #104
Merged
Merged
Conversation
The table had no memory: a sweep overwrote what it knew, so finding the two rows that changed meant re-reading all of them. A watermark records what a row said the moment it was shown, and the next time status or the picker shows it, a row whose bucket or whose facts moved is marked in the gutter, with a line above its group saying where it came from and what moved. A pull request never shown is marked apart, as new. The watermark is kept on its own and not on Facts, because a quiet PR carries its old facts forward and a moment stored there would be about the wrong thing. Only a command that puts rows on screen moves it: a sweep shows nothing, and moving it there would erase movement nobody saw. It is also kept apart from the acknowledgement, since printing a row is not reading its conversation. Closes #56 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The review found the gutter spliced onto a row twice, once by status and once by the picker, and a watermark write that ran before the troubles printed, so a store that refused it would hide what the sweep could not load. The row now draws its own gutter, the write comes last, and the names follow the glossary: a row never shown is new. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
dw-mc statushas no memory: a sweep overwrites what it knew, so finding the two rows that changed means re-reading all of them. A watermark records what a row said the moment it was shown, and the next timestatusor the picker shows it, a row that moved is marked*and a pull request never shown is marked+. A line above the group says where the row came from and which facts moved. A sweep shows nothing, so it never moves the watermark.Closes #56.
What changes
src/domain/watermark.ts— the record, in awatermarksnamespace of its own rather than onFacts; movement is a bucket transition plus the facts that moved with it, and a new head alone or a mergeability GitHub has not worked out yet is not movement.src/cli/row.ts— every row draws a one-character gutter, so the columns line up in the table and the picker alike;dw-mc statusprints the↳lines above each group and writes the watermark last, after anything it could not load.minorchangeset.Test plan
pnpm check— pass, 751 testssrc/domain/watermark.test.ts— 12 cases: new vs still vs moved, a head alone, each fact that moves, a red CI called flaky,unknownmergeability, the store round tripsrc/cli/status.test.ts— 6 new cases: twice with nothing between marks nothing, a transition line above the group with aligned columns, movement inside a bucket, a new PR beside a known one, a sweep leaves the mark in place, a sweep alone leaves a PR newsrc/cli/pick.test.ts— 2 new cases: the picker marks a PR it never showed, and opening it moves the watermarkdw-mc statustwice on a real repository, then again after a push or a CI changeRisk
Low: it writes only to the state directory. The first
statusafter upgrading marks every row+, because nothing has been recorded as shown yet. Way back:git revert, and deletingwatermarks/resets every mark to new.🤖 Generated with Claude Code