Repository navigation
Land a search hit as a jump: the hit flashes and the pill points back to present. - #30
Conversation
itz4blitz
left a comment
There was a problem hiding this comment.
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.
…ewest when its page fails.
|
Both fixed, thank you for reading it so closely. The match now takes On the same load path, a failed |
itz4blitz
left a comment
There was a problem hiding this comment.
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.
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.