Fix #417 desktop tape first-visit collapse regression #948
No reviewers
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!948
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/417-desktop-tape-first-visit-collapse"
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
Verification of GitLab #417 found the desktop recent-trades tape auto-expanded on first
/tradevisit:react-resizable-panelsfiredonExpandduring initial layout and wrotecl8y-dex-trade-tape-expanded=1before user interaction.This MR re-collapses the tape after mount when no stored preference exists, and only persists expansion via explicit expand/collapse button handlers.
Verification checklist
TradeOnboardingStrip.test.tsx, Playwright manual script, screenshot/tmp/issue-417-screenshots/onboarding-strip-trade.pngTRADE_MONEY_CTA_CLASS)py-3 text-sm; screenshottrade-ticket-ctas.pngtrade-market-slippage-preset-0.5/tradevisitTradePage.test.tsx+ Playwright toggleExpand,localStoragenull/tradefirst-visit layout/tmp/issue-417-screenshots/trade-first-visit-layout.png/tmp/issue-417-screenshots/trade-ticket-ctas.png,swap-cta-reference.pngonboarding-strip-trade.pngmake test-frontendmake lint-frontend/ axe smokePLAYWRIGHT_SKIP_CHAIN=1 npx playwright test e2e/a11y-critical-routes.spec.ts8/8nav.app-mobile-nav-shelloverlap check +mobile-trade-onboarding.pngTest plan
make test-frontendsrc/pages/TradePage.test.tsx(desktop tape localStorage assertion)make dev+ LocalTerra deploySecurity review — MR !948
Commit reviewed:
59cc70e0793ed6add85e14dcc5ce70031133c8eeScope:
TradePage.tsxdesktop tape first-visit collapse fix (useEffect+ rAF re-collapse), removal oflocalStoragewrites fromPanelonExpand/onCollapse, optional chaining on imperative panel API, test assertion, andAGENTS_FRONTEND_TRADE_ONBOARDING_IA.mddoc note.Method: Diff review with trace of attacker-controlled input to sinks. Prior MR security threads: none.
Outcome:
FINDINGS: 0medium+No inline threads — nothing to flag on the diff.
Summary
This change is a client-side UI regression fix for progressive disclosure on
/trade. It does not introduce new network endpoints, auth paths, on-chain interactions, or rendering of untrusted data.readTradePanelExpanded/writeTradePanelExpanded— unchanged helpers; reads only accept'1'as expanded, writes only'1'/'0'. Keys are compile-time constants; no injection or deserialization surface.useEffect+requestAnimationFramere-collapse — runs once on mount when no stored preference exists; only toggles local React state and callstapePanelRef.current?.collapse?.(). No external input, secrets, or privileged operations.writeTradePanelExpandedfromPanelonExpand/onCollapse— limits persistence to explicit button handlers; reduces spurious writes from library layout events. No authz or trust-boundary impact.Label:
block:securitynot applied (no medium+ findings).mentioned in commit
a399b53f56