Skip to content

feat: segmented storage breakdown bar with expandable Other - #1641

Merged
steipete merged 9 commits into
steipete:mainfrom
elijahfriedman:feature/storage-breakdown-segmented-bar
Jun 19, 2026
Merged

feat: segmented storage breakdown bar with expandable Other#1641
steipete merged 9 commits into
steipete:mainfrom
elijahfriedman:feature/storage-breakdown-segmented-bar

Conversation

@elijahfriedman

@elijahfriedman elijahfriedman commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace per-item storage bars with one segmented bar and matching legend
  • fold components beyond the eight-row budget into an expandable Other group without losing copyable paths
  • resize the live menu hosting row synchronously when Other expands or collapses, capped by the existing screen-aware viewport
  • keep tiny and zero-byte segments visible, aggregate overflow safely, and handle negative and Int64 boundary values
  • add localized long byte-unit labels across all 21 app languages, with singular/plural selection matching the displayed rounded value
  • show the overview Storage row as one compact inline total

Verification

  • swift test --filter 'StorageBreakdownSegmentTests|UsageFormatterTests|StatusMenuHostedSubmenuRefreshTests|ProviderStorageFootprintTests' - 64 tests passed on exact head
  • make check - passed with zero SwiftFormat or SwiftLint violations and all locale checks green
  • all 21 catalogs contain the storage controls and eight long byte-unit keys; the landed Mistral keys remain intact
  • swift test --filter LocalizationLanguageCatalogTests - 18 tests passed after allowing the four standard Italian singular byte-unit loanwords exposed by hosted shard 0
  • whole-branch autoreview - clean, confidence 0.86; focused height/plural repair review clean, confidence 0.87
  • freshly packaged app passed strict deep codesign verification and launched successfully
  • contributor collapsed/expanded screenshots below verify the segmented bar, legend, Other disclosure, and compact overview row

Exact candidate: 57ac6bae60f9500d042e197fa96d90e6ebd91f0c.

Maintainer live click-through was blocked by the unchanged macOS app-data privacy prompt, which was left untouched. The test instance was stopped cleanly; no stronger live claim is made.

Screenshots

Before:

Storage breakdown before Storage overview before

After:

Expanded segmented storage breakdown Collapsed segmented storage breakdown

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed June 19, 2026, 2:34 AM ET / 06:34 UTC.

Summary
The PR replaces the storage breakdown rows with a segmented SwiftUI bar, an expandable Other group, long byte-unit labels, synchronous hosted-menu height resizing, localization updates, and focused tests.

Reproducibility: not applicable. this is a feature PR for a user-visible storage-menu layout rather than a bug report. The relevant evidence is source review plus inspected before/after screenshots.

Review metrics: 2 noteworthy metrics.

  • Changed surface: 28 files, +637/-43. The PR spans SwiftUI menu behavior, formatter logic, tests, CHANGELOG, and localization catalogs.
  • Localization catalogs: 21 catalogs changed. The new Storage controls and long byte-unit labels are user-visible across all shipped languages.

Root-cause cluster
Relationship: canonical
Canonical: #1641
Summary: This PR is the active segmented storage breakdown landing path; the earlier same-author predecessor was closed unmerged before this one continued the work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add an eighth distinct segment color or cap visible non-Other rows at seven.

Risk before merge

  • [P1] The visible storage-menu UX replaces the existing per-item bars, so maintainers still need to accept the new presentation before merge.
  • The latest GitHub check rollup I inspected still had macOS test shards queued or in progress for the PR head, so merge should wait for normal required checks.

Maintainer options:

  1. Decide the mitigation before merge
    Land the segmented storage menu after maintainer UX acceptance, green final-head checks, and a small palette fix or explicit acceptance of the exact-eight duplicate color.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] A narrow automated repair can add an eighth distinct palette color or cap visible rows at seven; maintainer UX acceptance remains separate.

Security
Cleared: The diff changes SwiftUI menu rendering, localization strings, formatter logic, tests, and CHANGELOG without adding dependencies, scripts, secrets, permissions, or code-execution paths.

Review findings

  • [P3] Give the eighth visible storage segment its own color — Sources/CodexBar/StorageBreakdownMenuView.swift:60-68
Review details

Best possible solution:

Land the segmented storage menu after maintainer UX acceptance, green final-head checks, and a small palette fix or explicit acceptance of the exact-eight duplicate color.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is a feature PR for a user-visible storage-menu layout rather than a bug report. The relevant evidence is source review plus inspected before/after screenshots.

Is this the best way to solve the issue?

Yes, broadly; the patch reuses the existing StorageBreakdownMenuView and MenuHostingView paths and adds focused formatter/storage tests. Adding an eighth palette color or reducing the visible non-Other cap is the narrow remaining repair.

Full review comments:

  • [P3] Give the eighth visible storage segment its own color — Sources/CodexBar/StorageBreakdownMenuView.swift:60-68
    maxRows allows eight visible components, but segmentPalette only has seven colors and selection wraps by modulo. With exactly eight components, two unrelated legend rows share the same bar color; add an eighth distinct color or cap visible non-Other rows at seven.
    Confidence: 0.87

