Update the file list for the code tab. #211

Closed
opened 2026-09-08 19:27:54 +00:00 by crueber · 3 comments
Owner

Right now, on the code tab, for all the files, on the right side it shows mode and size.

Instead, let's model closer to how it looks with an ls -la command on linux, which looks like this:

image

I want it to be:

[file mode] [file size] [file type] [file name] ---> [last modified relative/absolute datetime, right aligned]

examples of file mode might be .rw-rw-r-- or drwxrwxr-x
examples of file size should be number in its own row, and size type in its own row "17" "KB", or "414" "B", or "18" "MB".

This is how it currently looks: image

No need to update the font.

Right now, on the code tab, for all the files, on the right side it shows mode and size. Instead, let's model closer to how it looks with an `ls -la` command on linux, which looks like this: ![image](/attachments/2d0b1282-a25f-4dd7-8c60-ec39e830f871) I want it to be: [file mode] [file size] [file type] [file name] ---> [last modified relative/absolute datetime, right aligned] examples of file mode might be `.rw-rw-r--` or `drwxrwxr-x` examples of file size should be number in its own row, and size type in its own row "17" "KB", or "414" "B", or "18" "MB". This is how it currently looks: ![image](/attachments/30d8eaf2-5d8a-4841-bf09-f84d72ada142) No need to update the font.
Author
Owner

Fix is up: PR #219 (branch fix/issue-211) — ls-style columns [mode] [size-num] [size-unit] [type] [name] → [last modified]. Datetime decision: every row shares the containing commit's stamp (one cached commits?n=1, never blocks first paint) — per-file last-touch would be N+1, see the PR description and code comments for the full trade-off. 423/423 node tests green, vite build clean, both themes browser-verified with zero console errors. No backend change, no new deps.

Fix is up: PR #219 (branch fix/issue-211) — ls-style columns [mode] [size-num] [size-unit] [type] [name] → [last modified]. Datetime decision: every row shares the containing commit's stamp (one cached commits?n=1, never blocks first paint) — per-file last-touch would be N+1, see the PR description and code comments for the full trade-off. 423/423 node tests green, vite build clean, both themes browser-verified with zero console errors. No backend change, no new deps.
Author
Owner

Review of PR #219 (fix/issue-211, commit 7482120) — verified in scratch worktree /tmp/pr219, main untouched.

PASS — ready to merge. Checklist against #211 spec ([mode] [size-num] [size-unit] [type] [name] → [datetime right]):

  • Column order (web/src/pages/Tree.jsx:234,246-259): header and row cells both render mode → size-num → size-unit → type → icon → name → last-modified (right-aligned). The icon cell between type and name is pre-existing, kept deliberately and documented (format.js:134-136) — accepted, not a blocker.
  • Mode lead chars (format.js:109-114): canonical modes decide alone — 100644/100755→'.', 040000/40000→'d', 120000→'l', 160000→'m'. Matches issue examples (.rw-rw-r--, drwxrwxr-x). type only disambiguates non-canonical fallback strings. Submodule m--------- unchanged from #29 (lead-m + nine no-bit dashes).
  • Size ladder (format.js:14-24): fmtSizeParts shares scaleSteps with fmtSize — cannot drift. fmtSize byte-identical, pinned by test 'fmtSize output is unchanged by the #211 split-column refactor' (format.test.js:38-43).
  • Binary vs SI (format.js:35-45): 1024-steps throughout, matching the rest of the app (fmtSize always divided by 1024). Uppercase KB/MB vs lowercase k/MB coexist deliberately and documented — no inconsistency introduced.
  • Type labels (format.js:137-143): mode decides symlink (120000, ls-tree reports blob) and submodule (160000/commit); tree→dir; else file. Sound against parseLsTree (internal/api/render.go:182-212).
  • DATETIME: verified TreeEntry (internal/api/env.go:324-330) carries no time and Tree() (internal/api/bind_wal.go:376-400) never populates TreeResult.Commit — per-file last-touch would be N+1 log calls, so the containing-commit proxy is the only cheap source. Documented as such in Tree.jsx:188-197. First paint never blocked: independent useData (Infinity cache, key sha::commits1, shared across dir navigations — data.js:228-238) + DateTime falsy→'' (DateTime.jsx:14). No fetch fires for empty/degraded repos (Tree.jsx:199-206).
  • No owner/group, no font change (existing text-xs/muted/tabular/font-mono classes only), no new deps (3 files: format.js, Tree.jsx, format.test.js; imports are local modules + existing DateTime), no Go touched, law 12 decisions documented in code comments.

