Skip to content

Land a search hit as a jump: the hit flashes and the pill points back to present. - #30

Merged
itz4blitz merged 2 commits into
itz4blitz:mainfrom
unRekable:search/jump-landing
Oct 17, 2026
Merged

itz4blitz merged 2 commits into
itz4blitz:mainfrom
unRekable:search/jump-landing

Conversation

@unRekable

Copy link
Copy Markdown
Collaborator

Follows #20 (merged): a hit's landing now takes the jump path (\Purpose::Jump), so the message flashes where it lands and the jump-to-present pill is about the hit, not the unread line. The last-read page for a plain open is untouched, and the newest-preference does not hold a search hit back: the user clicked that message.

Cherry-picked from the end of the #20 branch, which merged just before this commit did.

@unRekable
unRekable requested a review from itz4blitz as a code owner October 17, 2026 18:08

@itz4blitz itz4blitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A search hit is dropped when this session already has a non-bottom place for that conversation. start takes landing and then matches back first, so Purpose::Restore runs and Purpose::Jump never does: no flash, and the pill is about the old scroll position. open_search_hit only calls jump_to when the conversation is already open, so this is the path for a hit in a chat you left mid-history.

Match landing before back and load Page::Around with Purpose::Jump. Keep restore, the unread around page, and the newest preference for opens that have no landing.

Same load path: a failed Purpose::Jump is ignored in loaded, and Jump sets no loading flag. On a fresh window that leaves a blank conversation with no retry. Purpose::Open used to surface that failure. If the Jump answer fails and nothing is held, fall back the way Restore does (Page::Newest, Purpose::Open).

Checked: already-open hits use jump_to → reveal (right id, one row of context, flash cleared only for that id). With no saved place, landing skips the newest filter and the unread page, reveal scrolls to that row, and away shows the existing jump pill (go_to_bottom when the New line is not below). Splitting landing.take() from around.take() does clear both. CI run 39056814689 was still in progress on macos, linux, and windows.

@unRekable

unRekable commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Both fixed, thank you for reading it so closely.

The match now takes landing before back, so a hit in a chat left mid-history jumps to the message; restore, the unread around page and the newest preference all stand for opens without a landing, and the saved place is not consumed, so a later open still restores.

On the same load path, a failed Purpose::Jump with nothing held falls back to Page::Newest with Purpose::Open, the way restore does, so a fresh window can no longer stand blank. One more came out of re-reading the path with your eyes: open_search_hit reached the pane through pane.get(), which is None before anything has opened, so the first hit of a session dropped its landing. It goes through the shell's pane(cx) now, which builds it.

@itz4blitz itz4blitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both fixes are on f74c0d6. A search landing is matched before the saved place, and that place is only cloned, so a later open still restores. A failed Jump with an empty window loads Newest as Open. The first hit of a session goes through pane(), so the landing is set before the conversation opens. I'll merge once macOS, Linux, and Windows are green.

@itz4blitz
itz4blitz merged commit 02e9bc7 into itz4blitz:main Oct 17, 2026
3 checks passed
@unRekable
unRekable deleted the search/jump-landing branch October 17, 2026 19:05
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.

2 participants