Repository navigation
table: projects read as their names, with just enough path to tell two apart - #18
Merged
Merged
Conversation
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7.
The PROJECT column printed each project's full path. Inside
$HOMEthat was a short~/…, but anywhere else it was printed whole. On a real machine one row ran to about 90 characters, and the table no longer fit a terminal.portsis the first command anyone runs, and that's the first impression.The table and
--treenow name a project directory by its name (shop). When two different directories share a name, each gets just enough of its parents to tell them apart (work/api,oss/api). Container, systemd, Windows-side and unknown rows read as before.--json, csv/tsv, thediffreport and doctor's header line still carry the full path. So doeshere's "nothing running for …" message.windowsor—keeps its path, so it can't be mistaken for a Windows-side or unknown row./a/shopand/a/shop/) is one project.How it was verified
Gate, locally with CI's versions: unit ✓, build ✓, integration ✓ (uncached), installers ✓, gofmt ✓, vet ✓, lint ✓ (v2.13.2).
Real binary, with servers in
shop/,work/api/andoss/api/under a long scratch path:--json(ignoringstarted) and--format csvare identical to main.New tests:
TestTableProjectNames: names, disambiguation, other row kinds untouched, every line ≤100 columns.TestDistinctSuffixes.TestTableProjectNameEdges: thewindowsdirectory and a trailing slash.TestProjectHomeSiblingBoundarynow checks the path form (ProjectLabel), which csv/tsv, diff and doctor still print, so the~boundary stays covered.Docs: these table examples are re-rendered to exactly what the binary prints (each column as wide as its widest cell, plus 3 spaces), and the PROJECT column definition explains the new rule:
--helptext ofports,hereandwait.The
diffand doctor examples keep paths, because those outputs do. The landing page (web/lib/site.ts) is left for #9.Risk
Tier: risky, because
internal/inspect/output.gois on the risky-paths list. The actual change is to human-facing table text only.A fresh-context review said ok to ship. It confirmed that two different directories can never share a label, either within or across name groups, and that the doc tables match tabwriter output exactly. Its should-fixes are the second commit: the
windows/—collision, the doc wording, and cleaning paths before grouping.Notes for the release
The table shows project names (
shop, orwork/apiwhen two share a name) instead of full paths.--json, csv/tsv anddiffstill carry the full path.Generated by Claude Code