Commit fa90a42
fix(web): re-ask a run-owned open request's owner when the activation runs
Every ownership check so far ran when the request was made. The workspace can
park an activation behind an unsettled manual edit for an unbounded time, and
the gate that releases it only re-checks the source tab and the activation
sequence — neither of which a run or conversation handoff changes. So a
request enqueued by run A could still focus A's file after the user started
run B or moved to another chat.
Requests now carry `isStillOwned`, re-asked at the moment the activation
executes. A predicate rather than data because only the requester knows what
owning it means: run-owned opens carry their generation and conversation, the
settle watch carries its conversation, and a user's click carries nothing —
a user's choice cannot go stale by waiting.
This closes the class rather than another instance of it: anything that
becomes false between enqueue and activation is now caught at activation.
Also polls the delayed per-write assertion instead of asserting on the tick
after the release. That race made a green guard look like a blocking one under
full-suite load, which is an expensive way to be wrong.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQKCR9FRJiexWWUpcoFLpm1 parent cc37e27 commit fa90a42
4 files changed
Lines changed: 167 additions & 20 deletions
File tree
- apps/web
- src/components
- tests/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
215 | 224 | | |
216 | 225 | | |
217 | 226 | | |
| |||
1605 | 1614 | | |
1606 | 1615 | | |
1607 | 1616 | | |
| 1617 | + | |
1608 | 1618 | | |
1609 | 1619 | | |
1610 | 1620 | | |
1611 | 1621 | | |
1612 | 1622 | | |
1613 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1614 | 1630 | | |
1615 | 1631 | | |
1616 | 1632 | | |
1617 | | - | |
| 1633 | + | |
1618 | 1634 | | |
1619 | 1635 | | |
1620 | 1636 | | |
| |||
1624 | 1640 | | |
1625 | 1641 | | |
1626 | 1642 | | |
1627 | | - | |
| 1643 | + | |
1628 | 1644 | | |
1629 | 1645 | | |
1630 | 1646 | | |
| |||
1869 | 1885 | | |
1870 | 1886 | | |
1871 | 1887 | | |
1872 | | - | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
1873 | 1893 | | |
1874 | 1894 | | |
1875 | 1895 | | |
1876 | 1896 | | |
1877 | 1897 | | |
1878 | | - | |
| 1898 | + | |
1879 | 1899 | | |
1880 | 1900 | | |
1881 | 1901 | | |
| |||
2084 | 2104 | | |
2085 | 2105 | | |
2086 | 2106 | | |
| 2107 | + | |
2087 | 2108 | | |
2088 | 2109 | | |
2089 | 2110 | | |
| |||
2096 | 2117 | | |
2097 | 2118 | | |
2098 | 2119 | | |
2099 | | - | |
| 2120 | + | |
2100 | 2121 | | |
2101 | 2122 | | |
2102 | 2123 | | |
2103 | 2124 | | |
2104 | | - | |
| 2125 | + | |
2105 | 2126 | | |
2106 | 2127 | | |
2107 | 2128 | | |
2108 | | - | |
| 2129 | + | |
2109 | 2130 | | |
2110 | 2131 | | |
2111 | 2132 | | |
| |||
2170 | 2191 | | |
2171 | 2192 | | |
2172 | 2193 | | |
2173 | | - | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
2174 | 2199 | | |
2175 | 2200 | | |
2176 | 2201 | | |
| |||
2190 | 2215 | | |
2191 | 2216 | | |
2192 | 2217 | | |
2193 | | - | |
| 2218 | + | |
2194 | 2219 | | |
2195 | 2220 | | |
2196 | 2221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3561 | 3561 | | |
3562 | 3562 | | |
3563 | 3563 | | |
3564 | | - | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
3565 | 3576 | | |
3566 | | - | |
| 3577 | + | |
3567 | 3578 | | |
3568 | 3579 | | |
3569 | 3580 | | |
| |||
3844 | 3855 | | |
3845 | 3856 | | |
3846 | 3857 | | |
3847 | | - | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
3848 | 3870 | | |
3849 | 3871 | | |
3850 | 3872 | | |
| |||
7097 | 7119 | | |
7098 | 7120 | | |
7099 | 7121 | | |
| 7122 | + | |
| 7123 | + | |
| 7124 | + | |
7100 | 7125 | | |
7101 | | - | |
7102 | | - | |
7103 | | - | |
| 7126 | + | |
| 7127 | + | |
| 7128 | + | |
| 7129 | + | |
| 7130 | + | |
| 7131 | + | |
7104 | 7132 | | |
7105 | 7133 | | |
7106 | 7134 | | |
| |||
Lines changed: 90 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
80 | 91 | | |
81 | 92 | | |
82 | 93 | | |
83 | | - | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| |||
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
| 118 | + | |
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
| |||
173 | 185 | | |
174 | 186 | | |
175 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
176 | 262 | | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
835 | 843 | | |
836 | 844 | | |
837 | 845 | | |
| |||
0 commit comments