Skip to content

feat(sheet): Min/Max in the status-bar stats - #363

Merged
SamTV12345 merged 1 commit into
mainfrom
feat/sheet-stats-minmax
Jul 23, 2026
Merged

feat(sheet): Min/Max in the status-bar stats#363
SamTV12345 merged 1 commit into
mainfrom
feat/sheet-stats-minmax

Conversation

@SamTV12345

Copy link
Copy Markdown
Member

What

The spreadsheet status bar shows Average/Count/Sum for a numeric multi-cell selection. Excel also shows Min and Max — this adds them (order: Average, Count, Min, Max, Sum).

How

Two extra accumulators in the existing single-pass updateStats scan; formula cells count with their computed value, same as the other stats. Same numCount === 0 guard.

Tests

Extended the existing sheet_excel_chrome.spec.ts status-bar test with Min: 1 / Max: 3 assertions. Ran locally against a live server — passes. Sheet bundle builds clean; no new tsc errors.

🤖 Generated with Claude Code

Excel's status bar shows Average/Count/Min/Max/Sum for a numeric
selection; we only had Average/Count/Sum. Adds Min and Max to the same
single-pass scan. E2e assertion extended.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

feat(sheet): Add Min/Max to spreadsheet status-bar stats

✨ Enhancement 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Add Min/Max to status-bar stats for numeric multi-cell selections, matching Excel.
• Compute Min/Max in the existing single-pass selection scan without extra traversal.
• Extend Playwright e2e assertions to cover the new Min/Max outputs.
Diagram

graph TD
  A["Cell selection"] --> B["sheetEditor.updateStats"] --> C["Scan selected cells"] --> D["Compute avg/min/max/sum"] --> E["Render status-bar stats"]
Loading
High-Level Assessment

The chosen approach (two additional accumulators in the existing single-pass scan) is the simplest and most efficient way to add Min/Max while preserving current behavior (including the numCount===0 guard and formula-value handling).

Files changed (2) +9 / -2

Enhancement (1) +6 / -1
sheetEditor.tsCompute and render Min/Max in status-bar stats +6/-1

Compute and render Min/Max in status-bar stats

• Adds 'min'/'max' accumulators alongside the existing sum and counts, updating them during the same selection scan when numeric values are detected. Renders the status bar in Excel-like order: Average, Count, Min, Max, Sum, reusing the existing float-noise formatting helper.

ui/src/js/sheet/sheetEditor.ts

Tests (1) +3 / -1
sheet_excel_chrome.spec.tsAssert Min/Max appear in status-bar selection stats +3/-1

Assert Min/Max appear in status-bar selection stats

• Updates the existing status-bar e2e test to expect two additional stats: 'Min: 1' and 'Max: 3'. Also adjusts the test name to reflect the expanded stat set.

playwright/specs/sheet_excel_chrome.spec.ts

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@SamTV12345
SamTV12345 merged commit a2d914a into main Jul 23, 2026
13 checks passed
@SamTV12345
SamTV12345 deleted the feat/sheet-stats-minmax branch July 23, 2026 20:43
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