Skip to content

fix(desktop): agree nouns with counts (“1 Mac”, “Show 1 more model”) - #1472

Merged
jonathan308 merged 2 commits into
codex/desktop-mac-preview-20261012from
fix/desktop-pluralization
Oct 15, 2026
Merged

jonathan308 merged 2 commits into
codex/desktop-mac-preview-20261012from
fix/desktop-pluralization

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Several labels appended a fixed plural noun to a count:

Where Before After
Home → Your Macs heading (every single-Mac or unlinked user) 1 Macs 1 Mac
Models → list expander (e.g. a search leaving 4 results) Show 1 more models Show 1 more model
Models → recommendations footer 1 downloads · 6.1 GB total 1 download · …
Stats → request curve point (screen-reader label) 3:00 PM: 1 requests 1 request
Stats → token bar description Total 1 tokens Total 1 token

Found during the second desktop UI audit pass. Base: codex/desktop-mac-preview-20261012 (unmerged desktop stack: #1354 plus the signed preview packaging commits). The diff contains only this fix. The Desktop / frontend check on this base also needs #1455.

Before / After

flowchart LR
  subgraph Before["Before"]
    direction TB
    B1(["machines.length = 1"]):::user --> B2["`${n} Macs`"]:::bad
    B2 --> B3(["“1 Macs”"]):::bad
  end
  subgraph After["After"]
    direction TB
    A1(["machines.length = 1"]):::user --> A2["plural(n, 'Mac')"]:::fix
    A2 --> A3(["“1 Mac” · “2 Macs”"]):::good
  end
  classDef user fill:#1f2937,stroke:#93c5fd,color:#f9fafb
  classDef bad fill:#7f1d1d,stroke:#fca5a5,color:#fef2f2
  classDef fix fill:#065f46,stroke:#6ee7b7,color:#ecfdf5
  classDef good fill:#14532d,stroke:#86efac,color:#f0fdf4
Loading

Legend: blue = data, red = defect, green = changed code / fixed outcome. The same helper is used at all five sites.

Changes

  • format.ts: plural(value, one, many?, format = count) returns the formatted count with the agreeing noun.
  • FleetMacs.tsx, ExpandableModelList.tsx, RecommendedModels.tsx, stats/RequestCurve.tsx, stats/tokenSeries.ts: use it.
  • tests/pluralization.test.tsx (new): the helper, 1 Mac, Show 1 more model, and the singular token-bar description. All four tests fail on the base branch.
  • CHANGELOG.md: Unreleased entry.

Validation

cd desktop-app
npx vitest run tests/pluralization.test.tsx   # 4 fail on base, 4 pass here
npx vitest run tests/pluralization.test.tsx tests/modelsAutopilot.test.tsx tests/modelsManual.test.tsx tests/modelsRecommendations.test.tsx tests/stats.test.tsx tests/macStats.test.tsx tests/machines.test.tsx tests/app.test.tsx tests/format.test.ts
npx tsc --noEmit
npx prettier --check src tests
make docs-impact-check BASE=origin/codex/desktop-mac-preview-20261012

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Several labels appended a fixed plural to a count: every single-Mac or
unlinked user saw "1 Macs" above Home's Mac list, Models offered "Show 1
more models", recommendations said "1 downloads", and the Stats request
curve and token-bar descriptions read "1 requests" / "1 tokens".

Add a small plural() helper next to count() and use it at each site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 14, 2026 8:09pm UTC
d-inference-console-ui-dev Ready Ready Preview Oct 14, 2026 8:09pm UTC
d-inference-landing Ready Ready Preview Oct 14, 2026 8:09pm UTC
darkbloom-status Ready Ready Preview Oct 14, 2026 8:09pm UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 14, 2026 8:09pm UTC

Request Review

The live-activity summary printed a fixed plural next to the count, so a
single in-flight request read "1 requests processing".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308

Copy link
Copy Markdown
Collaborator Author

Follow-up 7d14f9c: live activity's summary read "1 requests processing" for a single in-flight request. Covered by a new case in pluralization.test.tsx (fails before, passes after).

@jonathan308
jonathan308 merged commit c5406ed into codex/desktop-mac-preview-20261012 Oct 15, 2026
30 of 33 checks passed

This branch was successfully deployed

5 active deployments
Preview – d-inference — 7d14f9c7 Deployed Oct 14, 2026 by vercel[bot]
Preview – d-inference-landing — 7d14f9c7 Deployed Oct 14, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 7d14f9c7 Deployed Oct 14, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 7d14f9c7 Deployed Oct 14, 2026 by vercel[bot]
Preview – darkbloom-status — 7d14f9c7 Deployed Oct 14, 2026 by vercel[bot]
benchmarks — 7d14f9c7 Deployed Oct 14, 2026 by jonathan308 via E2E Benchmarks #2652
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