Commit 7b8a2b5
committed
feat(seer): Wire MentionInput into the Explorer chat input
Replace the plain InputGroup.TextArea in InputSection's enabled state with
MentionInput, wired to useOrgMentionSources() so @-mentioning a user or team
works the same way it does in issue activity notes.
The draft persisted via useDeferredSessionStorage moves from a plain
string to MentionInputValue ({text, mentions}); the storage key prefix is
bumped so stale string-shaped drafts from the old format are never read
back into the new shape.
Adds MentionInput.onOpenChange, a small addition to the core primitive:
Seer needs plain Enter to submit the message (unlike the note composer,
which sidesteps the ambiguity by requiring Cmd/Ctrl+Enter), so it needs to
know when the suggestion popup is open in order to defer to suggestion
selection instead of sending early.
explorerMenu's textAreaRef, slash-command detection, and PR-widget
anchor positioning are unaffected (previous commit already widened the ref
type; slash commands operate on inputValue.text, which is unchanged in
shape). The read-only/disabled input state is untouched, still a plain
disabled InputGroup.TextArea.
Known follow-up: the warning-colored placeholder text (shown when a
run is interrupted or times out) isn't replicated on MentionInput yet --
styling a generic component's ::before pseudo-element through emotion's
styled() fights the component's type parameter. The placeholder text
itself is unchanged, just not in the warning color.1 parent e5a2f35 commit 7b8a2b5
6 files changed
Lines changed: 125 additions & 67 deletions
File tree
- static/app
- components/core/mentionInput
- views/seerExplorer/components
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
163 | 183 | | |
164 | 184 | | |
165 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
Lines changed: 33 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
255 | 261 | | |
256 | 262 | | |
257 | 263 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
277 | 287 | | |
278 | 288 | | |
279 | 289 | | |
| |||
Lines changed: 37 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
22 | 33 | | |
23 | 34 | | |
| |||
133 | 144 | | |
134 | 145 | | |
135 | 146 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
| |||
320 | 330 | | |
321 | 331 | | |
322 | 332 | | |
323 | | - | |
| 333 | + | |
324 | 334 | | |
325 | | - | |
| 335 | + | |
326 | 336 | | |
327 | 337 | | |
328 | 338 | | |
| |||
346 | 356 | | |
347 | 357 | | |
348 | 358 | | |
349 | | - | |
| 359 | + | |
350 | 360 | | |
351 | 361 | | |
352 | 362 | | |
353 | 363 | | |
354 | | - | |
| 364 | + | |
355 | 365 | | |
356 | 366 | | |
357 | 367 | | |
| |||
375 | 385 | | |
376 | 386 | | |
377 | 387 | | |
378 | | - | |
| 388 | + | |
379 | 389 | | |
380 | 390 | | |
381 | 391 | | |
382 | 392 | | |
383 | | - | |
| 393 | + | |
384 | 394 | | |
385 | 395 | | |
386 | 396 | | |
| |||
451 | 461 | | |
452 | 462 | | |
453 | 463 | | |
454 | | - | |
| 464 | + | |
455 | 465 | | |
456 | 466 | | |
457 | 467 | | |
| |||
513 | 523 | | |
514 | 524 | | |
515 | 525 | | |
516 | | - | |
| 526 | + | |
517 | 527 | | |
518 | 528 | | |
519 | 529 | | |
| |||
566 | 576 | | |
567 | 577 | | |
568 | 578 | | |
569 | | - | |
| 579 | + | |
570 | 580 | | |
571 | 581 | | |
572 | 582 | | |
| |||
622 | 632 | | |
623 | 633 | | |
624 | 634 | | |
625 | | - | |
| 635 | + | |
626 | 636 | | |
627 | 637 | | |
628 | 638 | | |
| |||
653 | 663 | | |
654 | 664 | | |
655 | 665 | | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
| 666 | + | |
660 | 667 | | |
661 | 668 | | |
662 | 669 | | |
| |||
671 | 678 | | |
672 | 679 | | |
673 | 680 | | |
674 | | - | |
| 681 | + | |
675 | 682 | | |
676 | 683 | | |
677 | 684 | | |
| |||
692 | 699 | | |
693 | 700 | | |
694 | 701 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
| 702 | + | |
699 | 703 | | |
700 | 704 | | |
701 | 705 | | |
| |||
710 | 714 | | |
711 | 715 | | |
712 | 716 | | |
713 | | - | |
| 717 | + | |
714 | 718 | | |
715 | 719 | | |
716 | 720 | | |
717 | | - | |
| 721 | + | |
718 | 722 | | |
719 | 723 | | |
720 | 724 | | |
| |||
729 | 733 | | |
730 | 734 | | |
731 | 735 | | |
732 | | - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
733 | 739 | | |
734 | 740 | | |
735 | 741 | | |
| |||
748 | 754 | | |
749 | 755 | | |
750 | 756 | | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
| 757 | + | |
755 | 758 | | |
756 | 759 | | |
757 | 760 | | |
| |||
780 | 783 | | |
781 | 784 | | |
782 | 785 | | |
783 | | - | |
| 786 | + | |
784 | 787 | | |
785 | 788 | | |
786 | 789 | | |
787 | 790 | | |
788 | | - | |
| 791 | + | |
789 | 792 | | |
790 | 793 | | |
791 | 794 | | |
| |||
856 | 859 | | |
857 | 860 | | |
858 | 861 | | |
859 | | - | |
| 862 | + | |
860 | 863 | | |
861 | 864 | | |
862 | 865 | | |
| |||
0 commit comments