Updated Gap Analysis #411

Closed
opened 2026-06-25 12:50:50 +00:00 by PlasticDigits · 21 comments
PlasticDigits commented 2026-06-25 12:50:50 +00:00 (Migrated from gitlab.com)
No description provided.
PlasticDigits commented 2026-06-25 12:53:45 +00:00 (Migrated from gitlab.com)

Cover ui/ux issues and smart contract issues. First Focus on areas where the system may behave differently than expected foe a user migrating from a cex or dex. Second, focus on reducing information overload as some buttons may be unexcessarilt large or use text when clear unicode could be used, complex warnings may backfire by causing awareness fatigue, and general simplification. Also, check all components, surfaces, and pages for compliance with Cyberminimalist Glass System design pattern, and make sure docs are up to date with that Cyberminimalist Glass System design pattern.

Cover ui/ux issues and smart contract issues. First Focus on areas where the system may behave differently than expected foe a user migrating from a cex or dex. Second, focus on reducing information overload as some buttons may be unexcessarilt large or use text when clear unicode could be used, complex warnings may backfire by causing awareness fatigue, and general simplification. Also, check all components, surfaces, and pages for compliance with Cyberminimalist Glass System design pattern, and make sure docs are up to date with that Cyberminimalist Glass System design pattern.
PlasticDigits commented 2026-06-25 13:12:18 +00:00 (Migrated from gitlab.com)

