Repository navigation
Commit cd5e9f9
fix(web): timeline viewport emits one navigation signal, and find reveals its match after a thread switch
The timeline's scroll input (wheel, touch, scrollbar pointer, scroll keys,
embedded-frame scroll) was heard separately by the follow hook, the position
restore and MessagesTimeline, each with its own listener effect and its own
"manual navigation" callback threaded through ChatView and GuestPage. When
the list switched to a thread with find already open, the position restore
and find's reveal both scrolled the list and the restore won, so the
remembered row showed instead of the match.
timelineViewport.ts owns the scroll node's listeners from the list's ref
callback and emits one TimelineNavigation signal. Follow subscribes to it
(onViewportAttach), the restore stops on it, and follow mode lives in a small
store read with useSyncExternalStore. Find reveals its match only after the
opening restore settles. Opening find announces navigation from the find
store's open action instead of an effect on findOpen.
Effects: MessagesTimeline 10 -> 1, useTimelineFollow 6 -> 1,
useTimelinePositionRestore 2 -> 0. The kept ones are the layout-effect
position restore (must land before paint after LegendList's layout effects)
and the anchor release scroll that follows the commit dropping the anchored
end space.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 0712398 commit cd5e9f9
11 files changed
Lines changed: 1164 additions & 731 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1999 | 1999 | | |
2000 | 2000 | | |
2001 | 2001 | | |
2002 | | - | |
2003 | 2002 | | |
2004 | | - | |
2005 | 2003 | | |
2006 | 2004 | | |
2007 | 2005 | | |
| |||
2011 | 2009 | | |
2012 | 2010 | | |
2013 | 2011 | | |
| 2012 | + | |
| 2013 | + | |
2014 | 2014 | | |
2015 | 2015 | | |
2016 | 2016 | | |
2017 | | - | |
2018 | 2017 | | |
2019 | 2018 | | |
2020 | 2019 | | |
2021 | | - | |
2022 | 2020 | | |
2023 | 2021 | | |
2024 | 2022 | | |
| |||
3365 | 3363 | | |
3366 | 3364 | | |
3367 | 3365 | | |
3368 | | - | |
3369 | | - | |
| 3366 | + | |
3370 | 3367 | | |
3371 | 3368 | | |
3372 | 3369 | | |
| |||
3387 | 3384 | | |
3388 | 3385 | | |
3389 | 3386 | | |
3390 | | - | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
3391 | 3391 | | |
3392 | 3392 | | |
3393 | 3393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
641 | 761 | | |
642 | 762 | | |
643 | 763 | | |
| |||
0 commit comments