Commit c494403
authored
fix(cli): repaint the progress line through stalled reads (#366)
* fix(cli): repaint the progress line through stalled reads
The styled progress line was driven only by scan events, so a read that
did not return froze it: a 40 s stall showed the pre-scan text and the
first redraw after it already read `Elapsed: 00:00:40`. A ticker thread
now repaints the retained event about once a second while the scan
thread is blocked, and five seconds of silence swaps the lead-in to
`Still reading`, the wording the desktop shell uses for the same state.
The plain (piped stderr) path is unchanged.
The short-stream notice sentence moves to `ShortStreamFile::notice`, the
one home the CLI, the desktop shell and the browser mirror now delegate
to; the wording is pinned there, and each surface asserts only that it
delegates.
* test(cli): keep the notice out of the assert message
* perf(cli): end the stall ticker on demand and skip it on a plain line
* refactor(cli): make the stall ticker a type instead of a generic wrapper
* test(cli): pin the tick interval, the ticker's stop, and drop a redundant guard1 parent 7d967e8 commit c494403
4 files changed
Lines changed: 515 additions & 128 deletions
File tree
- crates
- bdinfo-rs-core/src/bdrom
- bdinfo-rs-gui/src
- bdinfo-rs-wasm/src
- bdinfo-rs/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
87 | 107 | | |
88 | 108 | | |
89 | 109 | | |
| |||
277 | 297 | | |
278 | 298 | | |
279 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
280 | 315 | | |
281 | 316 | | |
282 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | 351 | | |
370 | 352 | | |
371 | 353 | | |
| |||
929 | 911 | | |
930 | 912 | | |
931 | 913 | | |
932 | | - | |
| 914 | + | |
| 915 | + | |
933 | 916 | | |
934 | 917 | | |
935 | 918 | | |
936 | | - | |
| 919 | + | |
937 | 920 | | |
938 | 921 | | |
939 | 922 | | |
| |||
1198 | 1181 | | |
1199 | 1182 | | |
1200 | 1183 | | |
1201 | | - | |
| 1184 | + | |
1202 | 1185 | | |
1203 | 1186 | | |
1204 | 1187 | | |
| |||
2278 | 2261 | | |
2279 | 2262 | | |
2280 | 2263 | | |
2281 | | - | |
| 2264 | + | |
2282 | 2265 | | |
2283 | 2266 | | |
2284 | 2267 | | |
| |||
2301 | 2284 | | |
2302 | 2285 | | |
2303 | 2286 | | |
2304 | | - | |
2305 | | - | |
2306 | | - | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
2310 | 2303 | | |
2311 | 2304 | | |
2312 | 2305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | 778 | | |
797 | 779 | | |
798 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
799 | 784 | | |
800 | | - | |
| 785 | + | |
| 786 | + | |
801 | 787 | | |
802 | 788 | | |
803 | 789 | | |
| |||
1264 | 1250 | | |
1265 | 1251 | | |
1266 | 1252 | | |
1267 | | - | |
1268 | | - | |
| 1253 | + | |
| 1254 | + | |
1269 | 1255 | | |
1270 | 1256 | | |
1271 | 1257 | | |
| |||
1619 | 1605 | | |
1620 | 1606 | | |
1621 | 1607 | | |
1622 | | - | |
| 1608 | + | |
1623 | 1609 | | |
1624 | 1610 | | |
1625 | 1611 | | |
| |||
1632 | 1618 | | |
1633 | 1619 | | |
1634 | 1620 | | |
1635 | | - | |
1636 | | - | |
1637 | | - | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1645 | 1630 | | |
1646 | 1631 | | |
1647 | 1632 | | |
1648 | 1633 | | |
1649 | 1634 | | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
| 1635 | + | |
1657 | 1636 | | |
1658 | 1637 | | |
1659 | 1638 | | |
| |||
0 commit comments