Commit cd78b76
fix(tabs): extracted co-tenant opens with only the moved tab
A freshly created co-tenant window is born with a throwaway `[No Name]`
scratch seed so it is renderable the instant `window_created` fires
(`build_fresh_layout_if_needed`). The extract flow then *added* the moved
buffer alongside that seed, so a single-file extraction opened the new
workspace showing the extracted file **and** a stray empty `[No Name]`
tab.
Drop the birth seed (via new `discard_fresh_window_seed`, guarded to only
ever touch a lone unnamed/unmodified buffer) right after creating the
co-tenant and before the move, so `move_buffer_membership_to_window`
re-seeds the split rooted at the extracted buffer — leaving it as the
window's sole tab. Applied to both the file and terminal extract paths.
Regression test `extract_tab_new_workspace_has_only_the_moved_tab`
asserts the co-tenant shows the moved file, contains no `[No Name]`, and
owns exactly one buffer.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQYut8xrWsYyQffc4D84dz1 parent e6b48da commit cd78b76
2 files changed
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
172 | 204 | | |
173 | 205 | | |
174 | 206 | | |
| |||
904 | 936 | | |
905 | 937 | | |
906 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
907 | 942 | | |
908 | 943 | | |
909 | 944 | | |
| |||
956 | 991 | | |
957 | 992 | | |
958 | 993 | | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
959 | 997 | | |
960 | 998 | | |
961 | 999 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
107 | 130 | | |
108 | 131 | | |
109 | 132 | | |
| |||
0 commit comments