The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(kanban): tidy the task modal's sidebar property list
Calvin Ng50d8d22370e9
diff --git a/apps/desktop/src/plugins/kanban/board.tsx b/apps/desktop/src/plugins/kanban/board.tsxindex e1df48744ff..79f0509507a 100644--- a/apps/desktop/src/plugins/kanban/board.tsx+++ b/apps/desktop/src/plugins/kanban/board.tsx@@ -98,6 +98,7 @@ import {FIELD_LABEL,isLockedTarget,lockedReason,+ PriorityGlyph,RunClock,shortId,useDefaultAssignee,@@ -213,12 +214,7 @@ function CardFooter({ arc, task }: { arc: ArcState | null; task: KanbanTask }) {</Tip>)}<div className="ml-auto flex min-w-0 shrink items-center gap-2">- {typeof task.priority === 'number' && task.priority > 0 && (- <span className="inline-flex items-center gap-0.5 text-amber-500">- <Codicon name="arrow-up" size="0.7rem" />- {task.priority}- </span>- )}+ {typeof task.priority === 'number' && task.priority > 0 && <PriorityGlyph priority={task.priority} />}{task.progress && task.progress.total > 0 && (<Meta icon="checklist">{task.progress.done}/{task.progress.total}diff --git a/apps/desktop/src/plugins/kanban/drawer.test.tsx b/apps/desktop/src/plugins/kanban/drawer.test.tsxindex 739281bb881..27f8c2687be 100644--- a/apps/desktop/src/plugins/kanban/drawer.test.tsx+++ b/apps/desktop/src/plugins/kanban/drawer.test.tsx@@ -143,6 +143,19 @@ describe('task modal dialog', () => {fireEvent.keyDown(dialog, { key: 'Escape' })expect(onClose).toHaveBeenCalledOnce()})++ it('shows the workspace path as its own value, not prefixed with the raw kind', async () => {+ const path = '/Users/example/.hermes/kanban/workspaces/a_very_long_directory_name_that_must_wrap'+ detail = {+ ...legacyDetail,+ attachments: [],+ task: { ...legacyDetail.task, workspace_kind: 'dir', workspace_path: path }+ }+ openDrawer()++ expect(await screen.findByText(path)).toBeTruthy()+ expect(screen.queryByText(/dir:/)).toBeNull()+ })})describe('dependency chips resolve titles', () => {diff --git a/apps/desktop/src/plugins/kanban/drawer.tsx b/apps/desktop/src/plugins/kanban/drawer.tsxindex c18ae21a631..d47c4ab4c8d 100644--- a/apps/desktop/src/plugins/kanban/drawer.tsx+++ b/apps/desktop/src/plugins/kanban/drawer.tsx@@ -11,6 +11,7 @@ import {cn,Codicon,compactNumber,+ CopyButton,Dialog,DialogContent,DialogTitle,@@ -74,6 +75,7 @@ import {isLockedTarget,type KanbanText,lockedReason,+ PriorityGlyph,ScrollFade,Section,shortId,@@ -178,13 +180,37 @@ function eventText(event: KanbanEvent, k: KanbanText): { detail?: string; label:}}-// Sidebar property row: muted label above the value (Linear's property list).-// The value slot holds the same inline editors the old meta grid had.+// Sidebar property row: a Section (so every sidebar label — these, Estimate,+// Attachments — shares FIELD_LABEL and one rhythm) whose value slot holds the+// inline editors. Values wrap anywhere so a long path never clips at the edge.function MetaRow({ children, label }: { children: ReactNode; label: string }) {return (- <div className="flex flex-col gap-0.5">- <span className="text-[0.65rem] tracking-wide text-(--ui-text-quaternary) uppercase">{label}</span>- <div className="min-w-0 text-[0.75rem] text-(--ui-text-secondary)">{children}</div>+ <Section label={label}>+ <div className="min-w-0 text-[0.75rem] text-(--ui-text-secondary) [overflow-wrap:anywhere]">{children}</div>+ </Section>+ )+}++// The task's workspace: the kind as a badge when it says more than "a+// directory", the path in mono (wrapping), and a copy affordance.+function WorkspaceValue({ kind, path }: { kind: null | string | undefined; path: string }) {+ return (+ <div className="flex items-start gap-1.5">+ <div className="flex min-w-0 flex-1 flex-col items-start gap-1">+ {kind && kind !== 'dir' && (+ <Badge size="xs" variant="muted">+ {kind}+ </Badge>+ )}+ <span className="font-mono text-[0.6875rem] leading-snug text-(--ui-text-tertiary)">{path}</span>+ </div>+ <CopyButton+ appearance="icon"+ buttonSize="icon-xs"+ buttonVariant="ghost"+ className="-mt-0.5 shrink-0"+ text={path}+ /></div>)}@@ -563,17 +589,23 @@ function LinkChips({}) {return (<div className="flex flex-wrap gap-1">- {ids.map(linked => (- <button- aria-label={linkTitles.get(linked) || shortId(linked)}- className="max-w-full truncate rounded bg-(--ui-bg-quaternary) px-1.5 py-0.5 text-[0.6875rem] text-(--ui-text-secondary) transition-colors hover:bg-(--chrome-action-hover) hover:text-foreground"- key={linked}- onClick={() => onOpen(linked)}- type="button"- >- {linkTitles.get(linked) || shortId(linked)}- </button>- ))}+ {ids.map(linked => {+ const label = linkTitles.get(linked) || shortId(linked)++ // Chips truncate in the narrow sidebar; the tip reveals the full title.+ return (+ <Tip key={linked} label={label} placement="row">+ <button+ aria-label={label}+ className="max-w-full truncate rounded bg-(--ui-bg-quaternary) px-1.5 py-0.5 text-[0.6875rem] text-(--ui-text-secondary) transition-colors hover:bg-(--chrome-action-hover) hover:text-foreground"+ onClick={() => onOpen(linked)}+ type="button"+ >+ {label}+ </button>+ </Tip>+ )+ })}</div>)}@@ -973,19 +1005,22 @@ export function TaskDrawer({/></div></div>- <aside className="flex w-64 shrink-0 flex-col gap-3 overflow-y-auto border-l border-(--ui-stroke-tertiary) px-4 py-4">+ <aside className="flex w-64 shrink-0 flex-col gap-4 overflow-y-auto border-l border-(--ui-stroke-tertiary) px-4 pb-5"><MetaRow label={k.assignee}><AssigneeMenucurrent={task.assignee}onReassign={profile => void mutate(() => reassignTask(task.id, profile))()}/></MetaRow>- {typeof task.priority === 'number' && <MetaRow label={k.metaPriority}>{task.priority}</MetaRow>}+ {typeof task.priority === 'number' && (+ <MetaRow label={k.metaPriority}>+ <PriorityGlyph priority={task.priority} />+ </MetaRow>+ )}{task.tenant && <MetaRow label={k.metaTenant}>{task.tenant}</MetaRow>}{task.workspace_path && (<MetaRow label={k.workspace}>- {task.workspace_kind ? `${task.workspace_kind}: ` : ''}- {task.workspace_path}+ <WorkspaceValue kind={task.workspace_kind} path={task.workspace_path} /></MetaRow>)}<MetaRow label={k.model}>diff --git a/apps/desktop/src/plugins/kanban/ui.tsx b/apps/desktop/src/plugins/kanban/ui.tsxindex 37642e2e25e..91622f9ebc5 100644--- a/apps/desktop/src/plugins/kanban/ui.tsx+++ b/apps/desktop/src/plugins/kanban/ui.tsx@@ -229,6 +229,21 @@ export function StatusMenu({)}+/** Priority as the board card shows it: an amber up-arrow + number when+ * raised, a muted bare number at 0. Shared by the card and the task modal. */+export function PriorityGlyph({ priority }: { priority: number }) {+ if (priority <= 0) {+ return <span className="text-(--ui-text-quaternary)">{priority}</span>+ }++ return (+ <span className="inline-flex items-center gap-0.5 text-amber-500">+ <Codicon name="arrow-up" size="0.7rem" />+ {priority}+ </span>+ )+}+// The board's one field/section-label style — hoisted so Section (here), the// create dialog's Field, and the orchestration panel all read identically.export const FIELD_LABEL = 'text-[0.62rem] font-semibold uppercase tracking-[0.14em] text-(--ui-text-quaternary)'