Fold the unpublished projects into the overview table

They were a list underneath the table, which meant reading the same
project names in two different shapes. They are rows now, with the action
in an "init" column that only appears when some row needs it, and they
sort to the bottom as their own group: an un-inited directory is a
different kind of task and should not push the daily ones down.

Every directory under the base gets a row, not just the repositories --
`init` is exactly what turns a plain directory into a project, so leaving
those out would have hidden the ones the column is for. Such a row has no
git state to show and costs no subprocesses either, since projectStatus
now checks for .git before running any.

The count line gained "N to init"; the projects count still counts
repositories, so the two numbers stay meaningful side by side. An
unreachable server marks nothing at all, as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 17:49:59 +02:00
co-authored by Claude Opus 5
parent 8ca05d6ad2
commit 61a7059f61
5 changed files with 160 additions and 98 deletions
+19 -12
View File
@@ -157,16 +157,18 @@ thing that sees the local base directory *and* the git server at once.
```
< src > overview
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
website * ✓ desktop 2d → hub
Betaflight3.0.0 ✓ workstation 20d → gitea hub
experiments init
sandbox (wip) laptop 1h init
4 projects · 2 dirty · 2 in sync · 2 to init
```
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.
hunting along each line. The projects that need something done come first, the
settled ones next, and the directories the git server does not have yet come
last — those are a different kind of task. Within each group the order stays
alphabetical, so positions do not jump around.
| column | meaning |
|---|---|
@@ -175,19 +177,24 @@ within a group the order stays alphabetical, so positions do not jump around.
| `↑n` `↓n` | commits ahead of / behind the upstream (`↑2↓1` when both) |
| `✓` | in sync with the upstream |
| `` | the branch tracks nothing — never pushed |
| `init` | the git server does not have this one; run `init` |
| host, age | who last committed and when, from the `[user@host]` stamp |
| `→` | mirror targets this repository has a remote for |
Every directory under the base gets a row, including those that are not
repositories at all — `init` is exactly what turns one into a project, so it
belongs in the table rather than in a list underneath it. Such a row simply has
no git state to show.
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 line at the end is the join no git command can do: the local projects the
git server has never seen, which are the ones `init` is for. If the server
cannot be reached, mgsh says so instead of claiming everything is missing. The
other direction — repositories on the server that are not here is what `list`
shows.
The `init` column is the join no git command can do. If the server cannot be
reached, no row is marked and mgsh says so — not knowing is not the same as
knowing they are missing. The other direction, repositories on the server that
are not here, is what `list` shows.
### Credential check