feat: /charts UST1/USD hero + ?price= page-wide invert (#680) #1183

Merged
PlasticDigits merged 1 commit from feat/680-charts-ust1-usd-hero into main 2026-08-27 04:45:26 +00:00
PlasticDigits commented 2026-08-27 00:40:55 +00:00 (Migrated from gitlab.com)

Summary

  • Bare /charts replace-navigates to the UST1/cUSTC pair with ?price=UST1 so the first chart is USD of 1 UST1 (~$1), not catalog-volume rank or Trade's other-side default.
  • ?price= (last key wins) is allowlisted to the selected pair's legs (symbol, casefold, or contract; USTC/LUNC aliases only when that wrap is on the pair). Hostile / overlong values are ignored.
  • Invert pill stays in sync with the query. 24h USD OHLC, Price Change, TWAP, and headings follow the priced token via invertUsd / human reciprocal. Volume tiles stay factory-oriented.
  • Charts persist invert under cl8y-dex-charts-pair-invert: so /trade T524-3 / C543-3 is unchanged.

Closes #680

Test plan

  • make verify-issue-680 (Vitest route/orientation/OHLC/hero/ChartsPage + Trade #524 + chrome nesting)
  • make verify-issue-680 retest after lint fixes
  • Manual: production-shaped env, open /charts → UST1/cUSTC UST1 USD; copy URL; new session same orientation
  • Manual: ?price=cUSTC / invert pill flips Last, 24h USD OHLC, %, TWAP, headings, tape Price; volume does not
  • Manual: /trade first visit of UST1/cUSTC still other-side (cUSTC USD)
  • Manual: desktop + phone; light + dark; hostile /charts/<script>?price=<script> → invalid-pair notice
## Summary - Bare `/charts` replace-navigates to the UST1/cUSTC pair with `?price=UST1` so the first chart is USD of 1 UST1 (`~$1`), not catalog-volume rank or Trade's other-side default. - `?price=` (last key wins) is allowlisted to the selected pair's legs (symbol, casefold, or contract; `USTC`/`LUNC` aliases only when that wrap is on the pair). Hostile / overlong values are ignored. - Invert pill stays in sync with the query. 24h USD OHLC, Price Change, TWAP, and headings follow the priced token via `invertUsd` / human reciprocal. Volume tiles stay factory-oriented. - Charts persist invert under `cl8y-dex-charts-pair-invert:` so `/trade` T524-3 / C543-3 is unchanged. Closes #680 ## Test plan - [x] `make verify-issue-680` (Vitest route/orientation/OHLC/hero/ChartsPage + Trade #524 + chrome nesting) - [x] `make verify-issue-680` retest after lint fixes - [ ] Manual: production-shaped env, open `/charts` → UST1/cUSTC UST1 USD; copy URL; new session same orientation - [ ] Manual: `?price=cUSTC` / invert pill flips Last, 24h USD OHLC, %, TWAP, headings, tape Price; volume does not - [ ] Manual: `/trade` first visit of UST1/cUSTC still other-side (cUSTC USD) - [ ] Manual: desktop + phone; light + dark; hostile `/charts/<script>?price=<script>` → invalid-pair notice
PlasticDigits (Migrated from gitlab.com) merged commit 479f9012d7 into main 2026-08-27 04:45:26 +00:00
PlasticDigits commented 2026-08-27 04:45:27 +00:00 (Migrated from gitlab.com)

mentioned in commit 479f9012d7

mentioned in commit 479f9012d7e217d4a3ea4b7a65d42530b1ccd474
PlasticDigits commented 2026-08-27 05:29:53 +00:00 (Migrated from gitlab.com)

mentioned in issue #686

mentioned in issue #686
PlasticDigits commented 2026-08-27 05:30:28 +00:00 (Migrated from gitlab.com)

mentioned in issue #680

mentioned in issue #680
Sign in to join this conversation.
No reviewers
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!1183
No description provided.