Repository navigation
Commit a9a4151
fix(web): keep the queue's reorder controls usable, and leave a dispatch trail (#35)
Two defects found by an adversarial review of the previous two commits, both
introduced by them, both reproduced in Chromium before being fixed. Twenty
candidate findings were raised; eighteen were refuted on inspection.
1. Tapping Edit could delete the message. Every `Button` carries a
`pointer-coarse:after:min-w-11` invisible 44px hit area that is NOT
pointer-events-none, so the four adjacent icon buttons overlapped on touch:
the right third of Edit hit-tested to Remove. Measured on the shipped
stylesheet — Edit's visible box spans x=[52,76] but only [42,68) resolves to
Edit, and a probe 3px inside its right edge returns "Remove queued message".
Fixed with `*:pointer-coarse:after:min-w-auto`, the same antidote the `Group`
primitive applies to adjacent buttons, plus a wider gap on coarse pointers so
the now-exact targets stay apart. Minimum height is left alone; nothing is
adjacent vertically.
2. Every reorder click destroyed keyboard focus. `busy` flips synchronously —
React commits the sync lane in a microtask queued before the mutation's —
so `disabled={busy || !canMoveUp}` disabled the very button the user had just
activated, and a disabled element loses focus to <body>. That is worse than
it sounds: the action cluster is only revealed on `:focus-within`, so it also
vanished, and the next move required tabbing from the top of the document.
`busy` is now guarded inside the handler instead of on the control, matching
upstream's own reorder buttons in `ProviderModelsSection.tsx:311`, and focus
is explicitly restored after the move commits — falling back to the opposite
arrow when the pressed one has reached the end of its travel.
Both fixes are behavioural, not cosmetic, and neither is covered by a unit test
because both live in DOM focus and hit-testing behaviour that jsdom does not
model. They were verified by direct browser reproduction instead.
Also adds the diagnostics the review showed were missing. A reorder that failed
rejected unhandled, so a click that quietly did nothing left no trace; it now
warns. And each composer submit records which way it went — queue, send, or
steer — with the connection phase, turn phase, queue depth and provider that
produced that decision. That matters because a steer refused by the adapter is
invisible to the client: `providerService.sendTurn` is forked in
ProviderCommandReactor, so the command has already succeeded by the time the
adapter declines. Both follow the `[thread-outbox]` prefix and structured-field
shape the module's four existing log sites already use, so one console filter
catches the lot.
Seam impact: `ChatView.tsx` +168/-1 → +181/-1 (risk 10140 → 10920) for the
breadcrumb; row and header totals updated. Everything else is fork-owned.
Verified: 80 tests green, typecheck and lint clean.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent 25dcb8d commit a9a4151
4 files changed
Lines changed: 158 additions & 42 deletions
File tree
- apps/web/src
- components
- chat
- outbox
- docs/t3x
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
5073 | 5074 | | |
5074 | 5075 | | |
5075 | 5076 | | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
| 5082 | + | |
| 5083 | + | |
| 5084 | + | |
| 5085 | + | |
| 5086 | + | |
| 5087 | + | |
| 5088 | + | |
5076 | 5089 | | |
5077 | 5090 | | |
5078 | 5091 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
140 | 153 | | |
141 | 154 | | |
142 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
143 | 165 | | |
144 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
145 | 179 | | |
146 | 180 | | |
147 | | - | |
| 181 | + | |
148 | 182 | | |
149 | 183 | | |
150 | 184 | | |
| |||
201 | 235 | | |
202 | 236 | | |
203 | 237 | | |
204 | | - | |
205 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
206 | 250 | | |
207 | 251 | | |
208 | | - | |
| 252 | + | |
209 | 253 | | |
| 254 | + | |
210 | 255 | | |
211 | 256 | | |
212 | 257 | | |
213 | 258 | | |
214 | 259 | | |
215 | 260 | | |
216 | 261 | | |
217 | | - | |
| 262 | + | |
218 | 263 | | |
| 264 | + | |
219 | 265 | | |
220 | 266 | | |
221 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments