polish: composite breadcrumb keys; pause run-log polling when tab hidden (P3-58, P3-59)
This commit is contained in:
1 parent
96ab72472c
commit
a7ad4e5a8b
2 files changed
+5
-3
No files matched your search
@@ -149,7 +149,8 @@ export function RunCenter({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!selectedRun || !isActiveStatus(selectedRun.status)) return;
|
if (!selectedRun || !isActiveStatus(selectedRun.status)) return;
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
const intervalId = window.setInterval(async () => {
|
const tick = async () => {
|
||||||
|
if (document.visibilityState === "hidden") return;
|
||||||
const latest = await window.agentCompany.getRunLogChunk({
|
const latest = await window.agentCompany.getRunLogChunk({
|
||||||
companyId: selectedRun.companyId,
|
companyId: selectedRun.companyId,
|
||||||
runId: selectedRun.id,
|
runId: selectedRun.id,
|
||||||
@@ -166,7 +167,8 @@ export function RunCenter({
|
|||||||
loading: false,
|
loading: false,
|
||||||
error: null,
|
error: null,
|
||||||
});
|
});
|
||||||
}, 2500);
|
};
|
||||||
|
const intervalId = window.setInterval(tick, 2500);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ export function SkillDetail({
|
|||||||
{/* File path bar */}
|
{/* File path bar */}
|
||||||
<div className="mb-3 flex items-center gap-1 text-[12px] text-muted-foreground">
|
<div className="mb-3 flex items-center gap-1 text-[12px] text-muted-foreground">
|
||||||
{selectedSkillFilePath.split("/").map((segment, i, arr) => (
|
{selectedSkillFilePath.split("/").map((segment, i, arr) => (
|
||||||
<span key={i} className="flex items-center gap-1">
|
<span key={`${segment}-${i}`} className="flex items-center gap-1">
|
||||||
{i > 0 ? <span className="opacity-40">/</span> : null}
|
{i > 0 ? <span className="opacity-40">/</span> : null}
|
||||||
<span className={i === arr.length - 1 ? "font-medium text-foreground" : ""}>
|
<span className={i === arr.length - 1 ? "font-medium text-foreground" : ""}>
|
||||||
{segment}
|
{segment}
|
||||||
|
|||||||
Reference in new issue
Block a user