Repository navigation
Commit 2469adb
Elide long branch names, and add a hydration reminder (#8)
* Elide long branch names, and add a hydration reminder
Your screenshot showed the problem: a 69 character branch
(dubo-175-retire-k8s-lease-leader-election-from-the-sync-path-kill-gic) filled
the line, and the markers you actually watch while working, the dirty count and
ahead/behind, got pushed past the edge. Branch names longer than 28 cells are
now elided in the middle, keeping the ticket prefix and the subject and losing
the words between them: dubo-175-retir...path-kill-gic. Budget is
GLINT_BRANCH_MAX, with a floor of 8 cells so it can never elide to nothing.
Hydration joins the rest group on the same terms as the break nudge: invisible
until due, 45 minutes by default, firmer at twice that. It shares the idle-gap
clock rather than keeping its own, so both are read and written by one function
(two writers on one state file would race). A break resets water too, since
getting up is when you refill the glass, which leaves --drank for the times you
drink at your desk. --rest-status now prints both clocks.
The long-branch test builds a real git repo with a commit, because an unborn
branch makes rev-parse answer HEAD and the git segment never renders at all.
79 tests.
Co-Authored-By: Claude Code <[email protected]>
* fix: apply CodeRabbit auto-fixes
Fixed 3 file(s) based on 6 unresolved review comments.
Co-authored-by: CodeRabbit <[email protected]>
* Codex CLI support: session-log adapter and tmux output
No agent CLI other than Claude Code lets you supply the status line as a
command. Verified rather than assumed: Codex 0.146's tui.status_line takes a
fixed list of built-in item ids (openai/codex#20244, #17827), opencode 1.17 has
no statusLine anywhere in its shipped config schema or its 130MB bundle (the
proposal is anomalyco/opencode#30295, and a search summary claiming it shipped
is wrong), Hermes documents its bar as fixed, and the installed Cursor CLI
binary contains no statusline strings at all.
Codex does not need a hook. It already writes what matters to
~/.codex/sessions/<date>/rollout-*.jsonl: token_count records carrying
last_token_usage, cached_input_tokens and model_context_window, plus rate_limits
with used_percent, window_minutes and resets_at. codex_payload() translates
those into the same shape Claude Code pipes in, so nothing downstream changes,
and --tmux renders it into the tmux status bar instead of Codex's own.
main() split into argument handling plus build_line(payload), which is what
makes a second harness possible at all. The cache segment now prefers numbers
an adapter supplies, since only Claude Code has a transcript to derive them
from. to_tmux() rewrites SGR colours as tmux formats, doubles literal '#'
(tmux reads it as the start of a format) and strips hyperlinks.
Cost and lines changed are omitted for Codex because Codex does not record
them; better a missing segment than an invented number.
Two bugs the installer only revealed when run: --print fetched and overwrote
glint.py before previewing (it clobbered a working copy once), and the tmux
value nested double quotes inside a double-quoted string, which ended it
mid-path. --print is now a true dry run and the inner path is single-quoted.
88 tests.
Co-Authored-By: Claude Code <[email protected]>
* fix: apply CodeRabbit auto-fixes
Fixed 4 file(s) based on 9 unresolved review comments.
Co-authored-by: CodeRabbit <[email protected]>
* Update glint.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: oleg koval <[email protected]>
* Update glint.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: oleg koval <[email protected]>
* fix(ci): drop the orphaned try/with left by two overlapping edits
codex_payload had two stacked attempts at the same context-manager change:
try:
with open(path, ...) as f: <- no body, so this is a syntax error
try:
with open(path, ...) as fh:
head = list(_records(fh.read(65536)))
IndentationError on import, so every job failed at `import glint` on both 3.8
and 3.12. Removed the orphaned two lines and kept the `fh` version, which is
the one with a body. Nothing else touched.
Co-Authored-By: Claude Code <[email protected]>
---------
Signed-off-by: oleg koval <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <[email protected]>1 parent 6887c8a commit 2469adb
5 files changed
Lines changed: 839 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 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 | + | |
15 | 51 | | |
16 | 52 | | |
17 | 53 | | |
| |||
122 | 158 | | |
123 | 159 | | |
124 | 160 | | |
| 161 | + | |
125 | 162 | | |
126 | 163 | | |
127 | 164 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | | - | |
173 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| |||
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
186 | 227 | | |
187 | 228 | | |
188 | 229 | | |
| |||
0 commit comments