(
+ '.maka-task-ledger-row[aria-level="8"] > .maka-task-ledger-row-content',
+ );
+ if (!panel || !deepestRowContent) throw new Error('deep task row not rendered yet');
+
+ const panelRect = panel.getBoundingClientRect();
+ const rowRect = deepestRowContent.getBoundingClientRect();
+ expect(panel.scrollWidth).toBeLessThanOrEqual(panel.clientWidth);
+ expect(rowRect.left).toBeGreaterThanOrEqual(panelRect.left);
+ expect(rowRect.right).toBeLessThanOrEqual(panelRect.right);
+ });
+ },
+};
+
// Storybook cannot host the native WebContentsView, so these pin what the panel
// itself draws — chrome and empty state — inside the real workbar shell.
export const BrowserEmpty: Story = {
diff --git a/packages/ui/src/task-ledger-panel.tsx b/packages/ui/src/task-ledger-panel.tsx
index 068bcdb091..60154f8dd4 100644
--- a/packages/ui/src/task-ledger-panel.tsx
+++ b/packages/ui/src/task-ledger-panel.tsx
@@ -188,14 +188,16 @@ function TaskLedgerRow({ task, copy, level, position, setSize, children }: {
data-status={task.status}
style={{ '--task-depth': Math.min(depth, 6) } as CSSProperties}
>
-
- {task.key}
- {task.subject}
-
- {copy.status[task.status]}
- {owner && {owner}}
-
- {detail && {detail}}
+
+
+ {task.key}
+ {task.subject}
+
+ {copy.status[task.status]}
+ {owner && {owner}}
+
+ {detail && {detail}}
+
{children}
);