Mark a list column that continues off screen - #14
Merged
Merged
Conversation
Both dashboard columns scroll: window keeps the cursor visible and slides
only when it has to. Nothing said so. A list that fits and one that is cut
looked identical, and arrowing past the edge was the only way to find out
which you were looking at.
A clipped edge is now the ellipsis truncate already appends, which means
"cut off, there is more" everywhere else in the frame. One glyph rather
than a second symbol for the same fact.
No count. The project list's lines are projects, the sidebar's are thirds
of a session card, and one number cannot be right in both columns. Which
edge it sits on is the direction.
Three things the markers must not do, each pinned:
- Cover the cursor. They cost the first and last row, and a cursor
hidden behind one would make the arrows look like they had stopped
working at the edge of a long list. window centres focus, so the row
it is on is never an edge when a marker goes there — checked across
every focus at heights 3 to 9.
- Edit the list. The slice window returns aliases its input, so marking
in place would replace real rows in the caller's own list.
- Appear on a list that fits, or on a column too short to spare the
rows. Below three lines a clipped column would be all marker.
Rendered at both call sites to check it rather than assuming: the marker
lands in the cursor's own column in the project list, and replaces a card
line cleanly in the sidebar.
PR #12 gave x a modal with Close and Delete, and updated the key table, but left the prose under "Sessions and worktrees" describing only closing. It was not wrong, it was half the feature: a reader of that section would not learn Delete exists, or that nothing is forced. Docs only.
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.
Both dashboard columns already scroll —
windowkeeps the cursor visible and slides only when it has to. Nothing said so. A list that fits and one that is cut looked identical, and arrowing past the edge was the only way to find out which you were looking at.A clipped edge is now the ellipsis
truncatealready appends, so it means the same thing it means everywhere else in the frame.Decisions
No count. The project list's lines are projects; the sidebar's are thirds of a session card. One number cannot be right in both columns, so the marker says "more this way" and the edge it sits on says which way.
One glyph, not a new one.
util.go:23already uses…for "cut off, there is more". A second symbol for the same fact is a second thing to learn.The heading still scrolls away. Making it sticky costs two rows permanently, and the marker now tells you that you are scrolled. That is a real trade with no obvious winner, so it is left alone rather than decided quietly.
Three things the markers must not do, each pinned
windowcentres focus, so the row it is on is never an edge when a marker goes there —TestWindowNeverMarksOverTheCursorchecks every focus at heights 3 to 9.windowreturns aliases its input, so marking in place would replace real rows in the caller's own list.TestWindowDoesNotEditTheList.Verification
Rendered at both call sites rather than trusted from unit tests: the marker lands in the cursor's own column in the project list, and replaces a card line cleanly in the sidebar with the selected card intact between them.
Marking was disabled and the suite rerun.
TestWindowMarksAClippedEdgefails; the three guard tests pass, which is correct for guards.Second commit
Describe both outcomes of x in the README— PR #12 gavexa modal and updated the key table, but left the prose under Sessions and worktrees describing only closing. Docs only.