Lay overview out as a table

The status field was not a column: "*", "↑2", "✓" and "✓ (no upstream)"
are four different widths, so everything after them started somewhere
else on every line and the eye had to hunt along each row instead of
going down one.

Each field now has its own measured column: name (with the branch
appended when it is not master/main), a one-character dirty marker, the
sync state, host and age, then the mirrors. "(no upstream)" was fifteen
columns wide for something that is not even a problem, and is now "–".
Colour weights the row rather than decorating it -- a project that is
clean and in sync goes grey, the arrows and the dirty marker keep their
colour -- and the rows needing action sort to the top, alphabetically
within each group so positions stay predictable.

padRight counted bytes, which was fine while everything it padded was
ASCII; the arrows and check marks are three bytes and one column, so it
counts runes now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 17:42:37 +02:00
co-authored by Claude Opus 5
parent 86fb898df4
commit cb1ff98c3d
6 changed files with 194 additions and 67 deletions
+24 -12
View File
@@ -156,21 +156,33 @@ thing that sees the local base directory *and* the git server at once.
```
< src > overview
mgsh * ↑2 · desktop 3h · → hub,gitea
notes · laptop 2d
website ✓ (no upstream) · laptop 20d
3 projects · 1 dirty · 1 in sync
not on the git server: scratch, experiments (init)
not cloned here: oldproject (clone)
notes * ↑2 laptop 3h
website * ✓ desktop 2d → hub
Betaflight3.0.0 ✓ workstation 20d → gitea hub
scratch (wip) laptop 1h
4 projects · 2 dirty · 2 in sync
not on the server (init) experiments, sandbox
not cloned here (clone) oldproject
```
Per project: dirty marker, commits ahead/behind the upstream, the branch when it
is not `master`/`main`, and the mirror targets the repository has a remote for.
Every field sits in its own column, so the eye can go down one instead of
hunting along each line. The projects that need something done come first;
within a group the order stays alphabetical, so positions do not jump around.
The machine and age come from the commit itself — `push` writes `[user@host]`
into every message, so `overview` can say where a project was last worked on
without storing anything. On a setup spanning a laptop and a workstation that is
usually the piece of information you actually wanted.
| column | meaning |
|---|---|
| name | the project, with its branch appended when it is not `master`/`main` |
| `*` | uncommitted changes |
| `↑n` `↓n` | commits ahead of / behind the upstream (`↑2↓1` when both) |
| `✓` | in sync with the upstream |
| `` | the branch tracks nothing — never pushed |
| host, age | who last committed and when, from the `[user@host]` stamp |
| `→` | mirror targets this repository has a remote for |
The host and age come from the commit itself — `push` writes `[user@host]` into
every message, so `overview` can say where a project was last worked on without
storing anything. On a setup spanning a laptop and a workstation that is usually
the piece of information you actually wanted.
The two lists at the end are the join no git command can do: local projects the
server has never seen (`init` them) and server repositories missing on this