The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
fix: log viewer auto-follow uses distance-from-bottom instead of element visibility
Forgotten53060e770c9a
diff --git a/ui/src/pages/AgentDetail.tsx b/ui/src/pages/AgentDetail.tsxindex 711d3157f1..7b01f06529 100644--- a/ui/src/pages/AgentDetail.tsx+++ b/ui/src/pages/AgentDetail.tsx@@ -1251,11 +1251,14 @@ function LogViewer({ run, adapterType }: { run: HeartbeatRun; adapterType: strin}, [initialEvents]);const updateFollowingState = useCallback(() => {- const el = logEndRef.current;- if (!el) return;- const rect = el.getBoundingClientRect();- const inView = rect.top <= window.innerHeight && rect.bottom >= 0;- setIsFollowing((prev) => (prev === inView ? prev : inView));+ const viewportBottom = window.scrollY + window.innerHeight;+ const pageHeight = Math.max(+ document.documentElement.scrollHeight,+ document.body.scrollHeight,+ );+ const distanceFromBottom = pageHeight - viewportBottom;+ const isNearBottom = distanceFromBottom <= 32;+ setIsFollowing((prev) => (prev === isNearBottom ? prev : isNearBottom));}, []);useEffect(() => {