From f2610da8ac89b734e3bef9e0668b1108d4c2e43b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Oct 2026 23:28:01 +0000 Subject: [PATCH] docs(lead-page): re-state the duplicate-banner comments for the 17.6.0 pin Re-verified in a browser on @objectstack/console 17.6.0: a lead with no duplicate verdict shows neither record:alert banner, and a suspected or confirmed lead shows only its own. The banner predicates are unchanged. Two comment statements had stopped being true on 17.6.0 and are corrected: - A node-level `visibleWhen` does see the row: SchemaRenderer binds it as `record`. Measured by moving the suspected predicate there, where it gated correctly in both directions. - The page-component copy keys no longer include `submitLabel`. Comments only; empty-frontmatter changeset. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01ER8ntXZhYebyQ66aXWdjfT --- .changeset/1887-duplicate-banner-verify.md | 4 ++++ src/sales/pages/lead_detail.page.ts | 15 +++++++++------ test/lead-duplicate-visibility.test.ts | 6 +++--- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 .changeset/1887-duplicate-banner-verify.md diff --git a/.changeset/1887-duplicate-banner-verify.md b/.changeset/1887-duplicate-banner-verify.md new file mode 100644 index 000000000..fc9cc30b1 --- /dev/null +++ b/.changeset/1887-duplicate-banner-verify.md @@ -0,0 +1,4 @@ +--- +--- + +Comments only, releases nothing: the lead record page's duplicate banners were re-verified in a browser on the 17.6.0 pin (no banner on a lead with no verdict, only its own banner on a suspected or confirmed lead), and two statements in the banner comments that had stopped being true on 17.6.0 are corrected (#1887). diff --git a/src/sales/pages/lead_detail.page.ts b/src/sales/pages/lead_detail.page.ts index e896e1078..cb30c7b15 100644 --- a/src/sales/pages/lead_detail.page.ts +++ b/src/sales/pages/lead_detail.page.ts @@ -138,9 +138,12 @@ export const LeadDetailPage: Page = { // predicate: `record-alert.tsx` evaluates `properties.visible` through // `toPredicateInput` + `useCondition` against the row // (`usePredicateRecordContext`), the same pipeline as an action button. - // A node-level `visibleWhen` would be a different gate one tier up, - // evaluated by `SchemaRenderer` on `data` = the data-source ADAPTER, - // not the row — it cannot see `duplicate_status` at all. + // A node-level `visibleWhen` is a different gate one tier up, + // evaluated by `SchemaRenderer`, and the two compose as AND. Measured + // on the 17.6.0 pin (#1887), that tier binds the page's row as + // `record` too (objectui#5454): this same predicate, moved there, + // gated correctly in both directions. `visible` stays because it is + // the gate `record:alert` declares in its own props. // // ⚠️ `has()` is load-bearing, and this surface is the WORST of the four // this repo measures (cf. `test/view-predicate-dialect.test.ts`): the @@ -185,9 +188,9 @@ export const LeadDetailPage: Page = { // this renderer resolves both through `pickLocalized(…, language)` // (the same capability `opportunity_detail.page.ts` records under // #972), and `body` has no other channel — the i18n extractor's - // per-component copy keys are title/description/label/placeholder/ - // emptyText/submitLabel, so a plain-string `body` would ship English to - // all four locales. Keeping both halves of one banner's copy in one + // per-component copy keys (`PAGE_COMPONENT_COPY_KEYS`, read on 17.6.0) + // are title/description/label/placeholder/emptyText, so a plain-string + // `body` would ship English to all four locales. Keeping both halves of one banner's copy in one // place beats splitting `title` into the locale packs. // // ⭐ Each banner's copy NAMES ITS OWN VERDICT, in the vocabulary the diff --git a/test/lead-duplicate-visibility.test.ts b/test/lead-duplicate-visibility.test.ts index d8489fc28..e799db29e 100644 --- a/test/lead-duplicate-visibility.test.ts +++ b/test/lead-duplicate-visibility.test.ts @@ -273,9 +273,9 @@ describe('lead record page — the duplicate banners, one per verdict', () => { // `record:alert` resolves `title` / `body` through `pickLocalized(…, // language)`, so an inline `{ en, 'zh-CN', … }` map is a delivered // capability — and for `body` it is the ONLY channel: the i18n extractor's - // per-component copy keys are title/description/label/placeholder/ - // emptyText/submitLabel, so a plain-string body would ship English to - // every locale with nothing reporting it. + // per-component copy keys (`PAGE_COMPONENT_COPY_KEYS`, read on 17.6.0) are + // title/description/label/placeholder/emptyText, so a plain-string body + // would ship English to every locale with nothing reporting it. const declared = (stack as AnyRec).i18n?.supportedLocales ?? []; expect([...declared].sort(), 'the app no longer ships these four locales') .toEqual([...LOCALES].sort());