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 <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
MS-01-Codex
2026-08-20 03:35:40 +08:00
co-authored by Cursor multica-agent
parent df45638edd
commit f67100929b
4 changed files with 87 additions and 9 deletions
+42 -7
View File
@@ -716,7 +716,6 @@
#brokenView .data-table thead th, #brokenView .data-table thead th,
#downView .data-table thead th, #downView .data-table thead th,
#limitPool .data-table thead th,
#performanceView .data-table thead th, #performanceView .data-table thead th,
#yesterdayView .data-table thead th { #yesterdayView .data-table thead th {
height: 32px; height: 32px;
@@ -726,9 +725,16 @@
font-size: 11.5px; 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, #brokenView .data-table tbody td,
#downView .data-table tbody td, #downView .data-table tbody td,
#limitPool .data-table tbody td,
#performanceView .data-table tbody td, #performanceView .data-table tbody td,
#yesterdayView .data-table tbody td { #yesterdayView .data-table tbody td {
height: 39px; height: 39px;
@@ -736,6 +742,12 @@
padding: 5px 9px; padding: 5px 9px;
} }
#limitPool .data-table tbody td {
height: 40px;
padding: 0 8px;
}
#limitPool .main-grid { #limitPool .main-grid {
grid-template-columns: minmax(0px, 1fr) 308px; grid-template-columns: minmax(0px, 1fr) 308px;
} }
@@ -2211,6 +2223,18 @@
min-width: 0; min-width: 0;
width: 100%; 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 { #limitPool.redesigned-pool-view .pool-table-card.tbl-wrap {
@@ -2220,24 +2244,35 @@
} }
#limitPool #limitTable.tbl thead th, #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 #limitTable.tbl tbody td,
#limitPool .pool-table-card .data-table thead th,
#limitPool .pool-table-card .data-table tbody td { #limitPool .pool-table-card .data-table tbody td {
height: 40px;
padding: 0 8px; padding: 0 8px;
} }
#limitPool #limitTable .reason-column { #limitPool #limitTable .reason-column {
min-width: 4.5em; min-width: 0;
overflow: visible; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
#limitPool #limitTable .pool-reason-cell { #limitPool #limitTable .pool-reason-cell {
overflow: visible; overflow: hidden;
text-overflow: unset; text-overflow: ellipsis;
white-space: nowrap;
} }
#brokenTable, #brokenTable,
+2 -2
View File
@@ -367,9 +367,9 @@
} }
.sentiment-phase-badge.phase-repair { .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 { .sentiment-phase-badge.phase-fermentation {
+13
View File
@@ -437,6 +437,19 @@
color: var(--text-secondary); 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) { :root[data-theme="dark"] :is(table tbody td, .data-table tbody td, .tbl tbody td) {
border-color: var(--line-soft); border-color: var(--line-soft);
+30
View File
@@ -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 }) => { 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 mockApplication(page, session("admin", true));
await page.goto("/index.html"); await page.goto("/index.html");
dashboard.limits = previousLimits;
await page.waitForTimeout(400); await page.waitForTimeout(400);
await expect(page.locator("#currentPageSubtitle")).toContainText("市场复盘 ·"); await expect(page.locator("#currentPageSubtitle")).toContainText("市场复盘 ·");
await expect(page.locator("#headerMenuButton")).toBeVisible(); 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 tableFit = await page.evaluate(() => {
const card = document.querySelector("#limitPool .pool-table-card"); const card = document.querySelector("#limitPool .pool-table-card");
const reason = document.querySelector("#limitTable .reason-column"); 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 header = document.querySelector(".app-header");
const headerStyle = headerCell ? getComputedStyle(headerCell) : null;
const rowStyle = rowCell ? getComputedStyle(rowCell) : null;
return { return {
cardOverflow: card.scrollWidth - card.clientWidth, cardOverflow: card.scrollWidth - card.clientWidth,
reasonVisible: reason.getBoundingClientRect().right <= card.getBoundingClientRect().right + 1, reasonVisible: reason.getBoundingClientRect().right <= card.getBoundingClientRect().right + 1,
reasonText: reason.textContent.trim(), reasonText: reason.textContent.trim(),
reasonTitle: reasonCell?.getAttribute("title") || "",
headerOverflow: header.scrollWidth - header.clientWidth, 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.reasonText).toContain("涨停原因");
expect(tableFit.reasonVisible).toBe(true); expect(tableFit.reasonVisible).toBe(true);
expect(tableFit.cardOverflow).toBeLessThanOrEqual(1); expect(tableFit.cardOverflow).toBeLessThanOrEqual(1);
expect(tableFit.headerOverflow).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 page.locator('[data-view="heavenView"]').first().click();
await expect(page.locator(".app-header .overview-strip")).toBeHidden(); await expect(page.locator(".app-header .overview-strip")).toBeHidden();