From f67100929bddc1d255c137c425e9a2de2e81da6a Mon Sep 17 00:00:00 2001 From: MS-01-Codex <3647348c-0c07-48e0-8938-fb9280321c5f@agents.multica.local> Date: Thu, 20 Aug 2026 03:35:40 +0800 Subject: [PATCH] fix: fit 13 limit-pool columns at 1600 and restyle leftover tokens Keep the limit-up table inside the card without horizontal scroll, raise header/row metrics to the B-147 spec, restore night sort accent, and switch the day-mode repair badge to the shared blue token. Co-authored-by: Cursor Co-authored-by: multica-agent --- app/frontend/pages/pools/foundation.css | 49 ++++++++++++++++++--- app/frontend/pages/sentiment/foundation.css | 4 +- app/frontend/shared/components/tables.css | 13 ++++++ app/tests/e2e/app-shell.spec.js | 30 +++++++++++++ 4 files changed, 87 insertions(+), 9 deletions(-) diff --git a/app/frontend/pages/pools/foundation.css b/app/frontend/pages/pools/foundation.css index 4067113..543c246 100644 --- a/app/frontend/pages/pools/foundation.css +++ b/app/frontend/pages/pools/foundation.css @@ -716,7 +716,6 @@ #brokenView .data-table thead th, #downView .data-table thead th, -#limitPool .data-table thead th, #performanceView .data-table thead th, #yesterdayView .data-table thead th { height: 32px; @@ -726,9 +725,16 @@ font-size: 11.5px; } +#limitPool .data-table thead th { + height: 36px; + + padding: 0 8px; + + font-size: var(--font-size-caption); +} + #brokenView .data-table tbody td, #downView .data-table tbody td, -#limitPool .data-table tbody td, #performanceView .data-table tbody td, #yesterdayView .data-table tbody td { height: 39px; @@ -736,6 +742,12 @@ padding: 5px 9px; } +#limitPool .data-table tbody td { + height: 40px; + + padding: 0 8px; +} + #limitPool .main-grid { grid-template-columns: minmax(0px, 1fr) 308px; } @@ -2211,6 +2223,18 @@ min-width: 0; width: 100%; + + table-layout: fixed; +} + +#limitPool #limitTable thead th { + width: auto; + + min-width: 0; +} + +#limitPool #limitTable thead th.row-number { + width: 36px; } #limitPool.redesigned-pool-view .pool-table-card.tbl-wrap { @@ -2220,24 +2244,35 @@ } #limitPool #limitTable.tbl thead th, +#limitPool .pool-table-card .data-table thead th { + height: 36px; + + padding: 0 8px; + + font-size: var(--font-size-caption); +} + #limitPool #limitTable.tbl tbody td, -#limitPool .pool-table-card .data-table thead th, #limitPool .pool-table-card .data-table tbody td { + height: 40px; + padding: 0 8px; } #limitPool #limitTable .reason-column { - min-width: 4.5em; + min-width: 0; - overflow: visible; + overflow: hidden; white-space: nowrap; } #limitPool #limitTable .pool-reason-cell { - overflow: visible; + overflow: hidden; - text-overflow: unset; + text-overflow: ellipsis; + + white-space: nowrap; } #brokenTable, diff --git a/app/frontend/pages/sentiment/foundation.css b/app/frontend/pages/sentiment/foundation.css index a3e4b45..6accf89 100644 --- a/app/frontend/pages/sentiment/foundation.css +++ b/app/frontend/pages/sentiment/foundation.css @@ -367,9 +367,9 @@ } .sentiment-phase-badge.phase-repair { - background: rgb(231, 246, 246); + background: var(--accent-soft); - color: rgb(11, 109, 116); + color: var(--accent); } .sentiment-phase-badge.phase-fermentation { diff --git a/app/frontend/shared/components/tables.css b/app/frontend/shared/components/tables.css index c565638..16e298d 100644 --- a/app/frontend/shared/components/tables.css +++ b/app/frontend/shared/components/tables.css @@ -437,6 +437,19 @@ color: var(--text-secondary); } +:root[data-theme="dark"] :is( + .tbl thead th.sorted, + .data-table thead th.sorted, + .data-table thead th.sort-asc, + .data-table thead th.sort-desc +) { + color: var(--accent); +} + +:root[data-theme="dark"] :is(.tbl thead th.sorted .arr, .data-table thead th.sorted .arr) { + color: var(--accent); +} + :root[data-theme="dark"] :is(table tbody td, .data-table tbody td, .tbl tbody td) { border-color: var(--line-soft); diff --git a/app/tests/e2e/app-shell.spec.js b/app/tests/e2e/app-shell.spec.js index 70e0582..5355762 100644 --- a/app/tests/e2e/app-shell.spec.js +++ b/app/tests/e2e/app-shell.spec.js @@ -3177,8 +3177,25 @@ test("global dialogs share the stage 18 geometry without changing account or adm }); test("merged header keeps date, detail fields and 13 pool columns after dual-review rework", async ({ page }) => { + const previousLimits = dashboard.limits; + dashboard.limits = [{ + code: "002141", + name: "贤丰控股", + streak: 5, + change: 10.02, + price: 12.48, + sector: "电子元件", + first_time: "09:31", + last_time: "10:18", + open_times: 1, + turnover_rate: 18.42, + amount_billion: 12.6, + seal_amount_million: 8200, + reason: "板块龙头连板打开空间", + }]; await mockApplication(page, session("admin", true)); await page.goto("/index.html"); + dashboard.limits = previousLimits; await page.waitForTimeout(400); await expect(page.locator("#currentPageSubtitle")).toContainText("市场复盘 ·"); await expect(page.locator("#headerMenuButton")).toBeVisible(); @@ -3210,18 +3227,31 @@ test("merged header keeps date, detail fields and 13 pool columns after dual-rev const tableFit = await page.evaluate(() => { const card = document.querySelector("#limitPool .pool-table-card"); const reason = document.querySelector("#limitTable .reason-column"); + const reasonCell = document.querySelector("#limitTable .pool-reason-cell"); + const headerCell = document.querySelector("#limitPool .data-table thead th"); + const rowCell = document.querySelector("#limitPool .data-table tbody td"); const header = document.querySelector(".app-header"); + const headerStyle = headerCell ? getComputedStyle(headerCell) : null; + const rowStyle = rowCell ? getComputedStyle(rowCell) : null; return { cardOverflow: card.scrollWidth - card.clientWidth, reasonVisible: reason.getBoundingClientRect().right <= card.getBoundingClientRect().right + 1, reasonText: reason.textContent.trim(), + reasonTitle: reasonCell?.getAttribute("title") || "", headerOverflow: header.scrollWidth - header.clientWidth, + headerHeight: headerStyle ? Number.parseFloat(headerStyle.height) : 0, + headerFont: headerStyle ? Number.parseFloat(headerStyle.fontSize) : 0, + rowHeight: rowStyle ? Number.parseFloat(rowStyle.height) : 0, }; }); expect(tableFit.reasonText).toContain("涨停原因"); expect(tableFit.reasonVisible).toBe(true); expect(tableFit.cardOverflow).toBeLessThanOrEqual(1); expect(tableFit.headerOverflow).toBeLessThanOrEqual(1); + expect(tableFit.reasonTitle).toContain("板块龙头连板打开空间"); + expect(tableFit.headerHeight).toBe(36); + expect(tableFit.headerFont).toBe(12.5); + expect(tableFit.rowHeight).toBeGreaterThanOrEqual(40); await page.locator('[data-view="heavenView"]').first().click(); await expect(page.locator(".app-header .overview-strip")).toBeHidden();