Skip to content

Naming usage ui copy - #8357

Merged
AmethystLiang merged 2 commits into
mainfrom
fix/naming-usage-ui-copy
Jul 12, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
fix/naming-usage-ui-copy

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Describe the user-visible change.

Screenshots

  • Add screenshots or a screen recording for any new or changed UI behavior.
  • If there is no visual change, say No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI Review Report

Summarize the code review you ran with your AI coding agent. Include the main risks it checked, what it flagged, and what you changed or verified as a result.
Confirm that the review explicitly checked cross-platform compatibility for macOS, Linux, and Windows, including shortcuts, labels, paths, shell behavior, and any Electron-specific platform differences touched by this PR.

Security Audit

Provide a basic security audit summary from your AI coding agent. Call out any input handling, command execution, path handling, auth, secrets, dependency, or IPC risks that were reviewed, plus any follow-up needed.

Notes

Call out any platform-specific behavior, risks, or follow-up work.

Address prod-release-scan P2s:

- #8238: recognize Bitbucket Server (/projects|users/.../repos/.../pull-requests/N)
  and Azure DevOps (/_git/REPO/pullrequest/N) PR URL shapes in
  work-item-reference, alongside Bitbucket Cloud; graceful fallback preserved.

- #7574: getDisplayedUsagePercentage now rounds the used value before taking the
  `remaining` complement, so the compact status bar (raw usedPercent) and tooltip
  (pre-rounded clampUsedPercent) can no longer disagree by 1% at a .5 fraction.
  clampUsedPercent moves to the shared module as the single rounding source.

- #7459: mixed remote+local batch delete confirm no longer claims the whole
  batch is a permanent "remote host" delete — it now states remote items are
  permanent while local items move to the Trash/Recycle Bin.

- #8322: right-click-to-paste settings copy is platform-aware — "Control-click"
  on macOS, "Ctrl+right-click" on Windows/Linux — matching the ctrlKey gate.

Localization catalog synced (also picks up pre-existing UsagePercentageDisplayChangeNotice drift).
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 720159a0-124c-4cf4-9f74-ff67ff6d24de

📥 Commits

Reviewing files that changed from the base of the PR and between 3dc3aee and 6588bd9.

📒 Files selected for processing (2)
  • src/shared/usage-percentage-display.test.ts
  • src/shared/usage-percentage-display.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/shared/usage-percentage-display.test.ts
  • src/shared/usage-percentage-display.ts

📝 Walkthrough

Walkthrough

The changes add shared usage-percentage normalization and update its rounding tests and status-bar export. Pull-request URL parsing now supports additional Bitbucket and Azure DevOps formats. File deletion confirmations distinguish local and remote items with platform-specific trash wording. Terminal interaction descriptions vary by platform. English, Spanish, Japanese, Korean, and Chinese locales receive usage, terminal, deletion, and workspace dialog strings.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is just the template text and does not provide the required PR details. Replace the template placeholders with the real Summary, Screenshots, Testing, AI Review Report, Security Audit, and Notes details.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is related to the change but too generic to identify the main update. Rename it to a specific summary of the main change, such as platform-aware usage UI copy and deletion messaging updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/src/components/status-bar/tooltip.tsx (1)

296-311: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Downstream impact of the clampUsedPercent NaN gap.

This call site (clampUsedPercent(w.usedPercent)) is where the missing Number.isFinite guard in src/shared/usage-percentage-display.ts would surface as an invalid NaN% bar width/label if a provider returns non-finite usage. See the comment on that file for the root-cause fix.

🧹 Nitpick comments (1)
src/shared/usage-percentage-display.test.ts (1)

29-39: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Consider adding a non-finite case to the parity test.

Given the clampUsedPercent/getDisplayedUsagePercentage NaN-handling gap flagged in usage-percentage-display.ts, adding Number.NaN (or Infinity) to the raw array here would have caught that divergence.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 70852bb6-8e7e-4ea5-8a03-4231595a3bcc

📥 Commits

Reviewing files that changed from the base of the PR and between 9de1fb8 and 3dc3aee.

📒 Files selected for processing (12)
  • src/renderer/src/components/right-sidebar/useFileDeletion.ts
  • src/renderer/src/components/settings/TerminalInteractionSection.tsx
  • src/renderer/src/components/status-bar/tooltip.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/usage-percentage-display.test.ts
  • src/shared/usage-percentage-display.ts
  • src/shared/work-item-reference.test.ts
  • src/shared/work-item-reference.ts

Comment thread src/shared/usage-percentage-display.ts Resolved
Non-finite usedPercent inputs (NaN/Infinity) propagated through Math.round/min/max into the CSS bar width (`NaN%`) and displayed copy. clampUsedPercent now short-circuits to 0 in that case, with a test covering the divergence from getDisplayedUsagePercentage for the 'remaining' case.
@AmethystLiang
AmethystLiang merged commit c99095b into main Jul 12, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix: work-item naming, usage % rounding, and terminal/delete copy

Address prod-release-scan P2s:

- stablyai#8238: recognize Bitbucket Server (/projects|users/.../repos/.../pull-requests/N)
  and Azure DevOps (/_git/REPO/pullrequest/N) PR URL shapes in
  work-item-reference, alongside Bitbucket Cloud; graceful fallback preserved.

- stablyai#7574: getDisplayedUsagePercentage now rounds the used value before taking the
  `remaining` complement, so the compact status bar (raw usedPercent) and tooltip
  (pre-rounded clampUsedPercent) can no longer disagree by 1% at a .5 fraction.
  clampUsedPercent moves to the shared module as the single rounding source.

- stablyai#7459: mixed remote+local batch delete confirm no longer claims the whole
  batch is a permanent "remote host" delete — it now states remote items are
  permanent while local items move to the Trash/Recycle Bin.

- stablyai#8322: right-click-to-paste settings copy is platform-aware — "Control-click"
  on macOS, "Ctrl+right-click" on Windows/Linux — matching the ctrlKey gate.

Localization catalog synced (also picks up pre-existing UsagePercentageDisplayChangeNotice drift).

* Fix NaN% usage bar and label for non-finite provider values

Non-finite usedPercent inputs (NaN/Infinity) propagated through Math.round/min/max into the CSS bar width (`NaN%`) and displayed copy. clampUsedPercent now short-circuits to 0 in that case, with a test covering the divergence from getDisplayedUsagePercentage for the 'remaining' case.
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.

1 participant