Code page polish: size style, rwx modes, header meta line #29
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code page polish: size style, rwx modes, header meta line
Follow-up polish on the tree (code) page.
1. Size column: right-aligned,
92bstyle (no space, lowercase b)text-right; keeptabular-nums).fmtSize(web/src/lib/format.js): drop the space and lowercase the bytes suffix so the last character is always a letter —0b,92b,1023b,1k/47.2k,1MB,1GB. Updateformat.test.jsexpectations and every snapshot/text that asserts the old" B"spelling (grep1023 B/B"across web tests). Exact-bytestitletooltips stay ("48372 bytes").2. Modes as rwx triplets, incl. folders
Tree.jsxrenders rawe.mode(100644). Add a headless-testablefmtModehelper (same lib module):100644→rw-r--r--,100755→rwxr-xr-x,120000→rwxrwxrwx,160000→m---------? (decide + document: gitlink — pick something sane, tested),40000/040000→rwxr-xr-x. Tree entries of typetree(folders) MUST show their mode too whenever the API provides one (today the mode cell renders whatevere.modeholds — keep that, just formatted; if the API omits folder modes, leave blank, don't invent). Unit-test the mapping. Raw octal intitletooltip.3. Move the tree meta line into the header
Tree.jsxrenders<p class="muted …">{sha12} · {n} entries</p>below the tabs and above the file list. Remove that line; the repo header (Repo.jsxrepo-header, below owner/repo) already carries the{branch} @ {sha}pill — that stays the single place for it. Per the request: drop the entry count and don't re-state the branch name (the breadcrumb already shows the ref). Ift().shaon a subpath differs meaningfully from the header's head sha, keep it as a subtle crumb-adjacent suffix rather than a full line — decide in the change and note it in the PR.Acceptance criteria
92bstyle everywherefmtSizeis used; tests updated, green.node --testgreen; real-browser dark+light check of a tree page with mixed modes (incl. an executable + a subdir); zero console errors; no new deps.Starting work: branch fix/tree-polish from origin/main (clean worktree; user worktree left untouched). Plan: fmtSize 92b style, fmtMode helper + tests, Tree meta-line removal, right-aligned size column.
PR #30 opened: #30 (branch fix/tree-polish, from origin/main). All acceptance criteria verified — see PR description for test evidence. Not merging per instructions.
Follow-up on top of fix/tree-polish (
ccf88d4): dropped the Breadcrumb head link in Tree.jsx — at repo root no breadcrumb renders at all, on subpaths only the path segments render (e.g.sub / dir). Blob.jsx carried its own copy of the same pattern and got the identical removal for consistency. Verified:node --test web/test/unit/*.test.jsgreen (184 pass, incl. new breadcrumb-head regression test), plus a headless-Chromium drive (dark + light) confirming root shows no crumb line, subpath tree showssub / dir, blob showssub / dir / file.txt, zero console errors.Breadcrumb corrected on fix/tree-polish (
8dd0eff): first crumb is now a link to /{owner}/{repo} labeled literally root — never the branch name, so no duplication with the header branch@sha pill. Root shows just root; subpaths show root / sub / dir (root+intermediates linked, final strong). Blob keeps rev for subpath hrefs. Verified: node --test 184/184 green; headless-Chrome CDP drive of root tree, subpath tree, and blob on the rebuilt compose stack with zero console/page errors.Breadcrumb refinement landed on fix/tree-polish (
689a52a): Tree/Blob nav.crumbs now wrapped in 0}> — repo root renders no breadcrumb nav, subpaths keep root / sub / dir. node --test web/test/unit/*.test.js: 184 pass. Verified against rebuilt standalone stack: root resolve path="" (guard false), subpath path="sub" (guard true), deployed bundle contains the guard in both Breadcrumb fns. No headed-browser run in this env (no chrome system libs, no sudo); headed check still open if you want it.Review of PR #30 (fix/tree-polish, 4 commits aec3780..689a52a) — CLEAN, no fixes pushed.
Checked against the final contract (no breadcrumb at repo root; below root 'root / sub / dir', root first, never the branch name, Tree+Blob):
689a52a, since removed; main worktree untouched): node --test web/test/unit/*.test.js -> 184 pass / 0 fail; pnpm run build (vite + esbuild) clean.MERGE RECOMMENDATION: ready to merge (not merging per instructions). Browser dark+light evidence is the author's claimed headless-Chromium drives in issues #29 comments 392/395/398; I did not re-drive a browser in this pass.
Fixed by PR #30 (review clean, no findings; 184/184 node tests), merged. Closing.