Verification: node --test web/test/unit/*.test.js → 423/423 pass (format.test.js 12/12 incl. new mode/size-split/kind contracts); vite build + esbuild SDK bundle clean. No browser drive per review instructions (node tests + reasoning); new cells use theme-aware 'muted' class + unchanged dark: name links, so dark+light risk is minimal.

No fixes pushed — nothing found worth changing.

Review of PR #219 (fix/issue-211, commit 7482120) — verified in scratch worktree /tmp/pr219, main untouched. PASS — ready to merge. Checklist against #211 spec ([mode] [size-num] [size-unit] [type] [name] → [datetime right]): - Column order (web/src/pages/Tree.jsx:234,246-259): header and row cells both render mode → size-num → size-unit → type → icon → name → last-modified (right-aligned). The icon cell between type and name is pre-existing, kept deliberately and documented (format.js:134-136) — accepted, not a blocker. - Mode lead chars (format.js:109-114): canonical modes decide alone — 100644/100755→'.', 040000/40000→'d', 120000→'l', 160000→'m'. Matches issue examples (.rw-rw-r--, drwxrwxr-x). type only disambiguates non-canonical fallback strings. Submodule m--------- unchanged from #29 (lead-m + nine no-bit dashes). - Size ladder (format.js:14-24): fmtSizeParts shares scaleSteps with fmtSize — cannot drift. fmtSize byte-identical, pinned by test 'fmtSize output is unchanged by the #211 split-column refactor' (format.test.js:38-43). - Binary vs SI (format.js:35-45): 1024-steps throughout, matching the rest of the app (fmtSize always divided by 1024). Uppercase KB/MB vs lowercase k/MB coexist deliberately and documented — no inconsistency introduced. - Type labels (format.js:137-143): mode decides symlink (120000, ls-tree reports blob) and submodule (160000/commit); tree→dir; else file. Sound against parseLsTree (internal/api/render.go:182-212). - DATETIME: verified TreeEntry (internal/api/env.go:324-330) carries no time and Tree() (internal/api/bind_wal.go:376-400) never populates TreeResult.Commit — per-file last-touch would be N+1 log calls, so the containing-commit proxy is the only cheap source. Documented as such in Tree.jsx:188-197. First paint never blocked: independent useData (Infinity cache, key sha:<sha>:commits1, shared across dir navigations — data.js:228-238) + DateTime falsy→'' (DateTime.jsx:14). No fetch fires for empty/degraded repos (Tree.jsx:199-206). - No owner/group, no font change (existing text-xs/muted/tabular/font-mono classes only), no new deps (3 files: format.js, Tree.jsx, format.test.js; imports are local modules + existing DateTime), no Go touched, law 12 decisions documented in code comments. Verification: node --test web/test/unit/*.test.js → 423/423 pass (format.test.js 12/12 incl. new mode/size-split/kind contracts); vite build + esbuild SDK bundle clean. No browser drive per review instructions (node tests + reasoning); new cells use theme-aware 'muted' class + unchanged dark: name links, so dark+light risk is minimal. No fixes pushed — nothing found worth changing.
Author
Owner

Fixed by PR #219 (review clean; datetime proxy justified against the API shape; 423/423), merged. Closing.

Fixed by PR #219 (review clean; datetime proxy justified against the API shape; 423/423), merged. Closing.
crueber added this to the v1 milestone 2026-09-10 22:27:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#211
No description provided.