Remove developer jargon from retail UI alerts and errors #414

Closed
opened 2026-06-25 14:12:45 +00:00 by PlasticDigits · 6 comments
PlasticDigits commented 2026-06-25 14:12:45 +00:00 (Migrated from gitlab.com)

Parent

#411 — Updated Gap Analysis (recommendation 3)

Current codebase

User-facing surfaces still embed developer/integrator copy:

Location Example
LimitOrderPreSubmitSummary.tsx L108 Issue: GitLab #157. in footer
TradeMarketOrderPanel.tsx hybrid_simulation (Pattern C), docs/limit-orders.md in alert body
SwapPage.tsx "Pattern C execution can differ" in Settings
TradeMarketOrderPanel.tsx Raw (simQuery.error as Error).message on quote failure

humanizeUserFacingError.ts / TxResultAlert.test.tsx already strip GitLab refs from some paths (#127); market panel quote errors are not fully wired.

Why needed

Developer jargon and internal issue refs in retail alerts cause awareness fatigue and signal an integrator tool, not a consumer DEX. Raw LCD/indexer errors leak implementation detail and may include addresses users cannot act on.

Constraints / guardrails

  • Keep Learn more links (user FAQ, public docs) as footnotes — not inline alert bodies.
  • Do not remove console.error upstream logging (#134).
  • DOCS_GITLAB_BASE links in footers are OK if labeled "Learn more" / "Limit order fees" — not raw limit-orders.md filenames.
  • Preserve data-testid on pre-submit summaries (#157, #409).

Relevant files

  • frontend-dapp/src/components/trade/LimitOrderPreSubmitSummary.tsx
  • frontend-dapp/src/components/trade/TradeMarketOrderPanel.tsx
  • frontend-dapp/src/pages/SwapPage.tsx
  • frontend-dapp/src/utils/humanizeUserFacingError.ts
  • frontend-dapp/src/utils/humanizeOffChainError.ts
  • frontend-dapp/src/components/ui/TxResultAlert.tsx
  • frontend-dapp/src/components/trade/__tests__/TradeMarketOrderPanel.submitSnapshot.test.tsx
  1. Remove GitLab issue numbers from all user-visible strings.
  2. Replace "Pattern C", hybrid_simulation, indexer disclosure jargon with plain language ("limit book + pool", "estimated output").
  3. Route all TradeMarketOrderPanel quote/sim errors through humanizeUserFacingError.
  4. Move doc links to subtle "Learn more" anchors below alert text.

Acceptance criteria

  • No GitLab #, Pattern C, or hybrid_simulation in retail-visible copy (grep frontend-dapp/src excluding tests/comments).
  • Market panel errors are humanized.
  • Pre-submit footers use "Learn more" not issue IDs.
  • Screenshot: Trade market quote card — retail-friendly disclosure text.
  • Screenshot: Limit pre-submit summary footer without issue ref.
  • Screenshot: Simulated quote failure on market panel — plain-language error.

Test plan

  • TradeMarketOrderPanel.submitSnapshot.test.tsx — update expected strings.
  • TxResultAlert.test.tsx pattern for humanized errors.
  • make test-frontend
  • Grep audit: rg 'Pattern C|GitLab #|hybrid_simulation' frontend-dapp/src --glob '!**/*.test.*' --glob '!**/comments/**'

Attack / abuse test plan

  • Ensure humanization does not swallow actionable bech32 / pause / blacklist messages (#388, #395).
  • Fuzz test: indexer 500, LCD timeout, malformed JSON — all return stable retail copy.

Verification criteria

  • humanizeUserFacingError.test.ts extended for market-panel error shapes.
  • No regression in SEC-D11 pre-submit field tests (#409).
## Parent [#411 — Updated Gap Analysis](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/411) (recommendation 3) ## Current codebase User-facing surfaces still embed developer/integrator copy: | Location | Example | |----------|---------| | `LimitOrderPreSubmitSummary.tsx` L108 | `Issue: GitLab #157.` in footer | | `TradeMarketOrderPanel.tsx` | `hybrid_simulation (Pattern C)`, `docs/limit-orders.md` in alert body | | `SwapPage.tsx` | "Pattern C execution can differ" in Settings | | `TradeMarketOrderPanel.tsx` | Raw `(simQuery.error as Error).message` on quote failure | `humanizeUserFacingError.ts` / `TxResultAlert.test.tsx` already strip GitLab refs from some paths (#127); market panel quote errors are not fully wired. ## Why needed Developer jargon and internal issue refs in retail alerts cause awareness fatigue and signal an integrator tool, not a consumer DEX. Raw LCD/indexer errors leak implementation detail and may include addresses users cannot act on. ## Constraints / guardrails - Keep **Learn more** links (user FAQ, public docs) as footnotes — not inline alert bodies. - Do not remove `console.error` upstream logging (#134). - `DOCS_GITLAB_BASE` links in footers are OK if labeled "Learn more" / "Limit order fees" — not raw `limit-orders.md` filenames. - Preserve `data-testid` on pre-submit summaries (#157, #409). ## Relevant files - `frontend-dapp/src/components/trade/LimitOrderPreSubmitSummary.tsx` - `frontend-dapp/src/components/trade/TradeMarketOrderPanel.tsx` - `frontend-dapp/src/pages/SwapPage.tsx` - `frontend-dapp/src/utils/humanizeUserFacingError.ts` - `frontend-dapp/src/utils/humanizeOffChainError.ts` - `frontend-dapp/src/components/ui/TxResultAlert.tsx` - `frontend-dapp/src/components/trade/__tests__/TradeMarketOrderPanel.submitSnapshot.test.tsx` ## Recommended direction 1. Remove GitLab issue numbers from all user-visible strings. 2. Replace "Pattern C", `hybrid_simulation`, indexer disclosure jargon with plain language ("limit book + pool", "estimated output"). 3. Route all `TradeMarketOrderPanel` quote/sim errors through `humanizeUserFacingError`. 4. Move doc links to subtle "Learn more" anchors below alert text. ## Acceptance criteria - [ ] No `GitLab #`, `Pattern C`, or `hybrid_simulation` in retail-visible copy (grep `frontend-dapp/src` excluding tests/comments). - [ ] Market panel errors are humanized. - [ ] Pre-submit footers use "Learn more" not issue IDs. - [ ] **Screenshot:** Trade market quote card — retail-friendly disclosure text. - [ ] **Screenshot:** Limit pre-submit summary footer without issue ref. - [ ] **Screenshot:** Simulated quote failure on market panel — plain-language error. ## Test plan - `TradeMarketOrderPanel.submitSnapshot.test.tsx` — update expected strings. - `TxResultAlert.test.tsx` pattern for humanized errors. - `make test-frontend` - Grep audit: `rg 'Pattern C|GitLab #|hybrid_simulation' frontend-dapp/src --glob '!**/*.test.*' --glob '!**/comments/**'` ## Attack / abuse test plan - Ensure humanization does not swallow actionable bech32 / pause / blacklist messages (#388, #395). - Fuzz test: indexer 500, LCD timeout, malformed JSON — all return stable retail copy. ## Verification criteria - `humanizeUserFacingError.test.ts` extended for market-panel error shapes. - No regression in SEC-D11 pre-submit field tests (#409).
PlasticDigits commented 2026-06-25 14:13:22 +00:00 (Migrated from gitlab.com)

mentioned in issue #411

mentioned in issue #411
PlasticDigits commented 2026-06-25 20:46:33 +00:00 (Migrated from gitlab.com)

mentioned in commit 2ac7215776

mentioned in commit 2ac7215776698a16564fd04a9ac51cb5ac4ef9b2
PlasticDigits commented 2026-06-25 20:46:46 +00:00 (Migrated from gitlab.com)

mentioned in merge request !940

mentioned in merge request !940
PlasticDigits commented 2026-06-25 21:51:39 +00:00 (Migrated from gitlab.com)

mentioned in commit c02bd30bbc

mentioned in commit c02bd30bbc599082d8e2b4debc6b91f60e8fafb0
PlasticDigits commented 2026-06-26 06:23:17 +00:00 (Migrated from gitlab.com)

Verification — #414 (Remove developer jargon from retail UI alerts and errors)

Verified on main @ 6ffd7f44 (implementation merged in 2ac72157).

Acceptance criteria

Criterion Result How verified
No GitLab #, Pattern C, or hybrid_simulation in retail-visible copy (components/pages) PASS rg 'Pattern C|GitLab #|hybrid_simulation' frontend-dapp/src/components frontend-dapp/src/pages --glob '!**/*.test.*' — matches only JSDoc/CSS comments, not rendered strings. directHybridQuote.ts disclosure strings are plain language.
Market panel errors humanized PASS TradeMarketOrderPanel.tsx routes quote errors through humanizeUserFacingErrorFromUnknown; test humanizes simulated quote failures instead of raw error text (#414) asserts /reach the chain/i and no lcd fail.
Pre-submit footers use "Learn more" not issue IDs PASS LimitOrderPreSubmitSummary.test.tsx — link Learn more about limit order fees, queryByText(/GitLab #/) absent.
Screenshot: Trade market quote card — retail-friendly disclosure PASS (component) TradeMarketOrderPanel.submitSnapshot.test.tsx — trade-market-quote contains Estimated output from limit book + pool; excludes Pattern C, hybrid_simulation, GitLab #.
Screenshot: Limit pre-submit footer without issue ref PASS (component) LimitOrderPreSubmitSummary.test.tsx — footer link text + no issue refs.
Screenshot: Simulated quote failure — plain-language error PASS (component) trade-market-quote-error test above.

Test plan

Check Result Command / output
make test-frontend PASS 184 files, 1084 tests passed
humanizeUserFacingError.test.ts market-panel shapes PASS humanizeUserFacingError — market quote shapes (#414) block (indexer/LCD/JSON + pause/blacklist preservation)
TradeMarketOrderPanel.submitSnapshot.test.tsx PASS Includes #414 disclosure + error tests
LimitOrderPreSubmitSummary.test.tsx PASS Footer link test
SEC-D11 / #409 pre-submit regression PASS shows labeled pre-sign confirmation fields before market swap submit in submitSnapshot suite; full frontend suite green
Grep audit (issue test plan) PASS (retail) Non-test src still matches pattern in comments/dev-only paths only; no jargon in issue-listed UI surfaces

Attack / abuse

Check Result
Humanization preserves pause/blacklist copy (#388, #395) PASS — humanizeUserFacingError.test.ts preserves actionable pause and blacklist messages
Fuzz: indexer 500, LCD timeout, malformed JSON PASS — tryHumanizeFetchLikeMessage + market quote shape tests map to stable retail copy

Manual / environment

Check Result
Browser screenshots on LocalTerra SKIP — make has-localterra exit 2 (stack not provisioned this session). Component tests above assert the same visible copy on the targeted surfaces.

Follow-up (non-blocking)

  • humanizeTerraTxError.ts Station/LocalTerra insufficient-fee branch still ends with (GitLab #235) — rare edge case outside the issue’s listed files; could be stripped in a small follow-up for full grep-zero on all user-facing strings.
## Verification — #414 (Remove developer jargon from retail UI alerts and errors) Verified on `main` @ `6ffd7f44` (implementation merged in `2ac72157`). ### Acceptance criteria | Criterion | Result | How verified | |-----------|--------|--------------| | No `GitLab #`, `Pattern C`, or `hybrid_simulation` in retail-visible copy (components/pages) | **PASS** | `rg 'Pattern C\|GitLab #\|hybrid_simulation' frontend-dapp/src/components frontend-dapp/src/pages --glob '!**/*.test.*'` — matches only JSDoc/CSS comments, not rendered strings. `directHybridQuote.ts` disclosure strings are plain language. | | Market panel errors humanized | **PASS** | `TradeMarketOrderPanel.tsx` routes quote errors through `humanizeUserFacingErrorFromUnknown`; test `humanizes simulated quote failures instead of raw error text (#414)` asserts `/reach the chain/i` and no `lcd fail`. | | Pre-submit footers use "Learn more" not issue IDs | **PASS** | `LimitOrderPreSubmitSummary.test.tsx` — link `Learn more about limit order fees`, `queryByText(/GitLab #/)` absent. | | Screenshot: Trade market quote card — retail-friendly disclosure | **PASS** (component) | `TradeMarketOrderPanel.submitSnapshot.test.tsx` — `trade-market-quote` contains `Estimated output from limit book + pool`; excludes `Pattern C`, `hybrid_simulation`, `GitLab #`. | | Screenshot: Limit pre-submit footer without issue ref | **PASS** (component) | `LimitOrderPreSubmitSummary.test.tsx` — footer link text + no issue refs. | | Screenshot: Simulated quote failure — plain-language error | **PASS** (component) | `trade-market-quote-error` test above. | ### Test plan | Check | Result | Command / output | |-------|--------|------------------| | `make test-frontend` | **PASS** | 184 files, 1084 tests passed | | `humanizeUserFacingError.test.ts` market-panel shapes | **PASS** | `humanizeUserFacingError — market quote shapes (#414)` block (indexer/LCD/JSON + pause/blacklist preservation) | | `TradeMarketOrderPanel.submitSnapshot.test.tsx` | **PASS** | Includes #414 disclosure + error tests | | `LimitOrderPreSubmitSummary.test.tsx` | **PASS** | Footer link test | | SEC-D11 / #409 pre-submit regression | **PASS** | `shows labeled pre-sign confirmation fields before market swap submit` in submitSnapshot suite; full frontend suite green | | Grep audit (issue test plan) | **PASS** (retail) | Non-test `src` still matches pattern in comments/dev-only paths only; no jargon in issue-listed UI surfaces | ### Attack / abuse | Check | Result | |-------|--------| | Humanization preserves pause/blacklist copy (#388, #395) | **PASS** — `humanizeUserFacingError.test.ts` `preserves actionable pause and blacklist messages` | | Fuzz: indexer 500, LCD timeout, malformed JSON | **PASS** — `tryHumanizeFetchLikeMessage` + market quote shape tests map to stable retail copy | ### Manual / environment | Check | Result | |-------|--------| | Browser screenshots on LocalTerra | **SKIP** — `make has-localterra` exit 2 (stack not provisioned this session). Component tests above assert the same visible copy on the targeted surfaces. | ### Follow-up (non-blocking) - `humanizeTerraTxError.ts` Station/LocalTerra insufficient-fee branch still ends with `(GitLab #235)` — rare edge case outside the issue’s listed files; could be stripped in a small follow-up for full grep-zero on all user-facing strings.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-26 06:23:18 +00:00
PlasticDigits commented 2026-08-05 01:48:28 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1041

mentioned in merge request !1041
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#414
No description provided.