Commit 56c23ad
muninkit: unify reading progress under ConsoleKit
ReadingProgress used raw ANSI (`\u{1B}[1;36m`, `\r`, `\u{1B}[2K`) and
hand-rolled isatty gating because ConsoleKit's LoadingBar has no
running-count primitive. Introduce `ReadingActivity`, a value-type
`ActivityIndicatorType` conformance, and wrap it in the generic
`ActivityIndicator<_>` the same way WritingProgress wraps ProgressBar.
ConsoleKit now owns the refresh loop, ephemeral-line handling, and
non-TTY fallback, and the raw escapes / FileHandle.write plumbing are
gone.
Gallery.swift call sites are unchanged (`ReadingProgress(header:)`,
`update(count:text:)`, `complete()`).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a6b78c7 commit 56c23ad
2 files changed
Lines changed: 42 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 139 | + | |
150 | 140 | | |
151 | 141 | | |
152 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
44 | 67 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
50 | 71 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 72 | + | |
| 73 | + | |
55 | 74 | | |
56 | 75 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 76 | + | |
| 77 | + | |
61 | 78 | | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
65 | | - | |
66 | 82 | | |
67 | 83 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
71 | 87 | | |
72 | | - | |
73 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
74 | 92 | | |
75 | 93 | | |
76 | | - | |
| 94 | + | |
77 | 95 | | |
78 | | - | |
79 | 96 | | |
80 | 97 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
86 | 101 | | |
87 | 102 | | |
0 commit comments