Commit 4602709
authored
🤖 feat: init hook auto-scroll and duration display (#1240)
## Summary
Two UX improvements for init hook output:
### Auto-scroll to bottom while running
- Uses `flex-col-reverse` with reversed array for CSS-based scroll
anchoring
- No refs or effects needed - scroll naturally stays at bottom as lines
are added
### Duration display on completion
- Tracks `startTime` (from init-start) and `endTime` (from init-end)
- Computes `durationMs` and adds it to the DisplayedMessage type
- Shows human-friendly duration formatting:
- `<1s`: milliseconds (e.g., "832ms")
- `1-10s`: decimal seconds (e.g., "3.2s")
- `10-60s`: whole seconds (e.g., "45s")
- `>60s`: minutes and seconds (e.g., "2m 15s")
- Duration shown for both success and error states
---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking:
`high`_1 parent d0d1214 commit 4602709
File tree
3 files changed
+38
-10
lines changed- src
- browser
- components/Messages
- utils/messages
- common/types
3 files changed
+38
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
12 | 21 | | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
17 | 29 | | |
18 | 30 | | |
19 | 31 | | |
| |||
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
46 | | - | |
| 58 | + | |
47 | 59 | | |
48 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
54 | | - | |
| 68 | + | |
55 | 69 | | |
56 | | - | |
57 | | - | |
| 70 | + | |
| 71 | + | |
58 | 72 | | |
59 | 73 | | |
60 | 74 | | |
61 | | - | |
62 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
63 | 82 | | |
64 | 83 | | |
65 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| |||
1288 | 1289 | | |
1289 | 1290 | | |
1290 | 1291 | | |
1291 | | - | |
| 1292 | + | |
| 1293 | + | |
1292 | 1294 | | |
1293 | 1295 | | |
1294 | 1296 | | |
| |||
1321 | 1323 | | |
1322 | 1324 | | |
1323 | 1325 | | |
| 1326 | + | |
1324 | 1327 | | |
1325 | 1328 | | |
1326 | 1329 | | |
| |||
1624 | 1627 | | |
1625 | 1628 | | |
1626 | 1629 | | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1627 | 1634 | | |
1628 | 1635 | | |
1629 | 1636 | | |
| |||
1632 | 1639 | | |
1633 | 1640 | | |
1634 | 1641 | | |
1635 | | - | |
| 1642 | + | |
| 1643 | + | |
1636 | 1644 | | |
1637 | 1645 | | |
1638 | 1646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
0 commit comments