Commit 7d21b92
fix(webapp): stop smart column text re-truncating and the dialog growing
The truncated cell text visibly ate itself a character at a time on load. Two
separate causes:
Runaway loop. MiddleTruncate measures its parent, and the cell sat in a
max-width box inside an auto-width table column: eliding text narrowed the box,
which narrowed the column, which re-triggered truncation. Sampling showed it
never settled -- 226 chars down to 62 and still shrinking after six seconds. The
box is now a definite width, which its own content cannot influence, and the
decision to use it comes from the raw string length rather than from layout.
Late first pass. Truncation needs layout, so the server rendered the whole
string and it only shortened once React hydrated, ~3.6s in. MiddleTruncate now
accepts an optional initialCharBudget and seeds its first render with a
deterministic character-count truncation, so SSR and the pre-hydration client
agree and the measured pass only refines it (99 chars to 102 here, versus 226
to 102 before). Callers that don't pass it are unaffected.
Also:
- Size the dialog from the form column alone. The sample and preview panels
fill their column but no longer contribute height to it, so wrapped preview
text scrolls instead of pushing the dialog taller (verified stable at 732px
with four long rows).
- Give all three columns one title row so their labels line up (they sat 3px
apart because only two of them had a min-height).
- Swap the smart column row's remove and edit buttons.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 999aadf commit 7d21b92
4 files changed
Lines changed: 88 additions & 45 deletions
File tree
- apps/webapp/app/components
- primitives
- runs/v3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
| |||
22 | 36 | | |
23 | 37 | | |
24 | 38 | | |
| 39 | + | |
25 | 40 | | |
| 41 | + | |
26 | 42 | | |
27 | 43 | | |
28 | | - | |
29 | | - | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
Lines changed: 45 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
183 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
184 | 196 | | |
185 | 197 | | |
186 | 198 | | |
| |||
247 | 259 | | |
248 | 260 | | |
249 | 261 | | |
250 | | - | |
| 262 | + | |
251 | 263 | | |
252 | 264 | | |
253 | 265 | | |
| |||
258 | 270 | | |
259 | 271 | | |
260 | 272 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
285 | 299 | | |
286 | 300 | | |
287 | 301 | | |
288 | 302 | | |
289 | | - | |
| 303 | + | |
290 | 304 | | |
291 | 305 | | |
292 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
293 | 309 | | |
294 | 310 | | |
295 | 311 | | |
| |||
354 | 370 | | |
355 | 371 | | |
356 | 372 | | |
357 | | - | |
| 373 | + | |
358 | 374 | | |
359 | 375 | | |
360 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | 369 | | |
379 | 370 | | |
380 | 371 | | |
| |||
384 | 375 | | |
385 | 376 | | |
386 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
| |||
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
64 | | - | |
65 | | - | |
| 75 | + | |
66 | 76 | | |
67 | | - | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| |||
0 commit comments