Skip to content

fix(PowerSearch): the popover token reads its value in the provider locale - #13131

Merged
nynexman4464 merged 2 commits into
mainfrom
nynexman4464/fix/powersearch-token-i18n
Nov 21, 2026
Merged

nynexman4464 merged 2 commits into
mainfrom
nynexman4464/fix/powersearch-token-i18n

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A PowerSearch filter token in the popover presentation shows parts of its value in English under every locale:

  • the list, date-range and nested summaries ("3 items", "date range", "2 filters");
  • the items of a list value joined with a fixed ", ";
  • a number with a . decimal mark;
  • a relative date as its stored key (3d_ago) instead of the choice the person picked ("3 days ago").

The sheet presentation's Filters rows already read all of these in the provider locale. The two presentations of one field disagree, and no translation or override reaches the popover token.

Problem and solution fit

  • Why it happens: formatTokenValueText resolved those parts through the catalog and the locale only when it was handed a translator. The sheet passed one and the popover token did not, so the token fell back to English literals behind three eslint-disable comments.
  • Why it matters: architecture:internationalization INV1a (Astryx-owned text is a catalog message) and INV8 (locale-sensitive formatting goes through the shared helpers with the provider locale).
  • The fix:
    • formatTokenValueText always takes the translator. The popover token passes it. The three eslint-disable comments and the English literals are gone.
    • Lists join through the existing narrow conjunction list. Its Intl.ListFormat moves from the useListFormatter hook into a new internal i18n/listFormat.ts (createListFormatter(locale)), which the hook now calls. The PowerSearch formatters call it directly: formatFilterValue is on the server-safe PowerSearch/utils entry, which cannot import a client hook. The raw-Intl lint allowlist moves from the hook to the new file.
    • A relative-date value reads as the choice that offers it, through relativeDateLabel. The relative-date choices move from PowerSearchValueEditor.tsx into a small server-safe module, relativeDateOptions.ts, which the editors, the sheet and both token formatters share. The sheet's private copy of the lookup is removed.
    • formatFilterValue, used by the exported PowerSearchToken, joins lists and reads relative dates the same way.
    • The sheet no longer needs its own list formatter or relative-date special case: its Filters rows call the same function with the same arguments. PowerSearchSheetEditors drops buildRelativeDateOptions, which the sheet now imports from the small shared module (it is already in the sheet's graph through formatTokenValue.ts).

Expected behavior and authority

  • architecture:internationalization Owning code gains one entry for the new internal i18n/listFormat.ts (createListFormatter): the one narrow conjunction list format, which useListFormatter binds to the provider locale and the PowerSearch value formatters call directly because the server-safe PowerSearch/utils entry cannot import a client hook. This record edit needs an engineering owner's /approve-spec.
  • component:PowerSearch FR12 already specifies the Filters row's value text "as the trigger's token shows it — the same formatter, so the same words", with the summaries from the catalog, lists in the locale's narrow conjunction list, numbers in the locale's digits and decimal mark, and a relative date as its choice. The token now reads the same way.
  • The record's known gap said the popover token writes those parts as English literals and shows a relative date as its stored key. This PR removes that part of the gap. The four remaining differences between formatFilterValue and the token's text (entity wording, number rounding and units, the collapse rule, the cut mark) stay in the gap. The number difference is now stated in full: formatFilterValue rounds to three fraction digits, the token does not.

Smallest restoration

  • No API, prop, layout or interaction change. formatTokenValueText and relativeDateOptions.ts are internal; buildRelativeDateOptions keeps its signature.
  • English output changes in two places: a relative date reads "3 days ago" where it read 3d_ago, and a count of 1,000 or more items or filters groups its digits ("1,000 items"), as the catalog's {count, number} writes it. English lists and numbers read as before ("a, b, c", 2.3456, 1e-7).
  • Other locales change as FR12 already specifies for the sheet's rows: German reads "a, b und c" and "2,5"; Chinese and Japanese join lists with "、". Where the locale writes other digits or another decimal mark, a number uses them, unrounded and with no grouping ("0,0000001" for 1e-7 in German).

Evidence

  • Reproduction before the change: under a German provider, the popover token showed "a, b, c", "3 items", "date range", "1 filter", 3d_ago and "2.5".
  • Result after the change: "a, b und c", "3 Einträge", "Zeitraum", "1 Filter", "vor 3 Tagen" and "2,5" (catalog messages supplied by the test's provider).
  • Mutation-sensitive proof: 10 tests fail on main and pass with the change.
    • New PowerSearchTokenText.test.tsx: the German case, and the English case for the relative date.
    • formatFilterValue.test.ts: the German list join, and a relative date read as its choice. A value no choice offers still reads as stored.
    • Six PowerSearchBottomSheet.test.tsx cases now assert that the trigger's token reads the same text as the Filters row, where they used to assert the token kept its English literals. One is renamed to say so.
  • formatFilterValue side effects: it now measures the locale-joined text against the width budget, so German (" und ") collapses to a count a little sooner and Chinese and Japanese ("、") later; English is unchanged. A relative date now needs the caller's translator to resolve @astryx.powersearch.sheet.relative*; Core's translators do.

Scope

Components: PowerSearch (popover token value text, shared relative-date choices, formatFilterValue list join and relative date; record gap), i18n (listFormat.ts, useListFormatter; record Owning code)

  • One defect is restored: token value text that no translation could reach.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

Record edits: component:PowerSearch known gap (rewritten to the four remaining differences); architecture:internationalization Owning code (one entry for i18n/listFormat.ts).

  • R1 narration: none.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: none.
  • R5 pull request or issue references: none.
  • R6 ruled open questions still listing options: none.
  • R7 project status: none.

Testing

  • vitest --project ui on PowerSearch, i18n, FileInput (the other useListFormatter caller) and the ESLint plugin: 35 files, 804 tests pass.
  • vitest --project node on scripts/shared-identity.test.mjs, the swizzle proof samples and packages/cli/api/swizzle: pass.
  • tsc --noEmit (core): clean.
  • CI=true eslint (strict) on every changed file: no new findings. The three unused-type warnings in PowerSearch.tsx are on main.
  • no-comment-provenance.baseline.mjs --check: up to date.
  • pnpm check:knowledge, node scripts/check-i18n-catalog.mjs, node scripts/generate-i18n-runtime.mjs (English fallback maps and their wiring checks) and check:changesets: pass.
  • Local CI (lint, typecheck) at this head: pass. The heavy suites wait for review, as on GitHub; the suites listed above ran locally.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 2:22am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 20, 2026
@astracat-bot

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 2:22 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 3b3a676

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
PowerSearch · Storybook 317.1 kB (+62 B) · 27.1 kB CSS (0) 7,198 (−22) ✓ · ✓ · ✓
FileInput 77.0 kB (+9 B) · 12.6 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.90 MB packed (+572 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot 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.

Changes requested. The locale fix itself restores the documented token behavior; one structural point needs a record before approval.

  • packages/core/src/i18n/listFormat.ts is a new internal module that PowerSearch imports from another folder, and no current record names it. Name it, with createListFormatter, in architecture:internationalization (Owning code, beside i18n/useCollator.ts) in this pull request, with its usage and the reason the useListFormatter hook cannot serve the server-safe PowerSearch/utils entry, so an engineering owner can approve it with /approve-spec for the head commit.

The popover token now matches the sheet's rows as FR11 and FR12 describe, and the ten new or updated tests fail before the change and pass after it. Two small comment-style suggestions are inline.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claims
    • Release note: the popover token's summaries come from the catalog, lists join in the locale, numbers use its decimal mark, and a relative date reads as its choice. Verified: formatTokenValue.ts:115-136, :167, :225-248; PowerSearchTokenText.test.tsx.
    • Release note: formatFilterValue joins lists and reads relative dates the same way. Verified: formatFilterValue.ts:156, :175, :199, :224-227; formatFilterValue.test.ts.
    • Release note: in English only the relative date and the grouping of counts of 1,000 or more change. Verified: the catalog counts use {count, number}; the English token and row cases pass.
    • Cause: the formatter used the catalog and the locale only when handed a translator, and the popover token passed none. Verified against the base call in PowerSearch.tsx.
    • formatTokenValueText always takes the translator; the three lint suppressions and the English literals are gone. Verified: formatTokenValue.ts:149-157.
    • The list format moves into a new internal module that the hook now calls, and the raw-Intl allowlist moves with it. Verified: listFormat.ts:27-35, useListFormatter.ts, no-raw-intl-locale.js:129.
    • The relative-date choices move into a shared server-safe module used by the editors, the sheet and both formatters; the sheet's private lookup is removed; buildRelativeDateOptions keeps its signature. Verified: relativeDateOptions.ts:46-84; PowerSearchBottomSheet.tsx:1365-1376.
    • The record's known gap is rewritten to the four remaining differences, with the number difference stated in full. Verified against formatFilterValue.ts:41-44 and formatTokenValue.ts:106-136.
    • No API, prop, layout or interaction change. Verified: the API surface generator lists no row for any published package.
    • German reads "a, b und c" and "2,5"; Chinese and Japanese join with "、"; other digits and decimal marks are unrounded and ungrouped. Verified by the tests and the platform list and number formats.
    • Before the change, a German token showed English summaries, a literal list join and the stored relative-date key. Verified by running the new tests on the base.
    • Ten tests fail before the change and pass after it. Verified: 10 fail on the base and all pass on the head.
    • formatFilterValue collapses a German list a little sooner and a Chinese or Japanese one later, and needs the caller's translator for the relative-date keys. Verified: formatFilterValue.ts:156-162; the module registers its English.
    • Testing: the UI suites (35 files, 804 tests), the node identity and swizzle suites, the core typecheck, strict lint, the comment-provenance baseline, and the knowledge, catalog, runtime and changeset checks pass. Verified by rerunning each.
  • Files
    • .changeset/powersearch-token-text-locale.md: clear
    • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.js: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.test.mjs: clear
    • packages/core/locales/en.json: clear
    • packages/core/src/PowerSearch/PowerSearch.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchTokenText.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchValueEditor.tsx: clear
    • packages/core/src/PowerSearch/formatFilterValue.test.ts: clear
    • packages/core/src/PowerSearch/formatFilterValue.ts: clear
    • packages/core/src/PowerSearch/formatTokenValue.ts: clear
    • packages/core/src/PowerSearch/relativeDateOptions.ts: comment-style suggestion (non-blocking)
    • packages/core/src/i18n/listFormat.ts: blocking (no record names the new module); comment-style suggestion
    • packages/core/src/i18n/useListFormatter.ts: clear

Automated review (maintainer link)

Comment thread packages/core/src/i18n/listFormat.ts Resolved
Comment thread packages/core/src/i18n/listFormat.ts Resolved

@astracat-bot astracat-bot Bot 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.

Changes requested. The locale fix restores the documented token behavior, and the new Owning code entry gives the module the record content it needed; one approval remains.

  • packages/core/src/i18n/listFormat.ts is a new internal module that PowerSearch imports from another folder, and only this pull request's own Owning code entry in architecture:internationalization names it, which no engineering owner has approved yet: an engineering owner (the author is one) approves the record change by commenting /approve-spec with the head commit.

The ten new or updated tests fail before the change and pass after it, and the two comment-style suggestions from the last review are applied.

Claims and files checked

Review mode: full; reason: spec-record

  • Claims
    • Release note: the popover token's summaries come from the catalog, a list joins in the locale's list format, a number uses the locale's decimal mark, and a relative date reads as its choice. Verified: formatTokenValue.ts:115-136, :167, :225-248; PowerSearchTokenText.test.tsx; captured frames.
    • Release note: formatFilterValue joins lists and reads relative dates the same way. Verified: formatFilterValue.ts:156, :175, :199, :224-227; formatFilterValue.test.ts.
    • Release note: in English only the relative date and the grouping of counts of 1,000 or more change. Verified: en.json:238-251 ({count, number}); the English token and row cases pass.
    • Cause: the formatter used the catalog and the locale only when handed a translator, the popover token passed none, and English literals sat behind three lint suppressions. Verified against the base call in PowerSearch.tsx and the base formatTokenValue.ts.
    • formatTokenValueText always takes the translator, the popover token passes it, and the suppressions and literals are gone. Verified: formatTokenValue.ts:149-157; PowerSearch.tsx:762.
    • The list format moves into a new internal module that the hook now calls, and the raw-Intl allowlist moves with it. Verified: listFormat.ts:25-33; useListFormatter.ts:35; no-raw-intl-locale.js:129.
    • The relative-date choices move into a shared server-safe module for the editors, the sheet and both formatters; the sheet's private lookup is removed; buildRelativeDateOptions keeps its signature. Verified: relativeDateOptions.ts:46-84; PowerSearchValueEditor.tsx:68; PowerSearchBottomSheet.tsx:94.
    • The sheet's rows call the same function with the same arguments, and the sheet's editors interface drops buildRelativeDateOptions. Verified: PowerSearchBottomSheet.tsx:142-145, :1365-1376.
    • The internationalization record's Owning code gains one entry for the new module, which needs an engineering owner's approval. Verified: internationalization.md:412-417; not yet approved (the blocking finding).
    • The component record already specifies the row text as the token's, and the token now reads the same. Verified: six sheet cases assert the trigger's token equals the Filters row.
    • The record's known gap is rewritten to the four remaining differences, with the number difference stated in full. Verified: formatFilterValue.ts:41-44, :203; formatTokenValue.ts:72-76, :106-136.
    • No API, prop, layout or interaction change. Verified: the API surface comparison lists no row in any published package; the source adds no prop or handler.
    • Other locales: German reads "a, b und c" and "2,5", Chinese and Japanese join with "、", and other digits are unrounded and ungrouped. Verified: the sheet and token tests; the platform list and number formats.
    • Before the change a German token read the English summaries, 3d_ago and "2.5"; after it, the German words and "2,5". Verified: captured frames of both trees; PowerSearchTokenText.test.tsx.
    • Ten tests fail before the change and pass with it. Verified: 10 of 250 fail on the base with the head's three test files; all pass on the head.
    • formatFilterValue measures the locale-joined text against the width budget, and a relative date needs the caller's translator; Core's translators resolve it. Verified: formatFilterValue.ts:156-162; relativeDateOptions.ts:18.
    • Testing: the PowerSearch, i18n and FileInput suites (35 files, 804 tests), the node suites, typecheck, strict lint, the provenance baseline, and the knowledge, catalog, runtime-map and changeset checks pass. Verified: all pass at the head; the three unused-type warnings in PowerSearch.tsx are on the base too.
  • Files
    • .changeset/powersearch-token-text-locale.md: clear
    • docs/architecture/internationalization.md: the Owning code entry awaits an engineering owner's approval (blocking)
    • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.js: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.test.mjs: clear
    • packages/core/locales/en.json: clear
    • packages/core/src/PowerSearch/PowerSearch.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchTokenText.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchValueEditor.tsx: clear
    • packages/core/src/PowerSearch/formatFilterValue.test.ts: clear
    • packages/core/src/PowerSearch/formatFilterValue.ts: clear
    • packages/core/src/PowerSearch/formatTokenValue.ts: clear
    • packages/core/src/PowerSearch/relativeDateOptions.ts: clear
    • packages/core/src/i18n/listFormat.ts: new internal module with no approved record yet (blocking)
    • packages/core/src/i18n/useListFormatter.ts: clear

Automated review (maintainer link)

@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec c3f2975

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI has not run on this head yet, because the pull request is still a draft; marking it ready for review starts it.

The locale fix restores the documented token behavior, and the engineering owner's approval of the new internationalization Owning code entry settles the one change requested earlier. The ten new or updated tests fail before the change and pass with it.

Claims and files checked

Review mode: same-head; reason: none

  • Claims
    • Release note: the popover token's summaries come from the catalog, a list joins in the locale's list format, a number uses the locale's decimal mark, and a relative date reads as its choice. Verified: formatTokenValue.ts:115-136, :165-167, :225-248; PowerSearchTokenText.test.tsx; captured frames.
    • Release note: formatFilterValue joins lists and reads relative dates the same way. Verified: formatFilterValue.ts:156, :175, :199, :224-227; formatFilterValue.test.ts.
    • Release note: in English only the relative date and the grouping of counts of 1,000 or more change. Verified: en.json:238-251 ({count, number}); the English token case passes.
    • Cause: the formatter used the catalog and the locale only when handed a translator, the popover token passed none, and English literals sat behind three lint suppressions. Verified against the base call in PowerSearch.tsx and the base formatTokenValue.ts.
    • formatTokenValueText always takes the translator, the popover token passes it, and the suppressions and literals are gone. Verified: formatTokenValue.ts:149-157; PowerSearch.tsx:762.
    • The list format moves into a new internal module that the hook now calls, and the raw-Intl allowlist moves with it. Verified: listFormat.ts:25-33; useListFormatter.ts:35; no-raw-intl-locale.js:129.
    • The relative-date choices move into a shared server-safe module for the editors, the sheet and both formatters; the sheet's private lookup is removed; buildRelativeDateOptions keeps its signature. Verified: relativeDateOptions.ts:46-84; PowerSearchValueEditor.tsx:68; PowerSearchBottomSheet.tsx:94.
    • The sheet's rows call the same function with the same arguments, and the sheet's editors interface drops buildRelativeDateOptions. Verified: PowerSearchBottomSheet.tsx:142-145, :1365-1373.
    • The internationalization record's Owning code gains one entry for the new module, which needs an engineering owner's approval. Verified: internationalization.md:412-417; an engineering owner approved the record change for this head.
    • The component record already specifies the row text as the token's, and the token now reads the same. Verified: six sheet cases assert the trigger's token equals the Filters row.
    • The record's known gap is rewritten to the four remaining differences, with the number difference stated in full. Verified: PowerSearch.spec.md:986-1002 against formatFilterValue.ts:41-44, :203 and formatTokenValue.ts:72-76, :106-136.
    • No API, prop, layout or interaction change. Verified: the API surface comparison lists no row in any published package; the source adds no prop or handler.
    • English lists and numbers read as before. Verified: the English token case; the four English number row cases.
    • Other locales: German reads "a, b und c" and "2,5", Chinese and Japanese join with "、", and other digits are unrounded and ungrouped. Verified: the sheet and token tests.
    • Before the change a German token read the English summaries, the stored relative-date key and "2.5"; after it, the German words and "2,5". Verified: captured frames of both trees; PowerSearchTokenText.test.tsx.
    • Ten tests fail before the change and pass with it. Verified: 10 of 250 fail on the base with the head's three test files; all pass on the head.
    • formatFilterValue measures the locale-joined text against the width budget, and a relative date needs the caller's translator; Core's translators resolve it. Verified: formatFilterValue.ts:156-162; relativeDateOptions.ts:18.
    • Testing: the PowerSearch, i18n and FileInput suites (35 files, 804 tests) and the raw-Intl lint rule's tests pass; typecheck, strict lint, the provenance baseline, and the knowledge, catalog, runtime-map and changeset checks pass. Verified: the suites and the lint rule's tests pass at this head; the other checks passed at this same head before.
  • Files
    • .changeset/powersearch-token-text-locale.md: clear
    • docs/architecture/internationalization.md: clear
    • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.js: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.test.mjs: clear
    • packages/core/locales/en.json: clear
    • packages/core/src/PowerSearch/PowerSearch.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchTokenText.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchValueEditor.tsx: clear
    • packages/core/src/PowerSearch/formatFilterValue.test.ts: clear
    • packages/core/src/PowerSearch/formatFilterValue.ts: clear
    • packages/core/src/PowerSearch/formatTokenValue.ts: clear
    • packages/core/src/PowerSearch/relativeDateOptions.ts: clear
    • packages/core/src/i18n/listFormat.ts: clear
    • packages/core/src/i18n/useListFormatter.ts: clear

Automated review (maintainer link)

@nynexman4464
nynexman4464 marked this pull request as ready for review November 21, 2026 00:55
@nynexman4464
nynexman4464 marked this pull request as draft November 21, 2026 02:08
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/powersearch-token-i18n branch from c3f2975 to 3b3a676 Compare November 21, 2026 02:08
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 3b3a676

@astracat-bot astracat-bot Bot 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.

Approved pending CI: the heavy test suites have not finished on this head yet, and merge waits for them to pass.

The locale fix restores the documented token behavior, and the engineering owner's approval of the new internationalization Owning code entry for this head keeps the one earlier requested change settled. The ten new or updated tests fail before the change and pass with it.

Claims and files checked

Review mode: carry-forward; reason: none

  • Claims
    • Release note: the popover token's summaries come from the catalog, a list joins in the locale's list format, a number uses the locale's decimal mark, and a relative date reads as its choice. Verified: formatTokenValue.ts:115-136, :165-167, :225-248; PowerSearchTokenText.test.tsx; captured frames.
    • Release note: formatFilterValue joins lists and reads relative dates the same way. Verified: formatFilterValue.ts:156, :175, :199, :224-227; formatFilterValue.test.ts.
    • Release note: in English only the relative date and the grouping of counts of 1,000 or more change. Verified: en.json:238-251 ({count, number}); the English token case passes.
    • Cause: the formatter used the catalog and the locale only when handed a translator, the popover token passed none, and English literals sat behind three lint suppressions. Verified against the base call in PowerSearch.tsx and the base formatTokenValue.ts.
    • formatTokenValueText always takes the translator, the popover token passes it, and the suppressions and literals are gone. Verified: formatTokenValue.ts:149-157; PowerSearch.tsx:762.
    • The list format moves into a new internal module that the hook now calls, and the raw-Intl allowlist moves with it. Verified: listFormat.ts:25-33; useListFormatter.ts:35; no-raw-intl-locale.js:129.
    • The relative-date choices move into a shared server-safe module for the editors, the sheet and both formatters; the sheet's private lookup is removed; buildRelativeDateOptions keeps its signature. Verified: relativeDateOptions.ts:46-84; PowerSearchValueEditor.tsx:68; PowerSearchBottomSheet.tsx:94.
    • The sheet's rows call the same function with the same arguments, and the sheet's editors interface drops buildRelativeDateOptions. Verified: PowerSearchBottomSheet.tsx:142-145, :1365-1373.
    • The internationalization record's Owning code gains one entry for the new module, which needs an engineering owner's approval. Verified: internationalization.md:412-417; an engineering owner approved the record change for this head.
    • The component record already specifies the row text as the token's, and the token now reads the same. Verified: six sheet cases assert the trigger's token equals the Filters row.
    • The record's known gap is rewritten to the four remaining differences, with the number difference stated in full. Verified: PowerSearch.spec.md:986-1002 against formatFilterValue.ts:41-44, :203 and formatTokenValue.ts:72-76, :106-136.
    • No API, prop, layout or interaction change. Verified: the API surface comparison lists no row in any published package; the source adds no prop or handler.
    • English lists and numbers read as before. Verified: the English token case; the four English number row cases.
    • Other locales: German reads "a, b und c" and "2,5", Chinese and Japanese join with "、", and other digits are unrounded and ungrouped. Verified: the sheet and token tests.
    • Before the change a German token read the English summaries, the stored relative-date key and "2.5"; after it, the German words and "2,5". Verified: captured frames of both trees; PowerSearchTokenText.test.tsx.
    • Ten tests fail before the change and pass with it. Verified: 10 of 250 fail on the base with the head's three test files; all pass on the head.
    • formatFilterValue measures the locale-joined text against the width budget, and a relative date needs the caller's translator; Core's translators resolve it. Verified: formatFilterValue.ts:156-162; relativeDateOptions.ts:18.
    • Testing: the PowerSearch, i18n and FileInput suites (35 files, 804 tests) and the raw-Intl lint rule's tests pass; typecheck, strict lint, the provenance baseline, and the knowledge, catalog, runtime-map and changeset checks pass. Verified: the suites and the lint rule's tests pass with this patch; the other checks passed earlier with the same patch.
  • Files
    • .changeset/powersearch-token-text-locale.md: clear
    • docs/architecture/internationalization.md: clear
    • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.js: clear
    • internal/eslint-plugin-astryx/no-raw-intl-locale.test.mjs: clear
    • packages/core/locales/en.json: clear
    • packages/core/src/PowerSearch/PowerSearch.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchBottomSheet.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchTokenText.test.tsx: clear
    • packages/core/src/PowerSearch/PowerSearchValueEditor.tsx: clear
    • packages/core/src/PowerSearch/formatFilterValue.test.ts: clear
    • packages/core/src/PowerSearch/formatFilterValue.ts: clear
    • packages/core/src/PowerSearch/formatTokenValue.ts: clear
    • packages/core/src/PowerSearch/relativeDateOptions.ts: clear
    • packages/core/src/i18n/listFormat.ts: clear
    • packages/core/src/i18n/useListFormatter.ts: clear

Automated review (maintainer link)

@nynexman4464
nynexman4464 marked this pull request as ready for review November 21, 2026 02:29
@nynexman4464
nynexman4464 merged commit ffd00b3 into main Nov 21, 2026
228 of 231 checks passed
@github-actions
github-actions Bot deleted the nynexman4464/fix/powersearch-token-i18n branch November 21, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 3b3a676a Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant