From 896126ef887ec462136e34d4757fde7ce52a757b Mon Sep 17 00:00:00 2001 From: oliver Date: Thu, 23 Jul 2026 09:26:53 +0800 Subject: [PATCH] Move Chat background-jobs entry to the sidebar footer. Keeps the running-count badge visible without competing with the new-chat action above the session list. Co-authored-by: Cursor --- interfaces/admin/static/chat.html | 32 +++++++++++-------- interfaces/admin/static/chat.js | 3 +- .../public/background-jobs/SKILL.md | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/interfaces/admin/static/chat.html b/interfaces/admin/static/chat.html index 804cc607..60066ef6 100644 --- a/interfaces/admin/static/chat.html +++ b/interfaces/admin/static/chat.html @@ -521,41 +521,47 @@ flex-direction: column; gap: 8px; } - .chat-nav__jobs { + .chat-nav__footer .chat-nav__jobs { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; - padding: 8px 10px; + box-sizing: border-box; + margin: 0; + padding: 7px 10px; border-radius: 8px; - border: 1px solid var(--ds-border, rgba(255, 255, 255, 0.12)); + border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; - font-size: 13px; + font-size: 12px; + opacity: 0.92; } - .chat-nav__jobs:hover { + .chat-nav__footer .chat-nav__jobs:hover { background: var(--chat-sess-hover-bg, rgba(255, 255, 255, 0.05)); + border-color: var(--ds-border, rgba(255, 255, 255, 0.1)); + opacity: 1; } - .chat-nav__jobs--active { - border-color: rgba(245, 158, 11, 0.55); - background: rgba(245, 158, 11, 0.12); + .chat-nav__footer .chat-nav__jobs--active { + border-color: rgba(245, 158, 11, 0.45); + background: rgba(245, 158, 11, 0.1); + opacity: 1; } .chat-jobs-badge { - min-width: 1.25rem; - height: 1.25rem; - padding: 0 6px; + min-width: 1.15rem; + height: 1.15rem; + padding: 0 5px; border-radius: 999px; color: #fff; font-size: 11px; - line-height: 1.25rem; + line-height: 1.15rem; text-align: center; font-weight: 600; flex: 0 0 auto; } .chat-jobs-badge--idle { - background: rgba(148, 163, 184, 0.45); + background: rgba(148, 163, 184, 0.4); } .chat-jobs-badge--hot { background: rgba(239, 68, 68, 0.9); diff --git a/interfaces/admin/static/chat.js b/interfaces/admin/static/chat.js index 9510e37d..616912df 100644 --- a/interfaces/admin/static/chat.js +++ b/interfaces/admin/static/chat.js @@ -5794,6 +5794,7 @@ ${autoLimit ? `
auto-added claus ); const navFooter = el("div", { class: "chat-nav__footer" }, [ + btnJobs, el("div", { id: "authUser", class: "chat-nav__user" }), ]); @@ -5802,7 +5803,7 @@ ${autoLimit ? `
auto-added claus el("div", { class: "chat-nav__top" }, [ buildChatBrandLogoNode(), ]), - el("div", { class: "chat-nav__toolbar" }, [btnNew, btnJobs]), + el("div", { class: "chat-nav__toolbar" }, [btnNew]), el("div", { class: "chat-nav__scroll" }, [sessionsListEl, loadMoreWrap]), navFooter, ]), diff --git a/skills/_workspace/public/background-jobs/SKILL.md b/skills/_workspace/public/background-jobs/SKILL.md index 192bcc4f..d862453a 100644 --- a/skills/_workspace/public/background-jobs/SKILL.md +++ b/skills/_workspace/public/background-jobs/SKILL.md @@ -62,7 +62,7 @@ description: "长时间任务(数分钟到数小时)用 start_job/get_job; ## Chat 可视化 -Chat 左侧导航 **「后台任务」** 右侧数字徽章持续显示运行中数量(约每 4 秒刷新,无需点开面板);用户菜单也有入口: +Chat 左侧导航底部 **「后台任务」**(用户区上方)右侧数字徽章持续显示运行中数量(约每 4 秒刷新,无需点开面板);用户菜单也有入口: - 有任务时按钮高亮,右侧数字徽章变红 - 点开后可:列表 / **终止** / **全部终止** / **清除记录** / 日志 - 面板打开时约每 4 秒自动刷新列表