Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 28, 2025

Updates the install count badge on the website to display "1.0M" instead of "1033.4k" when the count exceeds 1 million.

Changes

  • Modified formatNumber() function in apps/web-roo-code/src/lib/stats.ts to check if the number is >= 1 million
  • If >= 1M, formats as millions (e.g., "1.0M", "2.5M")
  • Otherwise, continues to format as thousands (e.g., "337.2k")

Testing

  • Linting passed
  • Type checking passed
  • Function includes updated examples showing the new behavior

View task on Roo Code Cloud


Important

formatNumber() in stats.ts now formats numbers >= 1 million as millions (e.g., "1.0M") instead of thousands.

  • Behavior:
    • formatNumber() in stats.ts now formats numbers >= 1 million as millions (e.g., "1.0M").
    • Numbers < 1 million continue to be formatted as thousands (e.g., "337.2k").
  • Testing:
    • Linting and type checking passed.
    • Updated examples in formatNumber() to demonstrate new behavior.

This description was created by Ellipsis for 2c98dde. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor Author

roomote bot commented Nov 28, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. Found 1 issue requiring attention:

  • Add test coverage for the formatNumber function's new million formatting logic

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@github-actions
Copy link
Contributor

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-750ryg948-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 28, 2025
Comment on lines 106 to 115
function formatNumber(num: number): string {
// divide by 1000 to convert to "thousands" format,
// multiply by 10, floor the result, then divide by 10 to keep one decimal place.
// if number is 1 million or more, format as millions
if (num >= 1000000) {
const truncated = Math.floor((num / 1000000) * 10) / 10
return truncated.toFixed(1) + "M"
}

// otherwise, format as thousands
const truncated = Math.floor((num / 1000) * 10) / 10
// ensure one decimal is always shown and append "k"
return truncated.toFixed(1) + "k"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic change lacks test coverage. The function now has conditional branching that determines whether to format as millions or thousands, but there are no unit tests to verify this behavior works correctly for edge cases (e.g., exactly 1,000,000, values just under 1M, various million values). According to the project's Code Quality Rules, all code changes must have test coverage before completion.

Fix it with Roo Code or mention @roomote and request a fix.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 28, 2025
@mrubens mrubens marked this pull request as ready for review November 28, 2025 18:46
@mrubens mrubens requested review from cte and jr as code owners November 28, 2025 18:46
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Nov 28, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 28, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. The formatting logic is correct but requires test coverage:

  • Add test coverage for the formatNumber function's new million formatting logic

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@mrubens mrubens merged commit c688a64 into main Nov 29, 2025
35 checks passed
@mrubens mrubens deleted the fix/display-million-installs branch November 29, 2025 01:36
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Nov 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 29, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 29, 2025
* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* fix: filter native tools by mode restrictions

Native tools are now filtered based on mode restrictions before being sent to the API, matching the behavior of XML tools. Previously, all native tools were sent to the API regardless of mode, causing the model to attempt using disallowed tools.

Changes:
- Created filterNativeToolsForMode() and filterMcpToolsForMode() utility functions
- Extracted filtering logic from Task.ts into dedicated module
- Applied same filtering approach used for XML tools in system prompt
- Added comprehensive test coverage (10 tests)

Impact:
- Model only sees tools allowed by current mode
- No more failed tool attempts due to mode restrictions
- Consistent behavior between XML and Native protocols
- Better UX with appropriate tool suggestions per mode

* refactor: eliminate repetitive tool checking using group-based approach

- Add getAvailableToolsInGroup() helper to check tools by group instead of individually
- Refactor filterNativeToolsForMode() to reuse getToolsForMode() instead of duplicating logic
- Simplify capabilities.ts by using group-based checks (60% reduction)
- Refactor rules.ts to use group helper (56% reduction)
- Remove debug console.log statements
- Update tests and snapshots

Benefits:
- Eliminates code duplication
- Leverages existing TOOL_GROUPS structure
- More maintainable - new tools in groups work automatically
- All tests passing (26/26)

* fix: add fallback to default mode when mode config not found

Ensures the agent always has functional tools even if:
- A custom mode is deleted while tasks still reference it
- Mode configuration becomes corrupted
- An invalid mode slug is provided

Without this fallback, the agent would have zero tools (not even
ask_followup_question or attempt_completion), completely breaking it.

* Fix broken share button (RooCodeInc#9253)

fix(webview-ui): make Share button popover work by forwarding ref in LucideIconButton

- Convert LucideIconButton to forwardRef so Radix PopoverTrigger(asChild) receives a focusable element
- Enables Share popover and shareCurrentTask flow
- Verified with ShareButton/TaskActions Vitest suites

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* Reasoning effort: capability-driven; add disable/none/minimal; remove GPT-5 minimal special-casing; document UI semantics; remove temporary logs

* Remove Unused supportsReasoningNone

* Roo reasoning: omit field on 'disable'; UI: do not flip enableReasoningEffort when selecting 'disable'

* Update packages/types/src/model.ts

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Update webview-ui/src/components/settings/SimpleThinkingBudget.tsx

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

The OpenAI tool schema required both 'path' and 'line_ranges' in FileEntry,
but the TypeScript type definition marks lineRanges as optional. This caused
the AI to fail when trying to read files without specifying line_ranges.

Changes:
- Updated read_file tool schema to only require 'path' parameter
- line_ranges remains available but optional, matching TypeScript types
- Aligns with implementation which treats lineRanges as optional throughout

Fixes issue where read_file tool kept failing with missing parameters.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for read_file (RooCodeInc#9272)

When read_file encountered errors (e.g., file not found), it would call
handleError() which internally calls pushToolResult(), then continue to
call pushToolResult() again with the final XML. In native protocol mode,
this created two tool_result blocks with the same tool_call_id, causing
400 errors on subsequent API calls.

This fix replaces handleError() with task.say() for error notifications.
The agent still receives error details through the XML in the single
final pushToolResult() call.

This change works for both protocols:
- Native: Only one tool_result per tool_call_id (fixes duplicate issue)
- XML: Only one text block with complete XML (cleaner than before)

Agent visibility preserved: Errors are included in the XML response
sent to the agent via pushToolResult().

Tests: All 44 tests passing. Updated test to verify say() is called.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* refactor: centralize toolProtocol configuration checks

- Created src/utils/toolProtocol.ts with getToolProtocolFromSettings() utility
- Replaced all direct vscode.workspace.getConfiguration() calls with centralized utility
- Updated 6 files to use the new utility function
- All tests pass and TypeScript compilation succeeds

* refactor: use isNativeProtocol function from types package

* fix: format tool responses for native protocol (RooCodeInc#9270)

* fix: format tool responses for native protocol

- Add toolResultFormatting utilities for protocol detection
- ReadFileTool now builds both XML and native formats
- Native format returns clean, readable text without XML tags
- Legacy conversation history conversion is protocol-aware
- All tests passing (55 total)

* refactor: use isNativeProtocol from @roo-code/types

Remove duplicate implementation and import from types package instead

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <[email protected]>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#9195)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <[email protected]>

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <[email protected]>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (