Loading
fix(ci): scroll and reveal truncated job names
Description
glab ci view draws each job in a box 20 columns wide. Job names longer than that are cut off with an ellipsis and there is no way to read the rest, which makes pipelines that use long, structured job names hard to navigate.
This MR gives the name back to the user in two ways:
- The selected job's name scrolls. A
titleScrolleradvances the visible window one column per redraw of the jobs view, resting a couple of redraws at each end so the start and the end of the name both stay readable. It rides the redraw the view already does once a second and introduces no timer of its own. Moving the selection restarts the scroll from the first character. Ctrl+Sshows the full name of the selected job in a modal, for jobs and downstream trigger jobs alike.
Related Issues
Resolves #8348 (closed)
How has this been tested?
- New
Test_titleScrollercovers a name that already fits, a full sweep and wrap across a long name, the restart when the selection moves, rune-vs-byte counting, and recovery from an out-of-range offset. Test_jobsViewasserts the rendered screen; the selected box now reads✔ stage1-job1-reallyrather than✔ stage1-job1-reall…, because the marquee fills the width and tview no longer appends its ellipsis.make test,make test-race, andmake lintpass.make gen-docsregenerateddocs/source/ci/view.md.- Checked by hand against a pipeline with long job names on : names scroll while selected, stop when the selection moves away, and
Ctrl+Sshows the untruncated name.