Overall correctness: patch is correct
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 88b467a17629.

Label changes

Label justifications:

  • P3: This is a low-risk visible storage-menu ergonomics feature with screenshot proof and no urgent regression, security, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The before/after screenshots in the PR body directly show the segmented storage menu, compact overview row, collapsed Other row, and expanded Other list.
  • proof: sufficient: Contributor real behavior proof is sufficient. The before/after screenshots in the PR body directly show the segmented storage menu, compact overview row, collapsed Other row, and expanded Other list.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The before/after screenshots in the PR body directly show the segmented storage menu, compact overview row, collapsed Other row, and expanded Other list.
Evidence reviewed

Acceptance criteria:

  • [P1] swift test --filter StorageBreakdownSegmentTests.
  • [P1] make check.

What I checked:

Likely related people:

  • fatiheminoge: Commit 5252068 introduced provider storage usage, including StorageBreakdownMenuView and ProviderStorageFootprint. (role: original provider storage feature contributor; confidence: high; commits: 5252068a1e1a; files: Sources/CodexBar/StorageBreakdownMenuView.swift, Sources/CodexBarCore/ProviderStorageFootprint.swift, Tests/CodexBarTests/ProviderStorageFootprintTests.swift)
  • steipete: Recent history includes hosted submenu reuse on main and PR-head commits completing segmented storage behavior, zero-byte rendering, expansion resizing, and localization test adjustment. (role: recent adjacent owner and PR head finisher; confidence: high; commits: 7c0ed036e2e6, f1323e615df9, e2bf24fc9c58; files: Sources/CodexBar/StatusItemController+HostedSubmenus.swift, Sources/CodexBar/StorageBreakdownMenuView.swift, Tests/CodexBarTests/LocalizationLanguageCatalogTests.swift)
  • soohanpark: Commit ad2a035 changed ProviderStorageFootprint publishing behavior and related tests in the data path feeding this menu. (role: recent storage-footprint contributor; confidence: medium; commits: ad2a035f6601; files: Sources/CodexBar/UsageStore+ProviderStorage.swift, Sources/CodexBarCore/ProviderStorageFootprint.swift, Tests/CodexBarTests/ProviderStorageFootprintTests.swift)
  • elijahfriedman: Separate from authoring this PR, commit 2fd41ef recently changed hosted menu card resizing behavior adjacent to the expansion-height path modified here. (role: recent hosted-menu contributor; confidence: medium; commits: 2fd41efd4ac3; files: Sources/CodexBar/StatusItemController+HostedSubmenus.swift)
  • LeoLin990405: Commit 4c092ce changed in-menu copy behavior after hosted-menu beachballing, touching the same storage copy-button surface. (role: recent adjacent availability contributor; confidence: medium; commits: 4c092ce344c5; files: Sources/CodexBar/StorageBreakdownMenuView.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67b945c990

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/CodexBar/StorageBreakdownMenuView.swift Outdated
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. labels Jun 19, 2026
@elijahfriedman
elijahfriedman force-pushed the feature/storage-breakdown-segmented-bar branch from a9d4709 to 24ddadf Compare June 19, 2026 00:31
@elijahfriedman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. proof: sufficient Contributor real behavior proof is sufficient. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 19, 2026
@elijahfriedman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot removed the P1 Urgent regression or broken agent/channel workflow affecting real users now. label Jun 19, 2026
@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. and removed merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Jun 19, 2026
@steipete
steipete force-pushed the feature/storage-breakdown-segmented-bar branch from 52e561d to f568717 Compare June 19, 2026 05:52
@steipete

Copy link
Copy Markdown
Owner

Exact-head maintainer proof for 57ac6bae60f9500d042e197fa96d90e6ebd91f0c:

  • Hosted CI passed all four macOS shards, Linux x64/arm64 builds and tests, independent lint, aggregate gating, and security checks.
  • 64 focused storage-segment, formatter, hosted-submenu, and provider-storage tests passed on the final head.
  • make check passed with no format, lint, package, parser, release-guard, or locale findings.
  • All 21 app catalogs contain the storage controls and long byte-unit keys while retaining the landed Mistral labels.
  • Final whole-branch autoreview was clean, confidence 0.86; focused expansion-height/plural repair review was clean, confidence 0.87.
  • The expanded Other group synchronously updates the real menu hosting row's intrinsic height and remains capped by the screen-aware viewport.
  • A freshly packaged app passed strict deep codesign verification and launched successfully. Contributor collapsed/expanded screenshots verify the segmented bar, legend, disclosure, and compact overview row.
  • Maintainer click-through remained blocked by the untouched macOS app-data privacy prompt, so no stronger live interaction claim is made.

Ready to land.

@steipete
steipete merged commit c3a0e40 into steipete:main Jun 19, 2026
9 checks passed
@elijahfriedman
elijahfriedman deleted the feature/storage-breakdown-segmented-bar branch June 19, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants