fix(browser-shell): pluralize + group folder item count, add filename title - #23
Conversation
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
CodeAnt AI is reviewing your PR. |
There was a problem hiding this comment.
Sorry @messagesgoel-blip, you have reached your weekly rate limit of 2500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBrowserShell introduces a shared Intl.NumberFormat for folder child counts and updates BrowserShellItem rendering to add title={item.name} on item name elements and to show formatted folder child counts with correct "item/items" pluralization. ChangesItem metadata and tooltip display
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request improves the file browser UI by adding a title attribute to show truncated item names and formatting the folder child count with proper singular/plural forms. The review feedback suggests optimizing performance by reusing a module-level Intl.NumberFormat instance instead of calling toLocaleString() on every render.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| {item.kind === 'folder' | ||
| ? `${(item.childCount ?? 0).toLocaleString()} ${item.childCount === 1 ? 'item' : 'items'}` | ||
| : formatSize(item.sizeBytes)} |
There was a problem hiding this comment.
Calling toLocaleString() on every render of BrowserShellItem can introduce a performance bottleneck, especially when rendering large lists or grids of files. Since toLocaleString() internally instantiates an Intl.NumberFormat instance on every call, it is highly recommended to reuse a single module-level Intl.NumberFormat instance instead.
To fix this, you can define a formatter at the top of the file (e.g., near line 43):
const numberFormatter = new Intl.NumberFormat();And then use it here to format the child count:
numberFormatter.format(item.childCount ?? 0)|
CodeAnt AI finished reviewing your PR. |
… title
- Folder tile meta: "1 items" -> "1 item" (count-aware plural) and thousands
separators via toLocaleString (e.g. 14,473 items)
- Item name span gains title={name} so truncated filenames are readable on hover
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
40e1714 to
aa1fa7f
Compare
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
|
Addressed @gemini-code-assist's suggestion: hoisted a module-level |
|



User description
What
Three small file-tile rendering fixes in
BrowserShell:1 items→1 item(count-aware).14473 items→14,473 itemsviatoLocaleString().title={item.name}to the item-name span so truncated names (e.g. long UUID folders) are readable on hover.Why
Surfaced during a Whimsy transfer-mode UI polish pass. The tile meta is rendered solely by the shell (no adapter override hook), so these had to land here.
Scope / risk
One render block, additive only. No API or type changes.
distis built on install viaprepare.Deploy note
Whimsy staging (
feat/onboarding-wizard-stage) is already repinned to this branch's commit (0f12b369) and verified in the served bundle. Production whimsy still pins the previous SHA and is unaffected until separately repinned.🤖 Generated with Claude Code
Summary by CodeRabbit
CodeAnt-AI Description
Show folder counts and file names more clearly in file tiles
What Changed
Impact
✅ Clearer folder counts✅ Easier to read large item totals✅ Readable full names for truncated tiles💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.