Skip to content

fix(action-center): say "1 signal" in the history drawer - #1091

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/history-signal-plural
Oct 16, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:fix/history-signal-plural

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

The Action Center History drawer read "Consolidated from 1 signals" for an action opened by a single signal. actionCenter.historyPage.drawer.triggeredBy is now an ICU plural, written like the other count messages in en.json:

"Consolidated from {count, plural, one {# signal} other {# signals}}"

The key has one user (history-drawer.tsx), and en.json is the only locale. A new render test (history-drawer.test.tsx) draws the drawer with the real en.json and checks 1 → "1 signal" and 3 → "3 signals"; it fails against the old message.

Out of scope, for a separate PR: the drawer's and table's "Affected" badges (historyPage.affected.*, e.g. "1 signals") and "Time to Close" (drawer.days, "1 days") have the same issue.

Related issue

None.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Open Action Center → History in the demo org.
  2. Open an action that has a single trigger signal (e.g. AC-42, "Recover AI traffic across 2 pages", In Progress).
  3. Under What happened? the line reads "Consolidated from 1 signal". An action with several signals (e.g. AC-41) still reads "Consolidated from 3 signals".
  4. cd web && yarn test src/components/action-center/history-drawer.test.tsx

Checked in the browser in light and dark themes and at 1024px. Text-only change, no layout change.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Also passing: yarn test (720/720) and yarn build.

🤖 Generated with Claude Code

The History drawer's "Consolidated from {count} signals" line read
"1 signals" for an action opened by a single signal. Make it an ICU
plural and cover both counts with a render test against en.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk Small fix, ready for review: the History drawer said "Consolidated from 1 signals" for a single-signal action. drawer.triggeredBy is now an ICU plural, with a render test against en.json (1 → "1 signal", 3 → "3 signals"). Web only, no migration. Web tests (720/720), lint, typecheck, format and build pass; checked in the browser in both themes and at 1024px. The same "1 signals" / "1 days" issue in the Affected badges and Time to Close follows in a separate PR.

@gkhngyk gkhngyk 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.

Thanks, approving. The call site passes a number, and the render test passes on the tree merged with #1092.

@gkhngyk
gkhngyk merged commit 3ead5e4 into ansvisor:main Oct 16, 2026
6 checks passed
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.

2 participants