CL8Y DEX Terra Classic — Gap Analysis (#411)

Field Value
Generated (UTC) 2026-06-25
Epoch 1782392119
Branch baseline main @ sync
Issue scope UI/UX + smart contracts; CEX/DEX migration surprises; information overload; Cyberminimalist Glass System compliance
Prior art gaps/GAP_1780023683.md, docs/reviews/20260409T030009Z/

Executive summary

CL8Y DEX is a hybrid AMM + on-chain FIFO limit book on Terra Classic — materially different from both centralized exchanges (CEX) and pool-only DEXes (Uniswap-class). The stack is technically mature (contracts, indexer, frontend, 31 Playwright specs), but retail UX still reads like an integrator/debug console in several high-traffic surfaces.

Highest-impact gaps for issue #411:

  1. CEX/DEX mental-model mismatches (Critical/High) — Bid/ask buttons labeled “Buy BASE” / “Buy QUOTE” while ticket headings use “Sell BASE”; slippage tolerance vs max spread vs expected route slippage use three names for related concepts; hybrid pool+book execution can differ from displayed quotes; three parallel trade entry points (/, /trade, /limits) with no onboarding map.
  2. Information overload & warning fatigue (High) — Swap Settings embeds indexer route-debug UI and hybrid “Pattern C” controls; trade CTAs are smaller than swap CTAs; multiple simultaneous alert stacks on one screen; developer copy (GitLab issue refs, internal doc links) in user-facing alerts.
  3. Cyberminimalist Glass System (High — documentation gap) — The name does not appear anywhere in the repo. Implementation is a cohesive glass + neo-brutalist system in frontend-dapp/src/index.css, but there is no authoritative design spec, no component matrix, and concrete compliance bugs (btn-neo referenced in TSX with no CSS definition; .glass defined but unused).
  4. Smart-contract behavior vs user expectations (Medium–High) — Book walk caps spill unfilled size to the AMM pool in the same tx; pure-book hybrid requires min_return; maker fees charged at placement; dust/expiry require separate claim txs; pause blocks cancel/claim.
  5. Test & CI confidence (Critical ops) — Hosted GitLab CI runs security scans + builds only; functional tests are local/reference. This run: contracts ✅, frontend 1039/1040 (cosmes patch SHA drift), indexer lib 151/152 (db_orderbook_sim failure blocked integration suite).

Bottom line: Pool-only swap is production-ready for informed users. Retail launch needs copy/IA simplification, design-system documentation, and stronger alignment between quotes and hybrid execution — before marketing to CEX/DEX migrants.


Methodology

  • Issue #411 comment scope + full repo exploration (smartcontracts/, indexer/, frontend-dapp/, docs/, skills/, CI)
  • Test execution on Cloud Agent VM (no LocalTerra E2E this run):
    • make test-contracts — pass
    • make test-frontend — 1 failure (cosmesPatch127.test.ts patch SHA)
    • make test-indexer-integration — blocked by lib test failure (api::db_orderbook_sim::tests::zero_reserve_mirror_returns_no_output)
  • Cross-check against prior gap report GAP_1780023683.md and frozen review matrices

1. CEX/DEX migration — behavioral surprises (Priority 1)

1.1 Critical

Gap Why it matters Evidence
Bid/ask labels contradict Buy/Sell verbs CEX users expect “Buy” = acquire base, “Sell” = dispose base. Buttons show “Buy TOKEN0” and “Buy TOKEN1” via tradeDirectionSideLabels.ts, while ticket title may read “Sell TOKEN0” for ask side. frontend-dapp/src/utils/tradeDirectionSideLabels.ts, TradeOrderTicket.tsx, LimitOrderBidAskSideSelector.tsx
Integrator UI in consumer Swap Settings Casual Uniswap migrants opening Settings see indexer hop addresses, client vs indexer hop counts, hybrid book-leg overrides — not slippage presets. SwapPage.tsx Settings drawer (~L1049–1216)
Quote ≠ execution for hybrid Receive line can be pool-only simulation while tx submits hybrid Pattern C; fill may differ materially. SwapPage.tsx comments + warnings; contract L8 invariant (docs/contracts-security-audit.md)

1.2 High

Gap CEX/DEX expectation CL8Y behavior
Three trade surfaces One “Trade” screen / swap, /trade pro workspace, /limits limit book — peers in navItems.ts
Slippage naming One “slippage tolerance” UI: “Slippage Tolerance”; pre-sign: “Max spread”; chain errors: “max spread assertion” (humanizeTerraTxError.ts)
“Expected slippage” ≠ tolerance Slippage setting only Route cross-rate metric (#293) separate from tolerance; expert mode blocks >30% expected
Hybrid routing default on Trade market Market order hits book or pool, not both opaquely TradeMarketOrderPanel.tsx hybrid on; “Pattern C” copy; quoteDisclosure strings
No in-app network switch MetaMask-style chain picker NetworkBadge.tsx display-only; WalletModal.tsx lists wallets without Terra Classic guidance
Developer jargon in alerts Plain language “Pattern C”, links to docs/limit-orders.md, “Issue: GitLab #157” in LimitOrderPreSubmitSummary.tsx
Raw errors on market panel Humanized failures TradeMarketOrderPanel.tsx may surface raw (simQuery.error as Error).message
Inverted CTA hierarchy Large Buy/Sell on trade Swap CTA py-3.5 text-base; trade place/market !text-xs (TradeOrderTicket.tsx, TradeMarketOrderPanel.tsx)

1.3 Medium

Gap Notes
Cancel by Order ID TradeOrderTicket.tsx, LimitOrdersPage.tsx — CEX shows open orders list with one-click cancel
Hidden tx deadline stores/dex.ts deadlineSeconds: 300 never shown in Settings (Uniswap shows this)
bps fee copy LimitOrderPreSubmitSummary.tsx — “½ of Y bps effective swap fee”
Base/quote price help hidden on mobile TradeOrderTicket.tsx price semantics hidden lg:block
Limit tab default TradeOrderTicket.tsx defaults to limit not market
Post-place indexer lag Users must know Order ID; “View order” scroll behavior

1.4 Smart contracts — migration surprises

Finding Severity Location
Book walk caps → partial fill + pool spillover in same tx Medium orderbook.rs, pair/contract.rs execute_swap
Pure-book hybrid requires min_return or belief_price High (UX) max_spread.rs, router omits belief_price
10% minimum pool leg for no-belief book hybrid (#307) Medium max_spread.rs, router precheck
Maker fee at placement (½ effective fee) + taker per fill Medium orderbook.rs, limit_placement.rs
Dust flush (<10 units) → claim path, not visible remainder Medium orderbook.rs LIMIT_ORDER_DUST_FLUSH_THRESHOLD
Expiry claim separate tx; pause blocks cancel and claim High (ops) L6 invariant
Default 1% max_spread when omitted Medium default_max_spread()
300s discount cache may not match live CL8Y balance Medium discount_cache.rs
min_return enforced on net after hook fees High (good, must surface in UI) execute_swap L1167–1186
Public mempool / no MEV protection Medium Documented; unlike CEX private matching

2. Information overload & simplification (Priority 2)

2.1 Warning fatigue & density

Surface Problem Severity
SwapPage Simultaneous stack: market outage, fee discount warning, execution summary, route spread, extreme slippage, expert block, hybrid leg alert, pause, blacklist, pre-submit, impact confirm, tx result Medium
TradePage desktop Resizable chart + book + tape + wallet history + full ticket — no “simple mode” High
LimitsPage Duplicates /trade limit tab + ladder panel + history High
Market quote card Monospace route, hop spread, indexer disclosure strings Medium

2.2 Button size, text vs icons

Pattern Issue Files
Trade CTAs !text-xs / !text-[10px] Primary money actions smaller than Swap TradeOrderTicket.tsx, TradeMarketOrderPanel.tsx, LimitOrderLadderPanel.tsx
Slippage presets !text-[10px] Below 44px touch target TradeMarketOrderPanel.tsx
Swap direction icon-only 16×16 SVG, aria-label only SwapPage.tsx
Settings expand ▼/▲ only Not obviously “Settings” SwapPage.tsx
Wallet disconnected pill Subtle border — may not read as tappable TradeOrderTicket.tsx

Recommendation: Use unicode/icon affordances where they reduce text (⇄ swap, ⚙ settings, ↓ expand) only when paired with accessible labels; enlarge trade CTAs to match swap hierarchy; collapse advanced panels behind progressive disclosure defaults (off for new users).

2.3 Copy to remove from retail paths

  • “Pattern C”, “hybrid_simulation”, “Indexer-optimized hybrid splits”
  • GitLab issue numbers in UI (LimitOrderPreSubmitSummary.tsx L108)
  • Links to docs/swap-max-spread-ux.md / docs/limit-orders.md in alert bodies (move to “Learn more” footnotes)

3. Cyberminimalist Glass System — compliance & documentation

3.1 Naming & documentation gap — High

Full-text repo search: zero hits for “Cyberminimalist”, “Cyberminimalist Glass System”, or “Glass System” as a product name.

What exists Path
Implementation (glass + neo-brutalist) frontend-dapp/src/index.css (~1800 lines), theme-dark.css, theme-light.css
QA checklist (“neo-brutalist borders match design system”) QA_TEMPLATE.md §10
Engineering invariants (focus, responsive shell, a11y CI) docs/frontend.md, agent skills
Missing DESIGN.md, token catalog, component matrix, Figma, “when to use shell-panel vs card-neo”

Gap: Issue #411 asks for docs “up to date with Cyberminimalist Glass System” — the name and spec do not exist in-repo. Either codify the external name in a new design doc or align issue terminology with implemented “glass + neo-brutalist” vocabulary.

3.2 Inferred design principles (from code)

  1. Glassmorphism: backdrop-filter: blur(14–18px), translucent gradients
  2. Neo-brutalist chrome: 1px warm borders, inset highlights, stacked shadows, uppercase micro-labels
  3. Warm cyber palette: copper/brown base, amber-orange accent (--mint, --cyan are legacy misnomers)
  4. Dual theme via data-theme on <html>, not Tailwind dark:
  5. Typography: Chakra Petch (headings) + IBM Plex Sans (body)
  6. Sensory layer: custom cursors, WAV sounds (partial adoption)

3.3 Compliance defects by surface

Check Status Detail
shell-panel / shell-panel-strong on pages ✅ Widespread Swap, Trade, Pool, Limits, Portfolio, Charts, Protocol, Trader
card-neo via Card.tsx ✅ Used UI wrapper
.glass class ❌ Unused Defined in index.css, no src/ references
btn-neo ❌ Broken Used in LimitOrdersPage.tsx, PairNotFoundLinkNotice.tsx, InvalidPairLinkNotice.tsx — no .btn-neo rule in CSS
Tailwind primary/dex blue palette ⚠️ Drift tailwind.config.js vs warm CSS-var system
trade-bootstrap.css ⚠️ Drift Hard-coded warm palette, not theme tokens
Hover sounds (QA §10.3) ⚠️ Partial Mainly WalletModal.tsx; press/success/error wider
QA doc drift ⚠️ QA_PASS_2026-03-13.md still mentions footer theme toggle; template says header (#170)
Focus rings / a11y ✅ Strong --focus-ring, axe CI on critical routes
Page coverage ✅ All major routes use shell-panel* No page appears fully off-system

3.4 Component audit summary

Area Glass/neo compliance Notes
App shell (header, nav, wallet) Good .app-*, .wallet-* in index.css
Swap Good panels; overload in Settings content
Trade workspace Good structure; typography density high
Limits Good; broken btn-neo on mode toggle
Pool / Tiers / Protocol Good
Modals Good (app-modal-panel)
Trade bootstrap skeleton Off-token public/bootstrap/trade-bootstrap.css

4. Testing & CI gaps

4.1 This run

Suite Result Failure
make test-contracts ✅ Pass —
make test-frontend ⚠️ 1039/1040 cosmesPatch127.test.ts — patch file SHA mismatch for @goblinhunt/cosmes@0.0.71-ghunt.22
make test-indexer-integration ❌ Blocked at lib db_orderbook_sim::zero_reserve_mirror_returns_no_output
E2E (31 specs) Not run Requires LocalTerra + deploy + indexer

4.2 Coverage holes relevant to #411

Gap Severity Notes
GitLab CI = build + security only Critical No contract/frontend/indexer/E2E on merge
No multihop hybrid router tx E2E High skills/AGENTS_TESTING_MULTIHOP_HYBRID.md
No /trader or /protocol E2E High/Medium Vitest only
Route slippage (#293) not in indexer integration tests High Manual verify-issue-293.sh only
Frontend HTTP integration beyond Charts Medium 7 tests / 3 files
Blacklist E2E Medium Vitest (#388); LCD mock pattern exists for wrap
tradeDirectionSideLabels Low test depth 1 unit test; no UX regression on label semantics
Design-system visual regression None No Percy/Chromatic; manual QA_TEMPLATE §10 only

5. Security, gas, DRY, readability (abbreviated)

Area Finding Severity
Security Self-authored audit (docs/contracts-security-audit.md); fee-on-transfer reserve desync if whitelisted Medium
Gas Hybrid worst-case ~15M envelope; MAX_SCAN_STEPS/max_maker_fills caps Medium — must be in user copy
DRY Three pages duplicate limit placement/cancel patterns Medium
Readability SwapPage.tsx very large; settings mixed with retail Medium
Indexer dead exports 7 client.ts methods unused by pages Low
Frontend blacklist LCD direct, not indexer proxy — documented split Medium

6. Findings by severity

Critical

  1. Bid/ask “Buy QUOTE” vs “Sell BASE” label contradiction
  2. Integrator/debug controls in Swap Settings (indexer route check, hybrid leg)
  3. GitLab CI green ≠ functional test pass

High

  1. Quote ≠ execution for hybrid (pool-only display + hybrid submit)
  2. Cyberminimalist Glass System undocumented; btn-neo broken
  3. Three trade entry points without IA map
  4. Slippage / max spread / expected slippage terminology split
  5. Information overload on Trade/Limits; small trade CTAs
  6. Developer copy in user alerts
  7. Pure-book hybrid min_return requirement not obvious in UI
  8. No in-app network switch / wallet onboarding for Terra Classic

Medium

  1. Smart-contract: book caps → pool spillover; dust/expiry claims; pause freezes cancel
  2. Hidden tx deadline; bps fee copy; base/quote help hidden on mobile
  3. Indexer lib test failure; frontend cosmes patch drift
  4. E2E gaps (multihop hybrid, trader, protocol)
  5. Warning stack fatigue on Swap
  6. Tailwind/token drift; unused .glass; trade-bootstrap off-theme

Low

  1. Simulated wallet in dev builds
  2. Dead indexer client exports
  3. OpenAPI omissions; stale TEST_GAP_MATRIX.md

Immediate (copy & IA — low risk, high impact)

  1. Fix tradeDirectionSideLabels — use CEX-standard “Buy {base}” / “Sell {base}” (or “Buy” / “Sell” with clear base symbol in heading only).
  2. Retail vs Advanced Settings — default Settings to slippage + deadline only; move indexer route debug and hybrid leg to Advanced/Expert panel.
  3. Strip developer copy from alerts — replace GitLab/doc refs with “Learn more” links; humanize all TradeMarketOrderPanel errors via humanizeUserFacingError.
  4. Unify slippage language — pick one retail term (“Slippage protection”) and map max spread in a single tooltip; show tx deadline in Settings.
  5. Define btn-neo in index.css or replace with btn-muted everywhere.

Short term (design system)

  1. Author docs/design-system.md (or adopt “Cyberminimalist Glass System” name) — token table, primitives (shell-panel, card-neo, btn-*, tab-neo, input-neo), spacing, when-to-use rules, icon/unicode guidelines.
  2. Align trade-bootstrap.css and tailwind.config.js with CSS variables or mark deprecated.
  3. Visual QA pass — all routes against QA_TEMPLATE §10; fix QA_PASS footer drift.
  4. Enlarge trade CTAs to match Swap; add progressive disclosure for Trade workspace panels on first visit.

Medium term (product & contracts alignment)

  1. Onboarding strip — “New here? Start with Swap” + one sentence on hybrid vs pool-only.
  2. Hybrid disclosure — persistent badge when quote is pool-only but execution is hybrid; block submit without acknowledgment.
  3. Limit order UX — surface open orders without Order ID entry; explain maker fee at placement, dust/expiry claims in plain language.
  4. Fix failing tests — cosmes patch SHA, db_orderbook_sim lib test; add #293 slippage to indexer integration suite.

Strategic (CI & E2E)

  1. Expand GitLab CI toward reference matrix in .github/workflows/test.yml (#234).
  2. E2E: multihop hybrid tx, /trader, /protocol, blacklist with LCD mock.
  3. Optional: visual regression for design-system primitives.

8. Positive patterns (preserve)

  • Pre-sign summaries (SwapPreSubmitSummary, LimitOrderPreSubmitSummary) — aligns with modern DEX anti-phishing UX
  • humanizeTerraTxError.ts where wired — clear max spread, pause, blacklist copy
  • Expert mode with typed confirmation
  • Post-only crossing guards (limitOrderNonCrossing.ts)
  • Glass/neo shell consistency across all major routes
  • Strong contract integration test suite (~13k+ lines)
  • 31 Playwright specs including strict on-chain swap/limit/hybrid paths

Report generated for GitLab issue #411. Full path: gaps/GAP_1782392119.md.

# CL8Y DEX Terra Classic — Gap Analysis (#411) | Field | Value | |-------|-------| | **Generated (UTC)** | 2026-06-25 | | **Epoch** | `1782392119` | | **Branch baseline** | `main` @ sync | | **Issue scope** | UI/UX + smart contracts; CEX/DEX migration surprises; information overload; Cyberminimalist Glass System compliance | | **Prior art** | [`gaps/GAP_1780023683.md`](GAP_1780023683.md), [`docs/reviews/20260409T030009Z/`](../docs/reviews/20260409T030009Z/) | ## Executive summary CL8Y DEX is a **hybrid AMM + on-chain FIFO limit book** on Terra Classic — materially different from both centralized exchanges (CEX) and pool-only DEXes (Uniswap-class). The stack is technically mature (contracts, indexer, frontend, 31 Playwright specs), but **retail UX still reads like an integrator/debug console** in several high-traffic surfaces. **Highest-impact gaps for issue #411:** 1. **CEX/DEX mental-model mismatches (Critical/High)** — Bid/ask buttons labeled “Buy BASE” / “Buy QUOTE” while ticket headings use “Sell BASE”; slippage tolerance vs max spread vs expected route slippage use three names for related concepts; hybrid pool+book execution can differ from displayed quotes; three parallel trade entry points (`/`, `/trade`, `/limits`) with no onboarding map. 2. **Information overload & warning fatigue (High)** — Swap Settings embeds indexer route-debug UI and hybrid “Pattern C” controls; trade CTAs are smaller than swap CTAs; multiple simultaneous alert stacks on one screen; developer copy (GitLab issue refs, internal doc links) in user-facing alerts. 3. **Cyberminimalist Glass System (High — documentation gap)** — The name **does not appear anywhere in the repo**. Implementation is a cohesive **glass + neo-brutalist** system in `frontend-dapp/src/index.css`, but there is **no authoritative design spec**, **no component matrix**, and **concrete compliance bugs** (`btn-neo` referenced in TSX with **no CSS definition**; `.glass` defined but unused). 4. **Smart-contract behavior vs user expectations (Medium–High)** — Book walk caps spill unfilled size to the AMM pool in the same tx; pure-book hybrid requires `min_return`; maker fees charged at placement; dust/expiry require separate claim txs; pause blocks cancel/claim. 5. **Test & CI confidence (Critical ops)** — Hosted GitLab CI runs security scans + builds only; functional tests are local/reference. This run: contracts ✅, frontend 1039/1040 (cosmes patch SHA drift), indexer lib 151/152 (`db_orderbook_sim` failure blocked integration suite). **Bottom line:** Pool-only swap is production-ready for informed users. **Retail launch** needs copy/IA simplification, design-system documentation, and stronger alignment between quotes and hybrid execution — before marketing to CEX/DEX migrants. --- ## Methodology - Issue #411 comment scope + full repo exploration (`smartcontracts/`, `indexer/`, `frontend-dapp/`, `docs/`, `skills/`, CI) - Test execution on Cloud Agent VM (no LocalTerra E2E this run): - `make test-contracts` — pass - `make test-frontend` — 1 failure (`cosmesPatch127.test.ts` patch SHA) - `make test-indexer-integration` — blocked by lib test failure (`api::db_orderbook_sim::tests::zero_reserve_mirror_returns_no_output`) - Cross-check against prior gap report `GAP_1780023683.md` and frozen review matrices --- ## 1. CEX/DEX migration — behavioral surprises (Priority 1) ### 1.1 Critical | Gap | Why it matters | Evidence | |-----|----------------|----------| | **Bid/ask labels contradict Buy/Sell verbs** | CEX users expect “Buy” = acquire base, “Sell” = dispose base. Buttons show **“Buy TOKEN0”** and **“Buy TOKEN1”** via `tradeDirectionSideLabels.ts`, while ticket title may read **“Sell TOKEN0”** for ask side. | `frontend-dapp/src/utils/tradeDirectionSideLabels.ts`, `TradeOrderTicket.tsx`, `LimitOrderBidAskSideSelector.tsx` | | **Integrator UI in consumer Swap Settings** | Casual Uniswap migrants opening Settings see indexer hop addresses, client vs indexer hop counts, hybrid book-leg overrides — not slippage presets. | `SwapPage.tsx` Settings drawer (~L1049–1216) | | **Quote ≠ execution for hybrid** | Receive line can be pool-only simulation while tx submits hybrid Pattern C; fill may differ materially. | `SwapPage.tsx` comments + warnings; contract L8 invariant (`docs/contracts-security-audit.md`) | ### 1.2 High | Gap | CEX/DEX expectation | CL8Y behavior | |-----|---------------------|---------------| | **Three trade surfaces** | One “Trade” screen | `/` swap, `/trade` pro workspace, `/limits` limit book — peers in `navItems.ts` | | **Slippage naming** | One “slippage tolerance” | UI: “Slippage Tolerance”; pre-sign: “Max spread”; chain errors: “max spread assertion” (`humanizeTerraTxError.ts`) | | **“Expected slippage” ≠ tolerance** | Slippage setting only | Route cross-rate metric (#293) separate from tolerance; expert mode blocks >30% expected | | **Hybrid routing default on Trade market** | Market order hits book or pool, not both opaquely | `TradeMarketOrderPanel.tsx` hybrid on; “Pattern C” copy; `quoteDisclosure` strings | | **No in-app network switch** | MetaMask-style chain picker | `NetworkBadge.tsx` display-only; `WalletModal.tsx` lists wallets without Terra Classic guidance | | **Developer jargon in alerts** | Plain language | “Pattern C”, links to `docs/limit-orders.md`, “Issue: GitLab #157” in `LimitOrderPreSubmitSummary.tsx` | | **Raw errors on market panel** | Humanized failures | `TradeMarketOrderPanel.tsx` may surface raw `(simQuery.error as Error).message` | | **Inverted CTA hierarchy** | Large Buy/Sell on trade | Swap CTA `py-3.5 text-base`; trade place/market `!text-xs` (`TradeOrderTicket.tsx`, `TradeMarketOrderPanel.tsx`) | ### 1.3 Medium | Gap | Notes | |-----|-------| | Cancel by Order ID | `TradeOrderTicket.tsx`, `LimitOrdersPage.tsx` — CEX shows open orders list with one-click cancel | | Hidden tx deadline | `stores/dex.ts` `deadlineSeconds: 300` never shown in Settings (Uniswap shows this) | | bps fee copy | `LimitOrderPreSubmitSummary.tsx` — “½ of Y bps effective swap fee” | | Base/quote price help hidden on mobile | `TradeOrderTicket.tsx` price semantics `hidden lg:block` | | Limit tab default | `TradeOrderTicket.tsx` defaults to `limit` not `market` | | Post-place indexer lag | Users must know Order ID; “View order” scroll behavior | ### 1.4 Smart contracts — migration surprises | Finding | Severity | Location | |---------|----------|----------| | Book walk caps → partial fill + **pool spillover** in same tx | Medium | `orderbook.rs`, `pair/contract.rs` `execute_swap` | | Pure-book hybrid **requires `min_return` or `belief_price`** | High (UX) | `max_spread.rs`, router omits `belief_price` | | **10% minimum pool leg** for no-belief book hybrid (#307) | Medium | `max_spread.rs`, router precheck | | **Maker fee at placement** (½ effective fee) + taker per fill | Medium | `orderbook.rs`, `limit_placement.rs` | | **Dust flush** (<10 units) → claim path, not visible remainder | Medium | `orderbook.rs` `LIMIT_ORDER_DUST_FLUSH_THRESHOLD` | | **Expiry claim** separate tx; pause blocks cancel **and** claim | High (ops) | L6 invariant | | Default **1% max_spread** when omitted | Medium | `default_max_spread()` | | **300s discount cache** may not match live CL8Y balance | Medium | `discount_cache.rs` | | `min_return` enforced on **net after hook fees** | High (good, must surface in UI) | `execute_swap` L1167–1186 | | Public mempool / no MEV protection | Medium | Documented; unlike CEX private matching | --- ## 2. Information overload & simplification (Priority 2) ### 2.1 Warning fatigue & density | Surface | Problem | Severity | |---------|---------|----------| | **SwapPage** | Simultaneous stack: market outage, fee discount warning, execution summary, route spread, extreme slippage, expert block, hybrid leg alert, pause, blacklist, pre-submit, impact confirm, tx result | Medium | | **TradePage desktop** | Resizable chart + book + tape + wallet history + full ticket — no “simple mode” | High | | **LimitsPage** | Duplicates `/trade` limit tab + ladder panel + history | High | | **Market quote card** | Monospace route, hop spread, indexer disclosure strings | Medium | ### 2.2 Button size, text vs icons | Pattern | Issue | Files | |---------|-------|-------| | Trade CTAs `!text-xs` / `!text-[10px]` | Primary money actions smaller than Swap | `TradeOrderTicket.tsx`, `TradeMarketOrderPanel.tsx`, `LimitOrderLadderPanel.tsx` | | Slippage presets `!text-[10px]` | Below 44px touch target | `TradeMarketOrderPanel.tsx` | | Swap direction icon-only | 16×16 SVG, `aria-label` only | `SwapPage.tsx` | | Settings expand ▼/▲ only | Not obviously “Settings” | `SwapPage.tsx` | | Wallet disconnected pill | Subtle border — may not read as tappable | `TradeOrderTicket.tsx` | **Recommendation:** Use unicode/icon affordances where they reduce text (`⇄` swap, `⚙` settings, `↓` expand) *only when* paired with accessible labels; enlarge trade CTAs to match swap hierarchy; collapse advanced panels behind progressive disclosure defaults (off for new users). ### 2.3 Copy to remove from retail paths - “Pattern C”, “hybrid_simulation”, “Indexer-optimized hybrid splits” - GitLab issue numbers in UI (`LimitOrderPreSubmitSummary.tsx` L108) - Links to `docs/swap-max-spread-ux.md` / `docs/limit-orders.md` in alert bodies (move to “Learn more” footnotes) --- ## 3. Cyberminimalist Glass System — compliance & documentation ### 3.1 Naming & documentation gap — **High** Full-text repo search: **zero** hits for “Cyberminimalist”, “Cyberminimalist Glass System”, or “Glass System” as a product name. | What exists | Path | |-------------|------| | Implementation (glass + neo-brutalist) | `frontend-dapp/src/index.css` (~1800 lines), `theme-dark.css`, `theme-light.css` | | QA checklist (“neo-brutalist borders match design system”) | `QA_TEMPLATE.md` §10 | | Engineering invariants (focus, responsive shell, a11y CI) | `docs/frontend.md`, agent skills | | **Missing** | `DESIGN.md`, token catalog, component matrix, Figma, “when to use `shell-panel` vs `card-neo`” | **Gap:** Issue #411 asks for docs “up to date with Cyberminimalist Glass System” — **the name and spec do not exist in-repo**. Either codify the external name in a new design doc or align issue terminology with implemented “glass + neo-brutalist” vocabulary. ### 3.2 Inferred design principles (from code) 1. Glassmorphism: `backdrop-filter: blur(14–18px)`, translucent gradients 2. Neo-brutalist chrome: 1px warm borders, inset highlights, stacked shadows, uppercase micro-labels 3. Warm cyber palette: copper/brown base, amber-orange accent (`--mint`, `--cyan` are legacy misnomers) 4. Dual theme via `data-theme` on `<html>`, not Tailwind `dark:` 5. Typography: Chakra Petch (headings) + IBM Plex Sans (body) 6. Sensory layer: custom cursors, WAV sounds (partial adoption) ### 3.3 Compliance defects by surface | Check | Status | Detail | |-------|--------|--------| | `shell-panel` / `shell-panel-strong` on pages | ✅ Widespread | Swap, Trade, Pool, Limits, Portfolio, Charts, Protocol, Trader | | `card-neo` via `Card.tsx` | ✅ Used | UI wrapper | | `.glass` class | ❌ Unused | Defined in `index.css`, no `src/` references | | `btn-neo` | ❌ **Broken** | Used in `LimitOrdersPage.tsx`, `PairNotFoundLinkNotice.tsx`, `InvalidPairLinkNotice.tsx` — **no `.btn-neo` rule in CSS** | | Tailwind `primary`/`dex` blue palette | ⚠️ Drift | `tailwind.config.js` vs warm CSS-var system | | `trade-bootstrap.css` | ⚠️ Drift | Hard-coded warm palette, not theme tokens | | Hover sounds (QA §10.3) | ⚠️ Partial | Mainly `WalletModal.tsx`; press/success/error wider | | QA doc drift | ⚠️ | `QA_PASS_2026-03-13.md` still mentions footer theme toggle; template says header (#170) | | Focus rings / a11y | ✅ Strong | `--focus-ring`, axe CI on critical routes | | Page coverage | ✅ All major routes use `shell-panel*` | No page appears fully off-system | ### 3.4 Component audit summary | Area | Glass/neo compliance | Notes | |------|---------------------|-------| | App shell (header, nav, wallet) | Good | `.app-*`, `.wallet-*` in `index.css` | | Swap | Good panels; overload in Settings content | | | Trade workspace | Good structure; typography density high | | | Limits | Good; broken `btn-neo` on mode toggle | | | Pool / Tiers / Protocol | Good | | | Modals | Good (`app-modal-panel`) | | | Trade bootstrap skeleton | Off-token | `public/bootstrap/trade-bootstrap.css` | --- ## 4. Testing & CI gaps ### 4.1 This run | Suite | Result | Failure | |-------|--------|---------| | `make test-contracts` | ✅ Pass | — | | `make test-frontend` | ⚠️ 1039/1040 | `cosmesPatch127.test.ts` — patch file SHA mismatch for `@goblinhunt/cosmes@0.0.71-ghunt.22` | | `make test-indexer-integration` | ❌ Blocked at lib | `db_orderbook_sim::zero_reserve_mirror_returns_no_output` | | E2E (31 specs) | Not run | Requires LocalTerra + deploy + indexer | ### 4.2 Coverage holes relevant to #411 | Gap | Severity | Notes | |-----|----------|-------| | GitLab CI = build + security only | **Critical** | No contract/frontend/indexer/E2E on merge | | No multihop hybrid router tx E2E | High | `skills/AGENTS_TESTING_MULTIHOP_HYBRID.md` | | No `/trader` or `/protocol` E2E | High/Medium | Vitest only | | Route slippage (#293) not in indexer integration tests | High | Manual `verify-issue-293.sh` only | | Frontend HTTP integration beyond Charts | Medium | 7 tests / 3 files | | Blacklist E2E | Medium | Vitest (#388); LCD mock pattern exists for wrap | | `tradeDirectionSideLabels` | Low test depth | 1 unit test; no UX regression on label semantics | | Design-system visual regression | None | No Percy/Chromatic; manual QA_TEMPLATE §10 only | --- ## 5. Security, gas, DRY, readability (abbreviated) | Area | Finding | Severity | |------|---------|----------| | Security | Self-authored audit (`docs/contracts-security-audit.md`); fee-on-transfer reserve desync if whitelisted | Medium | | Gas | Hybrid worst-case ~15M envelope; `MAX_SCAN_STEPS`/`max_maker_fills` caps | Medium — must be in user copy | | DRY | Three pages duplicate limit placement/cancel patterns | Medium | | Readability | `SwapPage.tsx` very large; settings mixed with retail | Medium | | Indexer dead exports | 7 `client.ts` methods unused by pages | Low | | Frontend blacklist | LCD direct, not indexer proxy — documented split | Medium | --- ## 6. Findings by severity ### Critical 1. Bid/ask “Buy QUOTE” vs “Sell BASE” label contradiction 2. Integrator/debug controls in Swap Settings (indexer route check, hybrid leg) 3. GitLab CI green ≠ functional test pass ### High 4. Quote ≠ execution for hybrid (pool-only display + hybrid submit) 5. Cyberminimalist Glass System undocumented; `btn-neo` broken 6. Three trade entry points without IA map 7. Slippage / max spread / expected slippage terminology split 8. Information overload on Trade/Limits; small trade CTAs 9. Developer copy in user alerts 10. Pure-book hybrid `min_return` requirement not obvious in UI 11. No in-app network switch / wallet onboarding for Terra Classic ### Medium 12. Smart-contract: book caps → pool spillover; dust/expiry claims; pause freezes cancel 13. Hidden tx deadline; bps fee copy; base/quote help hidden on mobile 14. Indexer lib test failure; frontend cosmes patch drift 15. E2E gaps (multihop hybrid, trader, protocol) 16. Warning stack fatigue on Swap 17. Tailwind/token drift; unused `.glass`; trade-bootstrap off-theme ### Low 18. Simulated wallet in dev builds 19. Dead indexer client exports 20. OpenAPI omissions; stale `TEST_GAP_MATRIX.md` --- ## 7. Recommended next steps ### Immediate (copy & IA — low risk, high impact) 1. **Fix `tradeDirectionSideLabels`** — use CEX-standard “Buy {base}” / “Sell {base}” (or “Buy” / “Sell” with clear base symbol in heading only). 2. **Retail vs Advanced Settings** — default Settings to slippage + deadline only; move indexer route debug and hybrid leg to Advanced/Expert panel. 3. **Strip developer copy** from alerts — replace GitLab/doc refs with “Learn more” links; humanize all `TradeMarketOrderPanel` errors via `humanizeUserFacingError`. 4. **Unify slippage language** — pick one retail term (“Slippage protection”) and map max spread in a single tooltip; show tx deadline in Settings. 5. **Define `btn-neo` in `index.css`** or replace with `btn-muted` everywhere. ### Short term (design system) 6. **Author `docs/design-system.md`** (or adopt “Cyberminimalist Glass System” name) — token table, primitives (`shell-panel`, `card-neo`, `btn-*`, `tab-neo`, `input-neo`), spacing, when-to-use rules, icon/unicode guidelines. 7. **Align `trade-bootstrap.css` and `tailwind.config.js`** with CSS variables or mark deprecated. 8. **Visual QA pass** — all routes against QA_TEMPLATE §10; fix `QA_PASS` footer drift. 9. **Enlarge trade CTAs** to match Swap; add progressive disclosure for Trade workspace panels on first visit. ### Medium term (product & contracts alignment) 10. **Onboarding strip** — “New here? Start with Swap” + one sentence on hybrid vs pool-only. 11. **Hybrid disclosure** — persistent badge when quote is pool-only but execution is hybrid; block submit without acknowledgment. 12. **Limit order UX** — surface open orders without Order ID entry; explain maker fee at placement, dust/expiry claims in plain language. 13. **Fix failing tests** — cosmes patch SHA, `db_orderbook_sim` lib test; add #293 slippage to indexer integration suite. ### Strategic (CI & E2E) 14. **Expand GitLab CI** toward reference matrix in `.github/workflows/test.yml` (#234). 15. **E2E:** multihop hybrid tx, `/trader`, `/protocol`, blacklist with LCD mock. 16. **Optional:** visual regression for design-system primitives. --- ## 8. Positive patterns (preserve) - Pre-sign summaries (`SwapPreSubmitSummary`, `LimitOrderPreSubmitSummary`) — aligns with modern DEX anti-phishing UX - `humanizeTerraTxError.ts` where wired — clear max spread, pause, blacklist copy - Expert mode with typed confirmation - Post-only crossing guards (`limitOrderNonCrossing.ts`) - Glass/neo shell consistency across all major routes - Strong contract integration test suite (~13k+ lines) - 31 Playwright specs including strict on-chain swap/limit/hybrid paths --- *Report generated for GitLab issue #411. Full path: `gaps/GAP_1782392119.md`.*
PlasticDigits commented 2026-06-25 14:07:57 +00:00 (Migrated from gitlab.com)

All recommendations approved for creating issues. Ui/ux issue validation criteria must include one or more checkboxes for screenshots.

For recommendation 11, hybrid disclosure: instead of disclosure, make sure that if its a hybrid swap, the quote should also be hybrid. This may require changes to indexer.

All recommendations approved for creating issues. Ui/ux issue validation criteria must include one or more checkboxes for screenshots. For recommendation 11, hybrid disclosure: instead of disclosure, make sure that if its a hybrid swap, the quote should also be hybrid. This may require changes to indexer.
PlasticDigits commented 2026-06-25 14:12:43 +00:00 (Migrated from gitlab.com)

mentioned in issue #412

mentioned in issue #412
PlasticDigits commented 2026-06-25 14:12:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #413

mentioned in issue #413
PlasticDigits commented 2026-06-25 14:12:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #414

mentioned in issue #414
PlasticDigits commented 2026-06-25 14:12:47 +00:00 (Migrated from gitlab.com)

mentioned in issue #415

mentioned in issue #415
PlasticDigits commented 2026-06-25 14:12:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #416

mentioned in issue #416
PlasticDigits commented 2026-06-25 14:12:50 +00:00 (Migrated from gitlab.com)

mentioned in issue #417

mentioned in issue #417
PlasticDigits commented 2026-06-25 14:12:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #418

mentioned in issue #418
PlasticDigits commented 2026-06-25 14:12:57 +00:00 (Migrated from gitlab.com)

mentioned in issue #419

mentioned in issue #419
PlasticDigits commented 2026-06-25 14:12:58 +00:00 (Migrated from gitlab.com)

mentioned in issue #420

mentioned in issue #420
PlasticDigits commented 2026-06-25 14:12:59 +00:00 (Migrated from gitlab.com)

mentioned in issue #421

mentioned in issue #421
PlasticDigits commented 2026-06-25 14:13:01 +00:00 (Migrated from gitlab.com)

mentioned in issue #422

mentioned in issue #422
PlasticDigits commented 2026-06-25 14:13:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #423

mentioned in issue #423
PlasticDigits commented 2026-06-25 14:13:22 +00:00 (Migrated from gitlab.com)

Child issues opened from gap analysis (#411)

Triage: Parent comment (2026-06-25) approved all §7 recommendations for issue creation. UI/UX issues include screenshot checkboxes per validation requirement. Recommendation 11 was revised: hybrid quote must match hybrid execution (indexer + frontend) — not a disclosure/acknowledgment UX.

Opened (12 issues, bundled from §7)

Issue Bundle §7 rec(s)
#412 CEX copy — bid/ask labels + slippage terminology + tx deadline 1, 4
#413 Swap Settings retail vs advanced split 2
#414 Strip developer jargon from retail alerts/errors 3
#415 Cyberminimalist Glass System docs + btn-neo fix 5, 6
#416 Tailwind / trade-bootstrap token alignment + visual QA 7, 8
#417 Trade CTA hierarchy + progressive disclosure + onboarding 9, 10
#418 Hybrid quote aligned with hybrid execution (indexer likely) 11 (parent clarification)
#419 Retail limit order UX (open orders, fees, claims, min_return) 12
#420 Fix cosmes patch SHA, db_orderbook_sim test, #293 integration 13
#421 Expand GitLab CI functional test matrix 14
#422 E2E: multihop hybrid, /trader, /protocol, blacklist 15
#423 Optional Playwright visual regression for design primitives 16

Skipped

Item Reason
Rejected / requested / undecided None — all §7 recommendations approved
Already linked child issues None existed on #411 before this pass
Hybrid disclosure / acknowledge mismatch UX Parent explicitly rejected in favor of quote=execution (#418)
Gap findings outside §7 recommendations Not approved for issue creation — e.g. in-app network switch / Terra Classic wallet onboarding (§1.2 High), simulated wallet in dev (Low), dead indexer client exports (Low), OpenAPI omissions (Low), public-mempool/MEV copy (Medium, docs-only)

Dependency notes

  • #415 (docs/design-system.md) should land before or with #416 (token alignment references design doc).
  • #420 (test fixes) unblocks confidence for #418 (hybrid quote) and #421 (CI jobs).
  • #418 is the highest-impact execution-trust fix; coordinate with #413/#414 (Settings + jargon cleanup).
## Child issues opened from gap analysis (#411) **Triage:** Parent comment (2026-06-25) approved **all §7 recommendations** for issue creation. UI/UX issues include screenshot checkboxes per validation requirement. **Recommendation 11** was revised: hybrid quote must match hybrid execution (indexer + frontend) — **not** a disclosure/acknowledgment UX. ### Opened (12 issues, bundled from §7) | Issue | Bundle | §7 rec(s) | |-------|--------|-----------| | #412 | CEX copy — bid/ask labels + slippage terminology + tx deadline | 1, 4 | | #413 | Swap Settings retail vs advanced split | 2 | | #414 | Strip developer jargon from retail alerts/errors | 3 | | #415 | Cyberminimalist Glass System docs + `btn-neo` fix | 5, 6 | | #416 | Tailwind / trade-bootstrap token alignment + visual QA | 7, 8 | | #417 | Trade CTA hierarchy + progressive disclosure + onboarding | 9, 10 | | #418 | Hybrid quote aligned with hybrid execution (indexer likely) | 11 *(parent clarification)* | | #419 | Retail limit order UX (open orders, fees, claims, min_return) | 12 | | #420 | Fix cosmes patch SHA, `db_orderbook_sim` test, #293 integration | 13 | | #421 | Expand GitLab CI functional test matrix | 14 | | #422 | E2E: multihop hybrid, `/trader`, `/protocol`, blacklist | 15 | | #423 | Optional Playwright visual regression for design primitives | 16 | ### Skipped | Item | Reason | |------|--------| | **Rejected / requested / undecided** | None — all §7 recommendations approved | | **Already linked child issues** | None existed on #411 before this pass | | **Hybrid disclosure / acknowledge mismatch UX** | Parent explicitly rejected in favor of quote=execution (#418) | | **Gap findings outside §7 recommendations** | Not approved for issue creation — e.g. in-app network switch / Terra Classic wallet onboarding (§1.2 High), simulated wallet in dev (Low), dead indexer client exports (Low), OpenAPI omissions (Low), public-mempool/MEV copy (Medium, docs-only) | ### Dependency notes - #415 (`docs/design-system.md`) should land before or with #416 (token alignment references design doc). - #420 (test fixes) unblocks confidence for #418 (hybrid quote) and #421 (CI jobs). - #418 is the highest-impact execution-trust fix; coordinate with #413/#414 (Settings + jargon cleanup).
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-25 19:57:34 +00:00
PlasticDigits commented 2026-06-25 20:09:39 +00:00 (Migrated from gitlab.com)

mentioned in merge request !937

mentioned in merge request !937
PlasticDigits commented 2026-06-25 20:10:14 +00:00 (Migrated from gitlab.com)

mentioned in merge request !938

mentioned in merge request !938
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 20:52:06 +00:00 (Migrated from gitlab.com)

mentioned in merge request !943

mentioned in merge request !943
PlasticDigits commented 2026-06-25 22:53:55 +00:00 (Migrated from gitlab.com)

mentioned in merge request !945

mentioned in merge request !945
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#411
No description provided.