Repository navigation
One file-name helper and one set of byte units in the frontend (part of #1107) - #1161
Merged
Merged
Conversation
Part of #1107. - fileNameOf (path_display.js) replaces four local fileName helpers and nine inline copies of the same split. Sites that fell back to the whole path when it ends in a slash still do. - byte_size.js holds BYTES_PER_KB/MB/GB/TB, gbOrMbText (batch results, Demo Auditor) and renderSizeText (Render tab, Render While Capturing, take clean-up), which each had a copy. Every size reads the same as before: the different decimals per tab stay as they were. - shared_helpers_only.test.js fails on a new copy of either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 30, 2026
Closed
Closed
Owner
Author
|
Review: ready to merge. I compared every call site with the old code:
Merge notes:
|
ccoventry
added a commit
that referenced
this pull request
Oct 30, 2026
analyzer_pane.js after #1161: fileNameOf from path_display.js beside the analyzer_browser.js imports, and the split toast uses fileNameOf before relistFolderOf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccoventry
added a commit
that referenced
this pull request
Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Release note: none
Part of #1107 (audit batch B2: frontend duplicates).
What changes
No visible change: every size and file name reads exactly as before. The copies go.
fileNameOfinpath_display.jsalready existed, yet four modules defined their ownfileName(batch_catch_up.js,combine_clips.js,render_history.js,split_pane.js, whichanalyzer_pane.jsimported from) and nine more inlinedsplit(/[\\/]/).pop(). All usefileNameOfnow. The two sites that showed the whole path when the name came out empty (batch_catch_up.js,project_session.js) still do (fileNameOf(p) || p).byte_size.jswithBYTES_PER_KB/MB/GB/TB(standard section 4: no magic numbers) and the two formats that were copied:gbOrMbText("3.00 GB" / "20.9 MB"): was inbatch_results.jsandaudit_duplicates.js.renderSizeText(bytes, gbDecimals)(STRINGS.RENDER.fileSizeGb/Mb): was inrender_pane.js,render_while_capturing.jsandtake_cleanup.js, which differ only in GB decimals (kept: 2, 1, 2).setup_checklist.js,hd_progress.js,folder_pools.js,auditor_pane.js,capture_pane.js,scan_workers.jskeep their own formats but use the constants.shared_helpers_only.test.js: fails on a newsplit(/[\\/]/).pop()outsidepath_display.jsor a1024 * 1024 * 1024/1024 ** 3outsidebyte_size.js, so the copies don't come back.Decisions
analyzer_damage.js'ssizeText(MB/KB, and the web analyzer keeps a checked copy of analyzer code), andcapture_pane.js's free-space warnings, which divide by1e9(decimal GB) where the rest of the app uses 1024-based GB. That one is a real inconsistency (the Capture tab's "not enough space" numbers are about 7% bigger than the same bytes elsewhere) but fixing it changes what users see, so it is listed on [Chore] Audit the codebase's health, legibility and organisation #1107 for a separate PR.analyzer_pane.js's privateformatDuration(same name asrescan_estimate.js's, different output) is left for the analyzer_pane split (B7), which moves that code anyway.Test done
npm run test:unit: 122 files, 1,097 tests pass (addsbyte_size.test.js,shared_helpers_only.test.js).CI=1 npx playwright test(all specs, includingapp-boot.spec.js), own port: 449 passed.🤖 Generated with Claude Code