Make weather-market UI reliable before shipping

Proxy routes now share one upstream-error adapter so client-actionable statuses such as auth, entitlement, validation, and rate limits survive the BFF instead of becoming opaque 502s. The scan terminal mobile overrides also load last and remove desktop rail constraints so phones get a single readable column.

Constraint: Mobile users reported the dashboard was unreadable, and BFF proxy errors were masking expected client states.

Rejected: Let every route keep bespoke error JSON | continued inconsistent status codes and production detail leakage.

Confidence: high

Scope-risk: moderate

Directive: Keep ScanTerminalMobile.module.css imported after desktop scan-terminal CSS so mobile breakpoints win.

Tested: npx tsc --noEmit --pretty false --project frontend/tsconfig.json

Tested: npm run build

Tested: npm run test:business

Tested: Chrome mobile smoke test at 390px with no horizontal overflow

Not-tested: Real device Safari/Android manual QA
This commit is contained in:
2569718930@qq.com
2026-04-29 11:22:49 +08:00
parent 4630cee06f
commit 569f3eef97
36 changed files with 471 additions and 282 deletions
@@ -144,6 +144,8 @@
@media (max-width: 1100px) {
.root :global(.scan-terminal) {
grid-template-columns: 1fr;
min-height: 100dvh;
overflow-x: hidden;
}
.root :global(.scan-filter-panel),
@@ -153,6 +155,27 @@
min-height: auto;
}
.root :global(.scan-data-grid) {
max-height: none;
overflow: visible;
}
.root :global(.scan-list-section),
.root :global(.scan-table-shell),
.root :global(.scan-ai-workspace) {
overflow: visible;
}
.root :global(.scan-ai-workspace) {
max-height: none;
}
.root :global(.scan-terminal > .detail-panel.scan-city-detail-rail) {
width: 100%;
min-width: 0;
max-width: 100%;
}
.root :global(.scan-kpi-bar) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@@ -267,6 +290,26 @@
padding: 10px;
}
.root :global(.scan-data-grid) {
padding: 12px;
gap: 14px;
border-radius: 18px;
}
.root :global(.scan-topbar-actions) {
width: 100%;
justify-content: flex-start;
gap: 8px;
}
.root :global(.scan-topbar-title strong) {
font-size: 23px;
}
.root :global(.scan-topbar-title span) {
font-size: 13px;
}
.root :global(.scan-kpi-bar) {
grid-template-columns: 1fr;
}
@@ -389,6 +432,40 @@
align-items: flex-start;
}
.root :global(.scan-list-tabs) {
width: 100%;
gap: 8px;
overflow-x: auto;
padding-bottom: 4px;
scrollbar-width: none;
}
.root :global(.scan-list-tabs::-webkit-scrollbar) {
display: none;
}
.root :global(.scan-list-tabs button) {
flex: 0 0 auto;
min-height: 36px;
border: 1px solid rgba(99, 132, 180, 0.18);
border-radius: 999px;
background: rgba(8, 19, 34, 0.76);
padding: 0 12px;
font-size: 13px;
white-space: nowrap;
}
.root :global(.scan-list-tabs button.active) {
border-color: rgba(77, 163, 255, 0.38);
background: rgba(77, 163, 255, 0.16);
}
.root :global(.scan-list-status) {
width: 100%;
flex-wrap: wrap;
gap: 8px;
}
.root :global(.scan-opportunity-groups) {
padding: 12px;
}
@@ -411,3 +488,50 @@
padding: 0 13px 13px;
}
}
@media (max-width: 520px) {
.root :global(.scan-terminal) {
padding: 6px;
}
.root :global(.scan-data-grid) {
padding: 10px;
border-radius: 16px;
}
.root :global(.scan-upgrade-announcement) {
margin: -2px 0 2px;
padding: 12px;
border-radius: 16px;
}
.root :global(.scan-upgrade-announcement-copy p) {
display: none;
}
.root :global(.scan-upgrade-announcement ul) {
display: none;
}
.root :global(.scan-status-chip) {
height: 32px;
padding: 0 10px;
font-size: 11px;
}
.root :global(.scan-primary-button) {
min-height: 38px;
padding: 9px 12px;
font-size: 13px;
}
.root :global(.scan-account-button) {
width: 38px;
height: 38px;
}
.root :global(.scan-theme-button) {
width: 38px;
height: 38px;
}
}