From e95b2a8d32045bba8ed57e743597d87e78d5ebd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 28 May 2026 19:59:20 -0400 Subject: [PATCH] Tighten Work board columns and Home approval labels The Work board used auto-fit columns that reflowed and clustered at the left; pin it to four equal columns (minmax(0,1fr) so they shrink rather than overflow). On Home, render approval kind and risk as humanized labels instead of raw enum strings. --- AgentCompany-New/src/renderer/src/pages/HomePage.tsx | 8 +++++++- AgentCompany-New/src/renderer/src/pages/WorkPage.tsx | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AgentCompany-New/src/renderer/src/pages/HomePage.tsx b/AgentCompany-New/src/renderer/src/pages/HomePage.tsx index d25c0b08..c056e996 100644 --- a/AgentCompany-New/src/renderer/src/pages/HomePage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/HomePage.tsx @@ -148,7 +148,7 @@ function WaitingCard({
{approval.title}
- {approval.kind} · {approval.risk} risk · from {from} + {humanizeLabel(approval.kind)} · {humanizeLabel(approval.risk)} risk · from {from}
@@ -337,6 +337,12 @@ function renderSummary(pending: number, agents: number): string { return `${things} · ${onDeck}`; } +function humanizeLabel(value: string): string { + if (!value) return value; + const spaced = value.replace(/_/g, " "); + return spaced.charAt(0).toUpperCase() + spaced.slice(1); +} + function resolveRequester(approval: ApprovalRecord, employees: EmployeeRecord[], agents: AgentRecord[]): string { if (approval.requestedByType === "employee" && approval.requestedById) { const employee = employees.find((item) => item.id === approval.requestedById); diff --git a/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx b/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx index 7faeba27..62329b69 100644 --- a/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/WorkPage.tsx @@ -111,7 +111,7 @@ function BoardView({ onCreate: () => void; }) { return ( -
+
{COLUMNS.map((column) => { const columnTasks = tasks.filter((task) => task.status === column.id); return (