8000 feat(status): mark what moved since I last looked by dominikwozniak · Pull Request #104 · dominikwozniak/dw-mc · GitHub
[go: up one dir, main page]

Skip to content

feat(status): mark what moved since I last looked - #104

Merged
dominikwozniak merged 2 commits into
mainfrom
feat/56-watermark
Sep 18, 2026
Merged

dominikwozniak merged 2 commits into
mainfrom
feat/56-watermark

Conversation

@dominikwozniak
Copy link
Copy Markdown
Owner

dw-mc status has 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 time status or 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 a watermarks namespace of its own rather than on Facts; 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 status prints the ↳ lines above each group and writes the watermark last, after anything it could not load.
  • The picker marks its rows and moves the watermark once its list is on screen, whatever I pick.
  • CONTEXT.md — the Watermark term; README example and a minor changeset.

Test plan

  • pnpm check — pass, 751 tests
  • src/domain/watermark.test.ts — 12 cases: new vs still vs moved, a head alone, each fact that moves, a red CI called flaky, unknown mergeability, the store round trip
  • src/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 new
  • src/cli/pick.test.ts — 2 new cases: the picker marks a PR it never showed, and opening it moves the watermark
  • by hand, still to do: dw-mc status twice on a real repository, then again after a push or a CI change

Risk

Low: it writes only to the state directory. The first status after upgrading marks every row +, because nothing has been recorded as shown yet. Way back: git revert, and deleting watermarks/ resets every mark to new.

🤖 Generated with Claude Code

dominikwozniak and others added 2 commits September 18, 2026 12:59
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>
@dominikwozniak
dominikwozniak merged commit 26048d0 into main Sep 18, 2026
1 check passed
@dominikwozniak
dominikwozniak deleted the feat/56-watermark branch September 18, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

status: mark what moved since I last looked

1 participant

0