Commit 3538604
committed
Show the active team in the TUI statusline, with a tri-state
Adds a Team statusline item showing the window's active team, rendered only
when the user is on more than one. The condition reuses can_switch_teams --
the predicate gating the GUI's title-bar team pill -- rather than a fresh
team-count check, so the two front-ends cannot disagree about who counts as
multi-team. Clicking it opens the same switcher /team surfaces.
The item is hidden from /statusline entirely below two teams. With one team
it renders nothing, so offering a checkbox would offer one that lies. Above
two teams it is listed, checked by default, and an explicit uncheck is
permanent across any number of team-count changes.
`enabled` cannot express that, since absence from it already means "off".
Hence show_active_team: Option<bool>, None meaning undecided-so-shown, with
is_enabled absorbing the branch. Two properties fall out rather than being
arranged: an older saved config has no such field, so serde gives None, so
it shows, needing no back-fill; and normalized() cannot sweep the item into
enabled because it is never in enabled.
The cost is that one item's checkbox reads a different field from the other
fifteen. That asymmetry is real -- this is the only item defaulting to on
whose availability depends on the user's teams -- and is better visible than
hidden behind machinery implying the others work the same way.
Two things the tests caught:
- Hiding the row dropped Team from the saved order, so normalized() then
re-appended it at the end; opening /statusline as a one-team user would
have permanently moved the item to the bottom of the catalog. Its position
is now restored from the config the picker opened with.
- The picker never records a decision it was not offered, so a one-team user
cannot silently opt out by opening /statusline once.
Resyncs on TeamsChanged and on WindowTeamChanged filtered to this window,
matching every other live-valued statusline item.
CHANGELOG-TUI: The Warp Agent CLI statusline now shows your active team when you belong to more than one.1 parent 61be7e3 commit 3538604
7 files changed
Lines changed: 447 additions & 25 deletions
File tree
- app/src/settings
- crates/warp_tui/src
- terminal_session_view
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
692 | 695 | | |
693 | 696 | | |
694 | 697 | | |
| |||
706 | 709 | | |
707 | 710 | | |
708 | 711 | | |
709 | | - | |
| 712 | + | |
710 | 713 | | |
711 | 714 | | |
712 | 715 | | |
| 716 | + | |
713 | 717 | | |
714 | 718 | | |
715 | 719 | | |
| |||
729 | 733 | | |
730 | 734 | | |
731 | 735 | | |
| 736 | + | |
732 | 737 | | |
733 | 738 | | |
734 | 739 | | |
| |||
759 | 764 | | |
760 | 765 | | |
761 | 766 | | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
762 | 779 | | |
763 | 780 | | |
764 | 781 | | |
| |||
773 | 790 | | |
774 | 791 | | |
775 | 792 | | |
| 793 | + | |
776 | 794 | | |
777 | 795 | | |
778 | 796 | | |
| |||
798 | 816 | | |
799 | 817 | | |
800 | 818 | | |
801 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
802 | 824 | | |
803 | 825 | | |
804 | 826 | | |
805 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
806 | 840 | | |
807 | 841 | | |
808 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
125 | 193 | | |
126 | 194 | | |
127 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
98 | 119 | | |
99 | 120 | | |
100 | 121 | | |
| |||
103 | 124 | | |
104 | 125 | | |
105 | 126 | | |
106 | | - | |
| 127 | + | |
| 128 | + | |
107 | 129 | | |
108 | 130 | | |
109 | 131 | | |
110 | 132 | | |
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
114 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
115 | 142 | | |
116 | 143 | | |
117 | 144 | | |
| |||
124 | 151 | | |
125 | 152 | | |
126 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
127 | 157 | | |
128 | 158 | | |
129 | 159 | | |
| |||
138 | 168 | | |
139 | 169 | | |
140 | 170 | | |
| 171 | + | |
141 | 172 | | |
142 | 173 | | |
| 174 | + | |
143 | 175 | | |
144 | 176 | | |
145 | 177 | | |
| |||
222 | 254 | | |
223 | 255 | | |
224 | 256 | | |
225 | | - | |
| 257 | + | |
226 | 258 | | |
227 | 259 | | |
228 | 260 | | |
229 | 261 | | |
230 | 262 | | |
231 | 263 | | |
232 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
233 | 274 | | |
234 | 275 | | |
235 | 276 | | |
236 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
237 | 286 | | |
238 | 287 | | |
239 | 288 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
248 | 292 | | |
249 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
250 | 307 | | |
251 | 308 | | |
252 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
| |||
0 commit comments