Skip to content

Add Implementation Design Proposals for human-readable Size, DateTime, and TimeSpan display#171

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/implement-file-length-proposal
Draft

Add Implementation Design Proposals for human-readable Size, DateTime, and TimeSpan display#171
Copilot wants to merge 4 commits intomasterfrom
copilot/implement-file-length-proposal

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 25, 2026

Get-ChildItem displays raw byte counts for file sizes, making large values (e.g., 1298450612224) difficult to read at a glance. Per the issue, this work produces implementation design proposals only — no runtime implementation changes.

New files

  • docs/design-proposals/human-readable-file-size-display.md — Full IDP for the Length column:

    • Documents current LengthString in FileSystemProvider.cs (raw .ToString())
    • Notes existing DisplayHumanReadableFileSize in Utils.cs (already used for copy/remove progress, binary-unit 1024-based)
    • Proposes three options: thousands separator (N0), human-readable units (1.18 TB), or the latter wrapped in an experimental feature
    • Recommended: Option 2 behind PSFileInfoHumanReadableSize experimental feature — mirrors precedent set by PSAnsiRenderingFileInfo
    • Covers binary vs. decimal units, offline file handling, column width, and backwards compatibility
  • docs/design-proposals/human-readable-datetime-display.md — Full IDP for human-readable DateTime display:

    • Documents current file-listing timestamp formatting via LastWriteTimeString and relevant formatter locations
    • Proposes absolute-only, relative, dual-format, and experimental-feature-gated options
    • Recommended: relative formatting behind an experimental feature
    • Covers rollout plan, compatibility risks, thresholds, and open design questions
  • docs/design-proposals/human-readable-timespan-display.md — Full IDP for human-readable TimeSpan display:

    • Documents current System.TimeSpan list/table/wide views in DotNetTypes_format_ps1xml.cs
    • Proposes numeric, humanized, dual-format, and experimental-feature-gated options
    • Recommended: humanized formatting behind an experimental feature
    • Covers unit/rounding rules, negative durations, test matrix, and open design questions

Additionally, the DateTime and TimeSpan proposal expansions were delivered in separate commits per PR feedback.

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement Easier to read file lengths</issue_title>
<issue_description>As asked in - PowerShell#24011

We need to look to implement as detailed in this comment just the Size

However we will not implement anything as part of this work & only bring about an intended plan of action under an Implementation Design Proposal.

We should do so for Size, DateTime & TimeSpan as seperate proposals</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Create implementation design proposal for easier to read file lengths Add Implementation Design Proposals for human-readable file size display Mar 25, 2026
Copilot AI requested a review from kilasuit March 25, 2026 06:12
@kilasuit
Copy link
Copy Markdown
Owner

@copilot Could you also look to fill out the other 2 design proposals please & seperate each into separate commits please

Copy link
Copy Markdown
Author

Copilot AI commented Mar 25, 2026

@copilot Could you also look to fill out the other 2 design proposals please & seperate each into separate commits please

Done. I fully expanded both remaining proposals and split them into separate commits:

  • DateTime proposal: 8f67d27
  • TimeSpan proposal: 64f6547

Copilot AI changed the title Add Implementation Design Proposals for human-readable file size display Add Implementation Design Proposals for human-readable Size, DateTime, and TimeSpan display Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Easier to read file lengths

2 participants