bug(frontend): /token/create desktop form wastes horizontal screenspace #669
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#669
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On desktop
/token/create, the create wizard is a single 520px centered column inside the 1080px.app-mainshell. Most of the viewport is empty left and right. Short fields (Name, Symbol, Decimals, Treasury, Manager) stack full-width, so Paid features and the create / pay CTA sit below the fold on a typical 1280×720–1440×900 desktop.Community report (anonymized, 2026-08): desktop Create Token — inefficient screenspace; the form is a narrow vertical card while ~60–70% of the horizontal main area is unused.
This is a layout bug. Invoice math, identity parsers, SKU hooks, and launcher execute stay unchanged (C593, C604, C605).
Related (do not regress): #593 create/manage, #604 identity + wallet helpers, #605 SKU init + percent taxes, #595 PayWithAnyToken, #653 one chrome layer, #489 copy, #488 tokens, #602 retail chrome. Phone-width stacking is in scope as a non-regression (keep a single column ≤767px). Do not fold Manage (
/token/:addr/manage) or Migrate (/token/migrate) into this MR — those stay sibling pages.Current codebase
Shell vs page cap
Layout.tsxmounts the page in.app-main-content.index.cssalready sizes the shell:CreateTokenPage.tsxthen re-caps the entire wizard (configured + unavailable stub) atmax-w-[520px] mx-auto(data-testid="create-token-page"). On a 1280–1920 desktop that leaves ~280px unused on each side of a 520px card (1080 − 520 = 560px of empty main width). Swap stays a 500px card on purpose; Create Token is a long multi-section form, not a Pay/Receive ticket.Field stack (today)
One
shell-panel-strong space-y-4holds every control. Only Buy tax / Sell tax already usegrid grid-cols-2. Everything else is a full-widthlabel.block:6; integer 6–18grid-cols-2connected wallethelperPayWithAnyTokenSKU catalog is
COMMUNITY_TAX_SKUSincommunityTaxSku.ts: Minting, Wallet-to-wallet tax, Split treasury, Auto liquidity, Extra exemptions, Change rates later, Launch guards. Uncheck still must drop that SKU’s init keys from the hook (C605-2).Tests / docs today
CreateTokenPage.test.tsx— env gate, SKU invoice 0/50/150, helpers, decimals, name space,/createnext link. No width / grid / viewport assertions.e2e/create-token-602.spec.ts— default 1280×720; heading, More menu, free CTA vs pay card. Does not measure column width or fold.docs/frontend.md§ Create Token (C593-1–C593-14, C604, C605). No desktop density rule yet.skills/AGENTS_FRONTEND_CREATE_TOKEN.md.QA_TEMPLATE.mdhas Create Pair mobile (11.1.5) but no Create Token desktop-width row.Why this is needed
Create Token is the retail path to instantiate a community tax token (free 0-SKU or paid SKUs). On desktop the first screen should show identity + tax + wallets + the Paid features list without scrolling past a 520px chimney. Users cannot see SKU cost (
N × 50 UST1) or the ack / CTA until they scroll — that is how people miss Minting (create-only) or enable the wrong SKU.This is not “users should zoom out.” The shell already budgets 1080px. The page must use a responsive multi-column layout at
md/lgand keep a single column on phone so 375 / 390 stay usable (same class of work as #651 for/tiers, opposite breakpoint).Constraints / guardrails
CreateToken/ UST1Receivehooks, invoice payee, SKU prices, orbuildValidatedCreateArgs/buildCreateTokenHookfield semantics (C593-3, C593-4, C593-10, C593-12).^[A-Za-z0-9]+$; decimals 6–18; treasury/manager autofill connected wallet when empty; never clobber a typed address; ignore?manager=/?treasury=/?payee=. Helper copy remains exactlyconnected wallet/not connected wallet.max_*combined ≤ 25.00% (C593-13). AutoLP still blocks whenautolp_code_idis unset.shell-panel-strong(or sibling panels, not nested). Do not wrap SKU tiles in a grid ofcard-glass/ defaultStatBox. Hairline dividers / CSS grid only.input-glass/label-glass/btn-primary. No*-neo. Light + dark.break-all, not overflow the card. Buy/sell 2-col may stay if both fields remain ≥44px tap-wide; otherwise stack.<details>that defaults closed. Free CTA / Pay card must remain in tab order after the form.create-token-page,create-token-name,create-token-symbol,create-token-decimals,create-token-buy-pct,create-token-sell-pct,create-token-treasury,create-token-manager,create-token-sku-*,create-token-ack,create-token-free-cta,create-token-pay, helpers. Add layout testids only (create-token-desktop-gridor similar).e2e-tx. Playwright workers stay 5 for smoke. On-chain create stays existing community-tax tx specs.Relevant files
Primary
frontend-dapp/src/pages/CreateTokenPage.tsx—max-w-[520px]+ stacked labelsfrontend-dapp/src/pages/CreateTokenPage.test.tsx— extend with layout / grid contractfrontend-dapp/e2e/create-token-602.spec.ts— desktop width + phone non-regressionfrontend-dapp/src/index.css— only if a shared form-grid utility is added (prefer Tailwind on the page)Read, do not fork
frontend-dapp/src/utils/communityTaxCreateForm.ts/communityTaxIdentity.ts/communityTaxInvoice.ts/communityTaxSku.tsfrontend-dapp/src/components/payments/PayWithAnyToken.tsxdocs/frontend.md§ Create Tokenskills/AGENTS_FRONTEND_CREATE_TOKEN.mdskills/AGENTS_FRONTEND_CHROME_NESTING.md/skills/AGENTS_FRONTEND_DESIGN_SYSTEM.md/skills/AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.mdQA_TEMPLATE.md§ 11 (add a Create Token desktop + phone row)Out of scope siblings
frontend-dapp/src/pages/ManageTokenPage.tsx(max-w-[640px])frontend-dapp/src/pages/MigrateTokenPage.tsx(max-w-[520px])frontend-dapp/src/pages/CreatePairPage.tsx(keep ticket width)Recommended direction
Ship one responsive layout on
CreateTokenPage. Bundle (do not split into extra issues): (1) raise the desktop max-width, (2) pair short fields, (3) SKU checkbox grid, (4) pair SKU init numeric fields, (5) phone single-column non-regression.A — Use the main shell on desktop
At
md(≥768px) orlg(≥1024px), dropmax-w-[520px]in favor ofw-full(the 1080px.app-mainis the cap) ormax-w-[960px]/max-w-[1080px]. Unavailable stub may stay narrow.B — Pair short fields (
md+)Suggested CSS grid (single panel, no nested chrome):
md+<mdgrid-cols-3or Name+Symbol2fr+ Decimals1frgrid-cols-2grid-cols-2grid-cols-2checkbox+hint cellsgrid-cols-3grid-cols-2grid-cols-2Prefer one
md:gridwrapper (data-testid="create-token-desktop-grid") with identity+tax+wallets in column 1 and Paid features + init + CTA in column 2 only if both columns stay in oneshell-panel-strongand tab order stays Name → … → SKUs → ack → CTA. A single-column-but-wider card with paired rows is also OK if Paid features + CTA enter the first viewport at 1280×720 with 0 SKUs.C — First-viewport bar
At 1280×720, disconnected or connected, 0 SKUs: heading, Name/Symbol/Decimals, Buy/Sell, Treasury/Manager, Paid features legend + at least the SKU list start, and ack/CTA (or a clear “scroll 1 short hop”) must not require scrolling past an empty 520px chimney. With several SKUs checked, init panels may extend — that is expected; do not virtualize / hide them.
D — Out of scope
Acceptance criteria
create-token-pagecontent width is > 700px (not still 520). Empty left/right main gutters shrink; the form uses the.app-mainbudget.md+: Name+Symbol (and Decimals) share a row; Treasury+Manager share a row; Paid features is a 2-col checkbox grid (or equivalent density). Buy/Sell stay paired.documentscroll; treasury/manager bech32 does not overflow; tap targets ≥44px; existing P7/P8/P9 helpers still readconnected wallet/not connected wallet.shell-panel/ SKUcard-glassgrid. No*-neo. No new lecture banner.docs/frontend.md§ Create Token notes desktop density + phone stack.QA_TEMPLATE.mdgains a Create Token desktop/phone row. Skill playbook points at this issue.CreateTokenPage.test.tsx+make verify-issue-593/604/605stay green.Test plan (all paths)
Unit (
CreateTokenPage.test.tsx)Keep existing cases. Add:
matchMedia('(min-width: 768px)')(or the breakpoint the page uses), root orcreate-token-desktop-gridhas the documentedmd:grid/max-wclass (notmax-w-[520px]alone).max-width: 767px— nomd:grid-cols-2applied as the only layout; fields still in DOM order Name → Symbol → Decimals → buy → sell → treasury → manager → SKUs → ack.create-token-unavailablewhen env is off (width may stay narrow).create-token-sku-*; assert the matching*-panel/ mint cap appears and disappears; invoice text 0 → 50 → 150 unchanged.?payee=/?manager=/?treasury=(existing Pay tests already cover spoof payee on the pay card). Helpers still follow the connected wallet, not the query.5; combined tax20+20.Vitest (must stay green)
Plus
make verify-issue-593make verify-issue-604make verify-issue-605(do not reopen those issues unless an invariant actually broke).Playwright (
e2e-smoke, 5 workers)Extend
e2e/create-token-602.spec.ts(or a sibling smoke spec — note2e-tx):setViewportSize({ width: 1280, height: 720 }).create-token-pagegetBoundingClientRect().width> 700.y) within ~48px of each other or both in the first viewport; Treasury and Manager same-row or adjacent columns.y< 720 (first viewport) with 0 SKUs..app-main(page width ≤ 1080 + padding).create-token-pagewidth ≤ viewport − chrome;document.scrollingElement.scrollWidth≤clientWidth+ 1.y< Symboly< Decimalsy(stacked).connectWallet): free CTA still appears after name/symbol/ack; one SKU still swaps tocreate-token-paywith50 UST1.e2e-txhere.Manual
not connected wallet; layout does not overflow.Test plan (attack, hack, and abuse)
Layout sits on the instantiate + invoice path. Treat SKU checkboxes, addresses, and Pay as trust-boundary controls.
data-testid={create-token-sku-${id}}onChangemaps to thatsku.idonly. Playwright/unit: click mid-list SKU; assert only that id is in the invoice count / panel.?payee=/?manager=/?treasury=still ignored after reflow. Paid path payee remains env launcher. Unit already inPayWithAnyToken.test.tsx— keep green.overflow: hiddenmust not clip the ack checkbox or show a enabled CTA withoutcreate-token-ack. CTA staysdisableduntilformOk && ack.create-token-sku-totalstaysskus.length × 50.dangerouslySetInnerHTMLon user or LCD strings. Exempt textarea stays a text control.z-index). New gridz-indexstays below Connect / Legal / WalletConnect (z-[9999]).mdbreakpoint must not remount a fresh enabled free-CTA or Pay card mid-broadcast (freeCreate.isPending/ pay pending still disables).combined; max_* three-up grid still enforces 25.00% combined.overflow: hiddenthat clips validation (create-token-error-*, decimals error).tabindextricks that skip ack). Keyboard#488:focus-visibleon inputs/checkboxes/CTA.Verification criteria
Done when:
CreateTokenPage.test.tsxcovers grid contract + existing P2/P4/P7–P9/SKU math.scrollWidthoverflow; existing #602 smoke green. Noe2e-txrequired.make verify-issue-593make verify-issue-604make verify-issue-605green.python3 scripts/check_chrome_nesting.pyclean if markup gainedcard-glass.docs/frontend.md+QA_TEMPLATE.md+ create-token skill updated. No new on-chain / indexer surface.marked as related to #593
marked as related to #604
marked as related to #605
marked as related to #653
mentioned in issue #670
mentioned in commit
e4f808bd90mentioned in merge request !1159
mentioned in commit
3c07848a04Merged to
mainvia !1159.Leftover: Create Token desktop uses
app-mainwidth after frontend rebuild.make verify-issue-669.mentioned in issue #673