Repository navigation
docs(sales): the Products panel adds a line item, in all three locales - #1762
Merged
Merged
Conversation
The `add` picker on `opp_products` falsified two passages on the Opportunities page the day after they landed: "Nothing on the opportunity screen adds one" and the *Related* tab's "carries no button, because there is no Add Product action in this app and nothing on this screen adds a line item". A surgical correction, not a rewrite. Line 124 makes seven distinct claims and only three flip. The page had already taught the reader that a related list gets a button in exactly two ways, an `actions` list or an `add` picker — the app now uses the second and still not the first, so that is what the new prose says, rather than the false "an Add Product action was added" or the imprecise "you can now add products". Four claims survive verbatim or nearly so: there is no Add Product *action* anywhere in the app, `crm_opportunity_line_item` still has no list view of its own, permission was never the constraint, and typing the Amount by hand remains a supported route rather than a workaround. All seven claims were verified present per locale rather than assumed from the English. The pages gain what the picker does: it offers active products only, so a retired product cannot be sold onto a new deal, and the row it creates arrives complete and priced — quantity 1 at the product's list price — for the rep to adjust. Import and the API are no longer the only route. No timing promise is made about the opportunity Amount. `opportunity_amount_rollup` is `async: true` with `onError: 'log'`, so the roll-up is not in the same transaction; that is pre-existing and deliberate and describing the lag belongs to a different card. The button is not given a Chinese name. The picker authors no `add.label`, so the renderer falls back to `detail.add` — measured as "Add" in en-US and 添加 in zh-CN in the pinned console build, which ships no zh-Hant locale at all. A Traditional rendering does not exist to source and the Simplified one lives in a platform artifact this repo does not own, so both Chinese pages name the button as the surrounding prose already names *View all* and **Products** and say the label follows the reader's interface language. Where this repo does own the wording it is used: "active" is written 已启用 / 已啟用 against `crm_product.is_active` -> 是否启用. Documentation only. No `src/` change and no new gate or test: `test/docs-drift.test.ts` names these three files but pins the large-deal amount condition, and pinning prose against page metadata is how a sibling check already went vacuous. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YKN9TPqDSSXUaYqp2j7MZ
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1758
#1720 documented yesterday's behaviour honestly — nothing on the opportunity screen adds a line item. #1757 made that false the same day by giving
opp_productsanaddpicker. This corrects the two passages in all three locales without discarding the four claims that are still true.What changed
Three docs files, two lines each, plus one changeset. Passages were re-located by content; the card's line numbers were as of
456a0a76and still happen to resolve to 124 and 184 ond47e37ac.content/docs/sales/opportunities.mdxcontent/docs/sales/opportunities.zh-Hans.mdxcontent/docs/sales/opportunities.zh-Hant.mdx.changeset/opportunities-page-catches-up-with-the-add-picker.md— added.No
src/change. Nocontent/docs/releases/change. No new gate, guard, lint rule or test.Written from the distinction the page had already earned
The page already taught the reader that a related list gets a button in exactly two ways, an
actionslist or anaddpicker. The app now uses the second and still not the first, so that is how the correction is phrased — not "an Add Product action was added" (false), and not a vague "you can now add products" (throws away the precision).Seven claims on line 124; three flipped, four survive and are still on the page:
actionsoraddcrm_opportunity_line_itemhas no list view of its ownVerified per locale rather than assumed: all seven claims were present in each of the three files, and each survives or flips identically in each.
What the pages gained
From #1757's own measurements: the picker offers active products only (
is_active), so a retired product cannot be sold onto a new deal; and the row it creates arrives complete and priced — quantity 1, the product's list price as the unit price, no discount — for the rep to adjust. Rows read as the catalog names a product, PRD-0001 - Widget. Import and the API are described as still working, simply no longer the only route.No timing promise is made about the opportunity Amount.
opportunity_amount_rollupisasync: truewithonError: 'log', so the roll-up is not in the same transaction. Describing the lag would be a different card; the fix here is to say nothing about timing.The button is not given a Chinese name — measured, not assumed
The picker deliberately authors no
add.label, so the label is the platform's. Measured in the pinned@objectstack/consolebuild rather than guessed:w.label || W('detail.add', {defaultValue: 'Add'})—plugins-views-iYcMmImr.js.detail.addisAddin en-US and添加in zh-CN —i18n-locales-Bz4c8KXc.js.objectstack.config.tssupportedLocalesagrees.So a Traditional rendering does not exist to source, and the Simplified one lives in a platform build artifact this repo does not own, with no gate to catch it drifting on a platform bump. Rather than coin one, both Chinese pages name the button as the surrounding prose already names View all and Products, and add that its label follows the reader's interface language — which is true in every locale and cannot go stale.
Where this repo does own the wording, the pack is used: "active" is written
已启用/已啟用againstcrm_product.is_active→是否启用insrc/translations/zh-CN/objects.commerce.ts.Verification
pnpm verify=validate && typecheck && lint && lint:i18n-gate && hygiene && hygiene:tokens && build && test— exit code 0, run on the committed tree.Test Files 164 passed (164),Tests 3438 passed | 1 skipped (3439). The 5 author-time build warnings are pre-existing onmainand unrelated.Checks that would not have caught this, stated because it is why the card exists:
test/docs-drift.test.tsnames all three files but pins the large-deal amount condition (capCel('opportunity_won_alert', ...)), not this prose. Swepttest/— no test pins any of the six passages.link-check.ymltriggers on.mdxbut scans.mdexact, so on this diff it opens only the changeset. Checked by hand instead: this change introduces no links, and the one link inside the edited line 184 (Quote Generation flow) is untouched.Deliberately no guard added — pinning prose against page metadata is how a sibling check went vacuous (#1755), and a guard that would be vacuous is worse than none.
Byte discipline:
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'over all three files returns no matches. Script-leakage check confirms no Simplified forms in the zh-Hant lines and no Traditional forms in the zh-Hans lines.🤖 Generated with Claude Code
https://claude.ai/code/session_019YKN9TPqDSSXUaYqp2j7MZ
Generated by Claude Code