fix(ui): scroll-shadow bottom fade + hide tasks row when nothing active

- ScrollShadow: 1px subpixel tolerance so bottom fade clears at scroll end
  on Retina (fractional scrollTop was keeping data-bottom-scroll stuck)
- StatusRow: hide tasks indicator when no in-progress/pending todos remain
This commit is contained in:
Bohdan Triapitsyn
2026-04-22 17:50:59 +03:00
parent ee9c37bea8
commit ff1e043bbe
2 changed files with 11 additions and 4 deletions
@@ -200,7 +200,7 @@ export const StatusRow: React.FC<StatusRowProps> = ({
return { active, left };
}, [visibleTodos]);
const hasTodoContent = showTodos && visibleTodos.length > 0;
const hasTodoContent = showTodos && statusSummary.left > 0;
const hasAssistantContent = showAssistantStatus && (
isWorking ||
Boolean(wasAborted) ||
+10 -3
View File
@@ -89,11 +89,18 @@ export const ScrollShadow = React.forwardRef<HTMLElement, ScrollShadowProps>(
return;
}
const hasBefore = orientation === "vertical" ? el.scrollTop > offset : el.scrollLeft > offset;
// Subpixel tolerance: on hi-DPI (Retina) and with fractional scrollTop,
// scrollTop+clientHeight can fall ~0.5px short of scrollHeight at the very end,
// which would otherwise keep the bottom fade visible after fully scrolling.
const SUBPIXEL_TOLERANCE = 1;
const hasBefore =
orientation === "vertical"
? el.scrollTop > offset + SUBPIXEL_TOLERANCE
: el.scrollLeft > offset + SUBPIXEL_TOLERANCE;
let hasAfter =
orientation === "vertical"
? el.scrollTop + el.clientHeight + offset < el.scrollHeight
: el.scrollLeft + el.clientWidth + offset < el.scrollWidth;
? el.scrollHeight - (el.scrollTop + el.clientHeight) > offset + SUBPIXEL_TOLERANCE
: el.scrollWidth - (el.scrollLeft + el.clientWidth) > offset + SUBPIXEL_TOLERANCE;
const effectiveHasBefore = hideTopShadow && orientation === "vertical" ? false : hasBefore;