+
- {{ m.text }}
+ {{ m.text }}
-
SMTWTFS
+
{{ d }}
-
{{ hover.date }} · {{ hover.count }} {{ locale === 'zh-CN' ? '次提交' : 'commits' }} · +{{ hover.added }} -{{ hover.deleted }}
+
+ {{ hover.date }} · {{ hover.count }} {{ t('commitsUnit') }} · +{{ hover.added }} -{{ hover.deleted }}
+ {{ t('heatHint') }}
+
diff --git a/frontend/src/components/ProjectAIDrawer.vue b/frontend/src/components/ProjectAIDrawer.vue
index be9efba..988d949 100644
--- a/frontend/src/components/ProjectAIDrawer.vue
+++ b/frontend/src/components/ProjectAIDrawer.vue
@@ -13,7 +13,8 @@ import { useAppStore } from '../store'
const props = defineProps({
projectId: { type: Number, required: true },
projectName: { type: String, default: '' },
- ask: { type: String, default: '' } // 打开时自动发送的问题
+ ask: { type: String, default: '' }, // 打开时自动发送的问题
+ diffHash: { type: String, default: '' } // 非空时按提交 diff 场景提问
})
const emit = defineEmits(['close'])
const router = useRouter()
@@ -27,6 +28,7 @@ const input = ref('')
const streamingId = ref(0)
const streamText = ref('')
const streamError = ref('')
+const diffConvId = ref(0)
const listEl = ref(null)
const streamBuf = {}
let offStream = null
@@ -74,7 +76,11 @@ async function send(text, scen) {
if (!content || streaming.value) return
streamError.value = ''
try {
- const conv = await call('SendAIMessage', activeId.value, props.projectId, scen || 'chat', content)
+ const useDiff = !!props.diffHash && (!activeId.value || activeId.value === diffConvId.value)
+ const conv = useDiff
+ ? await call('SendAIDiffMessage', activeId.value, props.projectId, props.diffHash, content)
+ : await call('SendAIMessage', activeId.value, props.projectId, scen || 'chat', content)
+ if (useDiff) diffConvId.value = conv.id
if (!activeId.value) {
activeId.value = conv.id
await loadConversations()
diff --git a/frontend/src/git.css b/frontend/src/git.css
index 5a9c539..ce767f9 100644
--- a/frontend/src/git.css
+++ b/frontend/src/git.css
@@ -1,4 +1,4 @@
*{scrollbar-width:thin;scrollbar-color:rgba(145,136,255,.55) transparent}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:rgba(145,136,255,.38);border:2px solid transparent;background-clip:padding-box;border-radius:8px}::-webkit-scrollbar-thumb:hover{background:rgba(145,136,255,.7);border:2px solid transparent;background-clip:padding-box}
.wsl-picker{display:flex;gap:8px;margin:12px 24px 0}.wsl-picker select{flex:1;background:var(--glass-soft);border:1px solid var(--border);border-radius:7px;color:var(--text);padding:0 10px}.icon-actions button:disabled{opacity:.5;cursor:not-allowed}
.page{overflow-x:clip}.project-title>div:first-child{min-width:0;flex:1;overflow:hidden}.project-title p{max-width:100%!important}.icon-actions{flex:none;flex-shrink:0}.project-card{min-width:0}
-.git-context{display:flex;align-items:center;gap:18px;margin:-8px 0 18px;padding:11px 15px;border:1px solid var(--glass-border);border-radius:7px;background:var(--glass-soft);color:var(--muted)}.git-context span{display:flex;align-items:center;gap:7px}.git-context svg{width:17px;color:#9188ff}.git-context b{color:var(--text)}.heat-panel{height:255px}.heat-panel .chart{height:185px}.branch.interactive{position:relative;padding-right:52px;cursor:pointer;transition:border-color .2s,background .2s}.branch.interactive:hover,.branch.interactive.selected{background:rgba(123,115,255,.12);outline:1px solid rgba(145,136,255,.35)}.checkout-btn{position:absolute;right:12px;top:20px;width:32px;height:32px;border:0;border-radius:6px;background:rgba(123,115,255,.15);color:#9188ff;display:grid;place-items:center;cursor:pointer}.checkout-btn svg{width:16px}.commit{width:100%;border:0;color:var(--text);text-align:left;cursor:pointer}.commit:hover{outline:1px solid rgba(145,136,255,.3)}.git-trend{position:relative}.git-trend>.segments{position:absolute;right:0;top:-38px;z-index:2}.git-trend .chart{height:280px}.drawer-mask{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.55);backdrop-filter:blur(5px);display:flex;justify-content:flex-end;animation:overlay-in .2s}.commit-drawer{width:min(620px,90vw);height:100%;overflow:auto;background:var(--glass-strong);border-left:1px solid var(--glass-border);box-shadow:-20px 0 50px rgba(0,0,0,.3);padding:26px;animation:drawer-in .3s cubic-bezier(.16,1,.3,1)}.commit-drawer header{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--border);padding-bottom:18px}.commit-drawer header small{color:var(--muted)}.commit-drawer h2{margin:7px 0 0;font-size:20px}.commit-drawer header button,.commit-meta button{border:0;background:var(--glass-soft);color:var(--text);width:34px;height:34px;border-radius:6px;display:grid;place-items:center;cursor:pointer}.commit-drawer svg{width:17px}.commit-meta{display:grid;grid-template-columns:1fr auto auto auto;gap:10px;align-items:center;margin:20px 0;padding:15px;background:var(--glass-soft);border-radius:7px}.commit-meta code{min-width:0;overflow:hidden;text-overflow:ellipsis}.commit-meta span,.commit-meta time{grid-column:1/3;color:var(--muted)}.change-file{display:grid;grid-template-columns:22px 1fr auto auto auto;gap:10px;align-items:center;padding:11px;border-bottom:1px solid var(--border)}.change-file span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.change-file small{color:var(--muted)}@keyframes drawer-in{from{transform:translateX(100%)}to{transform:none}}@media(prefers-reduced-motion:reduce){.commit-drawer{animation:none}}
+.git-context{display:flex;align-items:center;gap:18px;margin:-8px 0 18px;padding:11px 15px;border:1px solid var(--glass-border);border-radius:7px;background:var(--glass-soft);color:var(--muted)}.git-context span{display:flex;align-items:center;gap:7px}.git-context svg{width:17px;color:#9188ff}.git-context b{color:var(--text)}.heat-panel{height:auto;overflow:hidden}.heat-panel .chart{height:185px}.git-split .structure-scroll-panel{max-height:none;overflow:visible}.branch.interactive{position:relative;padding-right:52px;cursor:pointer;transition:border-color .2s,background .2s}.branch.interactive:hover,.branch.interactive.selected{background:rgba(123,115,255,.12);outline:1px solid rgba(145,136,255,.35)}.checkout-btn{position:absolute;right:12px;top:20px;width:32px;height:32px;border:0;border-radius:6px;background:rgba(123,115,255,.15);color:#9188ff;display:grid;place-items:center;cursor:pointer}.checkout-btn svg{width:16px}.commit{width:100%;border:0;color:var(--text);text-align:left;cursor:pointer}.commit:hover{outline:1px solid rgba(145,136,255,.3)}.git-trend{position:relative}.git-trend>.segments{position:absolute;right:0;top:-38px;z-index:2}.git-trend .chart{height:280px}.drawer-mask{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.55);backdrop-filter:blur(5px);display:flex;justify-content:flex-end;animation:overlay-in .2s}.commit-drawer{width:min(820px,92vw);height:100%;overflow:auto;scrollbar-width:none;background:var(--glass-strong);border-left:1px solid var(--glass-border);box-shadow:-20px 0 50px rgba(0,0,0,.3);padding:26px;animation:drawer-in .3s cubic-bezier(.16,1,.3,1)}.commit-drawer::-webkit-scrollbar{display:none}.commit-drawer header{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--border);padding-bottom:18px}.commit-drawer header small{color:var(--muted)}.commit-drawer h2{margin:7px 0 0;font-size:20px}.commit-drawer header button,.commit-meta button{border:0;background:var(--glass-soft);color:var(--text);width:34px;height:34px;border-radius:6px;display:grid;place-items:center;cursor:pointer}.commit-drawer-acts{display:flex;align-items:center;gap:8px;flex:none}.commit-drawer-ai{width:auto!important;padding:0 12px;display:inline-flex!important;align-items:center;gap:6px;font:inherit;font-size:12.5px;white-space:nowrap}.commit-drawer-ai:disabled{opacity:.45;cursor:not-allowed}.commit-drawer svg{width:17px}.commit-meta{display:grid;grid-template-columns:1fr auto auto auto;gap:10px;align-items:center;margin:20px 0;padding:15px;background:var(--glass-soft);border-radius:7px}.commit-meta code{min-width:0;overflow:hidden;text-overflow:ellipsis}.commit-meta span,.commit-meta time{grid-column:1/3;color:var(--muted)}.change-file{width:100%;display:grid;grid-template-columns:22px 1fr auto auto auto;gap:10px;align-items:center;padding:11px;border:0;border-bottom:1px solid var(--border);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.change-file:hover,.change-file.open{background:rgba(123,115,255,.08)}.change-file span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.change-file small{color:var(--muted)}.commit-diff{margin:0 0 12px;padding:10px 12px;border-radius:8px;background:#121820;overflow:hidden;font:12px/1.55 ui-monospace,Consolas,monospace;white-space:pre-wrap;word-break:break-all}.commit-diff span{display:block}.commit-diff .add{color:#55dfa1}.commit-diff .del{color:#ff8a95}.commit-diff .meta{color:#8fb2ff}.commit-diff .ctx{color:#9aa3b5}.commit-diff-note{margin:0 0 12px;padding:0 12px;color:var(--muted);font-size:12px}html[data-theme=light] .commit-diff{background:#f4f6fa}html[data-theme=light] .commit-diff .ctx{color:#3b4556}@keyframes drawer-in{from{transform:translateX(100%)}to{transform:none}}@media(prefers-reduced-motion:reduce){.commit-drawer{animation:none}}
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 40891ef..47f5ca6 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -31,6 +31,9 @@ import './runtime.css'
import './git.css'
import './polish.css'
+const isTrayWindow = new URLSearchParams(location.search).get('tray') === '1' || location.hash.startsWith('#/tray')
+if (isTrayWindow) document.documentElement.classList.add('tray-window')
+
const zh = {
app: '年糕崽崽 PMS',
dashboard: '仪表盘',
@@ -480,6 +483,10 @@ const zh = {
commitDetail: '提交详情',
copyHash: '复制哈希',
filesChanged: '变更文件',
+ heatHint: '悬停查看提交次数,点击按日筛选',
+ binaryFile: '二进制文件,无法显示文本 diff',
+ noDiff: '没有可显示的文本变更',
+ diffTruncated: 'Diff 过长,已截断',
clearFilter: '清除筛选',
selectedDate: '已筛选 {date}',
day: '日',
@@ -517,6 +524,10 @@ const zh = {
allTypes: '全部类型',
noIssues: '暂无风险项',
insightDone: '深度检查完成',
+ insightExcludeTitle: '检查排除',
+ insightExcludeHint: '排除的文件或目录不参与 TODO、长文件等检查,不影响行数统计。支持 vendor、src/todo、*.generated.go。',
+ insightExcludePh: '文件或目录,如 vendor、src/todo、*.pb.go',
+ insightExcludeEmpty: '未设置检查排除,将检查统计到的全部源码文件',
severity: { high: '高风险', medium: '中风险', low: '低风险' },
quickSettings: '快捷设置',
language: '语言',
@@ -573,6 +584,8 @@ const zh = {
aiPromptGit: '请分析这个项目的 Git 贡献情况:贡献者结构、活跃度和热点文件风险。',
aiPromptTodo: '请分析这个项目的待办事项:优先级是否合理、有哪些逾期风险、建议的执行顺序。',
aiPromptTicket: '请从需求管理角度分析这个项目的工单:排期合理性、类型分布和处理顺序建议。',
+ aiAnalyzeDiff: 'AI 分析本次 diff',
+ aiPromptDiff: '请审查这次提交的 diff:改动意图、潜在风险、遗漏的测试,以及简要改进建议。',
aiWelcome: '选择项目后可使用快捷分析,也可以直接提问',
aiAskPlaceholder: '输入问题,Enter 发送,Shift+Enter 换行',
aiSend: '发送',
@@ -637,6 +650,40 @@ const zh = {
loadingStyleMatrixDesc: '绿色数字雨倾泻而下',
loadingStyleBar: '底部进度条',
loadingStyleBarDesc: '保留当前页面,只显示底部进度',
+ trayMenuStyle: '托盘菜单样式',
+ trayStyleNative: '系统原生',
+ trayStyleNativeDesc: 'Windows 标准右键列表',
+ trayStyleLiquid: '液态玻璃',
+ trayStyleLiquidDesc: '控制中心:大块入口 + 底栏',
+ trayStyleGlass: '亚克力面板',
+ trayStyleGlassDesc: 'Win11 飞出:事务 / 系统分组',
+ trayStyleCompact: '紧凑列表',
+ trayStyleCompactDesc: '三列图标短字,高度最低',
+ trayStyleMinimal: '紧凑列表',
+ trayStyleMinimalDesc: '三列图标短字,高度最低',
+ trayStyleStatus: '状态卡片',
+ trayStyleStatusDesc: '看板:指标 + 分组入口',
+ trayStyleNeon: '暗色描边',
+ trayStyleNeonDesc: '左侧主操作,右侧短列表',
+ trayShow: '主窗口',
+ trayLaunchpad: '启动台',
+ traySync: '同步',
+ trayBatch: '批量统计全部项目',
+ trayBatchShort: '统计',
+ trayRestart: '重启',
+ trayQuit: '退出',
+ trayProjects: '项目',
+ trayAllProjects: '全部…',
+ trayTodos: '待办',
+ trayTickets: '工单',
+ trayMessages: '消息',
+ trayAutostart: '自启',
+ trayToday: '今日',
+ trayPending: '待推送 {n}',
+ trayUnread: '未读消息 {n}',
+ trayDueToday: '今日到期 {n}',
+ trayStatusSignedOut: '未登录',
+ aiHub: 'AI 分析',
sysIntegration: '系统集成',
onWindowClose: '关闭窗口时',
closeToTray: '最小化到系统托盘',
@@ -815,7 +862,7 @@ const zh = {
adminReleaseChangelog: '更新说明',
adminReleaseFile: '安装包',
adminReleaseDropTitle: '拖拽安装包到此处',
- adminReleaseDropHint: '支持 .exe;也可点击浏览选择',
+ adminReleaseDropHint: '请上传 NSIS 安装包(package 产物 *-installer.exe),不要上传裸 exe',
adminReleaseNeedExe: '请拖入或选择 .exe 安装包',
adminReleaseUpload: '上传',
adminReleasePublish: '设为最新',
@@ -838,6 +885,8 @@ const zh = {
appUpdateSkip: '稍后',
appUpdateInstall: '下载并安装',
appUpdateDownloading: '下载中…',
+ appUpdateHint: '下载完成后将退出并打开安装程序,请在向导中完成更新。',
+ appUpdateProgress: '已下载 {received} / {total}({percent}%)',
checkAppUpdate: '检查软件更新',
aboutCheckUpdate: '检查更新',
aboutCheckingUpdate: '正在检查…',
@@ -1027,6 +1076,12 @@ const zh = {
VERSION_EXISTS: '该版本已存在',
FILE_TOO_LARGE: '文件过大',
SHA256_MISMATCH: '安装包校验失败',
+ SIZE_MISMATCH: '安装包大小与服务器不一致,请重试',
+ NOT_INSTALLER: '下载到的不是有效安装包,请检查网络或服务器地址',
+ DOWNLOAD_FAILED: '更新包下载失败,请检查网络后重试',
+ INSTALLER_START_FAILED: '无法启动安装程序',
+ ALREADY_LATEST: '已是最新版本',
+ SAVE_FAILED: '无法保存安装包',
NO_RELEASE: '暂无可用更新',
KIND_ICON_ADMIN_ONLY: '无权维护种类默认图标',
KIND_UNKNOWN: '未知的启动台种类',
@@ -1044,6 +1099,9 @@ const zh = {
FILE_PATH_INVALID: '非法文件路径',
FILE_READ_FAILED: '文件读取失败',
FILE_PATH_REQUIRED: '文件路径不能为空',
+ PATTERN_REQUIRED: '请输入排除规则',
+ PATTERN_EXISTS: '该排除规则已存在',
+ PROJECT_REQUIRED: '请先选择项目',
TODO_TITLE_REQUIRED: '请输入待办标题',
TODO_STATUS_INVALID: '无效的待办状态',
TICKET_TITLE_REQUIRED: '请输入工单标题',
@@ -1563,6 +1621,10 @@ const en = {
commitDetail: 'Commit details',
copyHash: 'Copy hash',
filesChanged: 'Changed files',
+ heatHint: 'Hover for counts, click to filter by day',
+ binaryFile: 'Binary file, no text diff',
+ noDiff: 'No text diff to show',
+ diffTruncated: 'Diff truncated',
clearFilter: 'Clear filter',
selectedDate: 'Filtered by {date}',
day: 'Day',
@@ -1600,6 +1662,10 @@ const en = {
allTypes: 'All types',
noIssues: 'No issues found',
insightDone: 'Inspection completed',
+ insightExcludeTitle: 'Check excludes',
+ insightExcludeHint: 'Excluded files or directories skip TODO and long-file checks, without changing line counts. Examples: vendor, src/todo, *.generated.go.',
+ insightExcludePh: 'File or directory, e.g. vendor, src/todo, *.pb.go',
+ insightExcludeEmpty: 'No check excludes. All scanned source files will be inspected.',
severity: { high: 'High', medium: 'Medium', low: 'Low' },
quickSettings: 'Quick settings',
language: 'Language',
@@ -1656,6 +1722,8 @@ const en = {
aiPromptGit: 'Analyze the Git contribution of this project: contributor structure, activity and hotspot risks.',
aiPromptTodo: 'Analyze the todos of this project: priority sanity, overdue risks and a suggested execution order.',
aiPromptTicket: 'Analyze the tickets of this project from a requirements perspective: scheduling, type distribution and handling order.',
+ aiAnalyzeDiff: 'Analyze this diff',
+ aiPromptDiff: 'Review this commit diff: intent, risks, missing tests, and brief improvement suggestions.',
aiWelcome: 'Pick a project for quick analysis, or just ask anything',
aiAskPlaceholder: 'Type a question. Enter to send, Shift+Enter for newline',
aiSend: 'Send',
@@ -1720,6 +1788,40 @@ const en = {
loadingStyleMatrixDesc: 'Green digital rain pouring down',
loadingStyleBar: 'Bottom progress bar',
loadingStyleBarDesc: 'Keep the page, show only a bottom bar',
+ trayMenuStyle: 'Tray menu style',
+ trayStyleNative: 'System native',
+ trayStyleNativeDesc: 'Windows context menu list',
+ trayStyleLiquid: 'Liquid glass',
+ trayStyleLiquidDesc: 'Control Center tiles with a footer',
+ trayStyleGlass: 'Acrylic panel',
+ trayStyleGlassDesc: 'Windows 11 flyout with Work / System groups',
+ trayStyleCompact: 'Compact list',
+ trayStyleCompactDesc: 'Three-column icons, lowest height',
+ trayStyleMinimal: 'Compact list',
+ trayStyleMinimalDesc: 'Three-column icons, lowest height',
+ trayStyleStatus: 'Status card',
+ trayStyleStatusDesc: 'Dashboard with metrics and grouped actions',
+ trayStyleNeon: 'Dark outline',
+ trayStyleNeonDesc: 'Primary rail on the left, short list on the right',
+ trayShow: 'Window',
+ trayLaunchpad: 'Launchpad',
+ traySync: 'Sync',
+ trayBatch: 'Analyze All Projects',
+ trayBatchShort: 'Analyze',
+ trayRestart: 'Restart',
+ trayQuit: 'Quit',
+ trayProjects: 'Projects',
+ trayAllProjects: 'All…',
+ trayTodos: 'Todos',
+ trayTickets: 'Tickets',
+ trayMessages: 'Inbox',
+ trayAutostart: 'Startup',
+ trayToday: 'Today',
+ trayPending: 'Pending {n}',
+ trayUnread: 'Unread {n}',
+ trayDueToday: 'Due today {n}',
+ trayStatusSignedOut: 'Signed out',
+ aiHub: 'AI Analysis',
sysIntegration: 'System integration',
onWindowClose: 'When closing the window',
closeToTray: 'Minimize to system tray',
@@ -1898,7 +2000,7 @@ const en = {
adminReleaseChangelog: 'Changelog',
adminReleaseFile: 'Installer',
adminReleaseDropTitle: 'Drop installer here',
- adminReleaseDropHint: 'Accepts .exe; or click Browse',
+ adminReleaseDropHint: 'Upload the NSIS installer (*-installer.exe from package), not the raw app exe',
adminReleaseNeedExe: 'Please drop or pick an .exe installer',
adminReleaseUpload: 'Upload',
adminReleasePublish: 'Publish',
@@ -1921,6 +2023,8 @@ const en = {
appUpdateSkip: 'Later',
appUpdateInstall: 'Download & install',
appUpdateDownloading: 'Downloading…',
+ appUpdateHint: 'The app will quit and open the installer. Finish the wizard to update.',
+ appUpdateProgress: 'Downloaded {received} / {total} ({percent}%)',
checkAppUpdate: 'Check for updates',
aboutCheckUpdate: 'Check for updates',
aboutCheckingUpdate: 'Checking…',
@@ -2110,6 +2214,12 @@ const en = {
VERSION_EXISTS: 'Version already exists',
FILE_TOO_LARGE: 'File too large',
SHA256_MISMATCH: 'Installer checksum mismatch',
+ SIZE_MISMATCH: 'Installer size does not match the server; please retry',
+ NOT_INSTALLER: 'Downloaded file is not a valid installer; check the network or server URL',
+ DOWNLOAD_FAILED: 'Failed to download the update; check the network and retry',
+ INSTALLER_START_FAILED: 'Could not start the installer',
+ ALREADY_LATEST: 'Already up to date',
+ SAVE_FAILED: 'Could not save the installer',
NO_RELEASE: 'No release available',
KIND_ICON_ADMIN_ONLY: 'You do not have permission to manage kind icons',
KIND_UNKNOWN: 'Unknown launchpad kind',
@@ -2127,6 +2237,9 @@ const en = {
FILE_PATH_INVALID: 'Invalid file path',
FILE_READ_FAILED: 'Failed to read file',
FILE_PATH_REQUIRED: 'File path is required',
+ PATTERN_REQUIRED: 'Exclusion pattern is required',
+ PATTERN_EXISTS: 'This exclusion rule already exists',
+ PROJECT_REQUIRED: 'Select a project first',
TODO_TITLE_REQUIRED: 'Todo title is required',
TODO_STATUS_INVALID: 'Invalid todo status',
TICKET_TITLE_REQUIRED: 'Ticket title is required',
@@ -2226,7 +2339,8 @@ const router = createRouter({
{ path: '/team', component: TeamHome },
{ path: '/team/tasks', component: TeamTasks },
{ path: '/team/reports', component: TeamReports },
- { path: '/admin', component: Admin }
+ { path: '/admin', component: Admin },
+ { path: '/tray', component: { template: '
' } }
]
})
diff --git a/frontend/src/polish.css b/frontend/src/polish.css
index 3b5ddb4..f97aae5 100644
--- a/frontend/src/polish.css
+++ b/frontend/src/polish.css
@@ -57,6 +57,9 @@ html{--topbar-h:0px}
.exit-modal .modal-head .nm-close:hover{background:var(--surface-3);color:var(--text)}
.exit-modal .modal-head .nm-close svg{width:16px;height:16px}
.exit-hint{margin:0;padding:0 20px 14px;color:var(--muted);font-size:13px}
+.update-dl-bar{height:6px;margin:0 20px 14px;border-radius:999px;background:var(--surface-3);overflow:hidden}
+.update-dl-bar>i{display:block;height:100%;width:0;border-radius:inherit;background:var(--primary);transition:width .2s ease}
+.exit-modal .modal-head .nm-close:disabled{opacity:.4;cursor:not-allowed}
.exit-actions{display:flex;flex-direction:column;gap:10px;padding:0 20px 22px}
.exit-actions .btn{width:100%;justify-content:center}
.exit-actions .btn.danger{background:color-mix(in srgb,var(--red) 18%,var(--surface-2));border-color:rgba(240,94,104,.45);color:var(--red)}
@@ -305,6 +308,137 @@ html[data-theme=light] .lg-art{background:#141a2e}
.loading-style-card.fullscreen-matrix .loading-style-preview i{width:34px;height:34px;border-radius:4px;background:linear-gradient(180deg,transparent 0 10%,#a5ffcb 10% 19%,rgba(60,200,110,.5) 19% 72%,transparent 72%) 2px 0/3px 100% no-repeat,linear-gradient(180deg,transparent 0 36%,#a5ffcb 36% 45%,rgba(60,200,110,.45) 45% 96%,transparent 96%) 9px 0/3px 100% no-repeat,linear-gradient(180deg,#a5ffcb 0 8%,rgba(60,200,110,.5) 8% 52%,transparent 52%) 16px 0/3px 100% no-repeat,linear-gradient(180deg,transparent 0 22%,#a5ffcb 22% 31%,rgba(60,200,110,.45) 31% 84%,transparent 84%) 23px 0/3px 100% no-repeat,linear-gradient(180deg,transparent 0 52%,#a5ffcb 52% 60%,rgba(60,200,110,.4) 60% 100%) 30px 0/3px 100% no-repeat;box-shadow:0 0 14px rgba(90,230,140,.35)}
.loading-style-card.bar .loading-style-preview i{width:34px;height:8px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.loading-style-card.bar .loading-style-preview i::before{content:"";position:absolute;inset:0 38% 0 0;border-radius:inherit;background:linear-gradient(90deg,#6ee7ff,#53d6a2);box-shadow:0 0 12px rgba(110,231,255,.65)}
+.tray-style-setting{display:grid;gap:12px;margin-top:18px;color:var(--text);font-weight:800}
+.tray-style-setting>span{display:flex;align-items:center;gap:8px}
+.tray-style-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:12px}
+.tray-style-card{position:relative;min-height:176px;border:1px solid rgba(145,136,255,.2);border-radius:8px;background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.018)),var(--surface-2);color:var(--text);padding:12px;display:grid;grid-template-rows:96px auto 1fr;gap:8px;text-align:left;cursor:pointer;outline:none;overflow:hidden;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}
+.tray-style-card:hover{border-color:rgba(110,231,255,.5);box-shadow:0 14px 30px rgba(0,0,0,.22)}
+.tray-style-card:focus-visible{box-shadow:0 0 0 3px rgba(110,231,255,.18),0 14px 30px rgba(0,0,0,.22)}
+.tray-style-card.active{border-color:rgba(110,231,255,.72);background:linear-gradient(180deg,rgba(110,231,255,.11),rgba(83,214,162,.045)),var(--surface-2);box-shadow:0 0 0 1px rgba(110,231,255,.16),0 18px 36px rgba(0,0,0,.24)}
+.tray-style-card.active::after{content:"";position:absolute;right:10px;top:10px;width:9px;height:9px;border-radius:50%;background:#6ee7ff;box-shadow:0 0 14px rgba(110,231,255,.9);z-index:2}
+.tray-style-card b{font-size:14px;line-height:1.25}
+.tray-style-card small{color:var(--muted);font-weight:600;line-height:1.35}
+.tray-style-preview{display:grid;place-items:center;border-radius:8px;border:1px solid rgba(255,255,255,.08);background:rgba(4,9,18,.48);overflow:hidden}
+.tsp-menu{display:grid;gap:3px;width:86px;height:68px;padding:6px;box-sizing:border-box;background:#2b2b2b;border:1px solid #1a1a1a}
+.tsp-menu i{display:block;min-height:0;border-radius:2px;background:rgba(255,255,255,.28)}
+.tray-style-card.native .tray-style-preview{background:#1c1c1c}
+.tray-style-card.native .tsp-menu{grid-template-columns:1fr;grid-template-rows:repeat(6,1fr);border-radius:0}
+.tray-style-card.native .tsp-menu i:nth-child(n+7){display:none}
+.tray-style-card.native .tsp-menu i:nth-child(3){height:1px;min-height:1px;background:rgba(255,255,255,.16);align-self:center}
+.tray-style-card.liquid .tray-style-preview{background:linear-gradient(180deg,#3a4252,#252b38)}
+.tray-style-card.liquid .tsp-menu{grid-template-columns:repeat(6,1fr);grid-template-rows:8px 1fr 1fr 7px 8px;gap:3px;padding:7px;border-radius:14px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2)}
+.tray-style-card.liquid .tsp-menu i{border-radius:6px;background:rgba(255,255,255,.34)}
+.tray-style-card.liquid .tsp-menu i:nth-child(1){grid-column:1/-1;border-radius:999px}
+.tray-style-card.liquid .tsp-menu i:nth-child(2),
+.tray-style-card.liquid .tsp-menu i:nth-child(4){grid-column:1/4}
+.tray-style-card.liquid .tsp-menu i:nth-child(3),
+.tray-style-card.liquid .tsp-menu i:nth-child(5){grid-column:4/7}
+.tray-style-card.liquid .tsp-menu i:nth-child(6){grid-column:1/-1;border-radius:8px;background:rgba(255,255,255,.18)}
+.tray-style-card.liquid .tsp-menu i:nth-child(7){grid-column:1/3;border-radius:999px;background:rgba(255,255,255,.22)}
+.tray-style-card.liquid .tsp-menu i:nth-child(8){grid-column:3/5;border-radius:999px;background:rgba(255,255,255,.22)}
+.tray-style-card.liquid .tsp-menu i:nth-child(9){grid-column:5/7;border-radius:999px;background:rgba(255,255,255,.22)}
+.tray-style-card.liquid .tsp-menu i:nth-child(10){display:none}
+.tray-style-card.glass .tray-style-preview{background:linear-gradient(180deg,#2a3342,#171d27)}
+.tray-style-card.glass .tsp-menu{grid-template-columns:1fr 1fr;grid-template-rows:7px 1fr 1fr 1fr 8px 6px;gap:3px;padding:6px;border-radius:10px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
+.tray-style-card.glass .tsp-menu i{height:auto;border-radius:6px;background:rgba(25,33,43,.82)}
+.tray-style-card.glass .tsp-menu i:nth-child(1){grid-column:1/-1;border-radius:8px;background:rgba(255,255,255,.08)}
+.tray-style-card.glass .tsp-menu i:nth-child(8){grid-column:1/-1;border-radius:8px;background:rgba(25,33,43,.7)}
+.tray-style-card.glass .tsp-menu i:nth-child(9),
+.tray-style-card.glass .tsp-menu i:nth-child(10){display:none}
+.tray-style-card.compact .tray-style-preview{background:#11151c}
+.tray-style-card.compact .tsp-menu{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,1fr);gap:4px;padding:7px;border-radius:8px;background:#11151c;border:0}
+.tray-style-card.compact .tsp-menu i{height:14px;width:14px;margin:auto;border-radius:5px;background:#1b2230}
+.tray-style-card.compact .tsp-menu i:nth-child(n+13){display:none}
+.tray-style-card.status .tray-style-preview{background:#19212b}
+.tray-style-card.status .tsp-menu{grid-template-columns:repeat(4,1fr);grid-template-rows:8px 14px 1fr 1fr 1fr 8px;gap:3px;padding:6px;border-radius:10px;background:#19212b;border:1px solid #2a3a48;position:relative}
+.tray-style-card.status .tsp-menu::before{content:"";position:absolute;left:10px;top:7px;width:6px;height:6px;border-radius:50%;background:#43c996}
+.tray-style-card.status .tsp-menu i{height:auto;border-radius:5px;background:#222b38}
+.tray-style-card.status .tsp-menu i:nth-child(1){grid-column:1/-1;background:transparent}
+.tray-style-card.status .tsp-menu i:nth-child(2){grid-column:1/3}
+.tray-style-card.status .tsp-menu i:nth-child(3){grid-column:3/5}
+.tray-style-card.status .tsp-menu i:nth-child(4){grid-column:1/3}
+.tray-style-card.status .tsp-menu i:nth-child(5){grid-column:3/5}
+.tray-style-card.status .tsp-menu i:nth-child(10){grid-column:1/-1;border-radius:4px}
+.tray-style-card.neon .tray-style-preview{background:#151b24}
+.tray-style-card.neon .tsp-menu{grid-template-columns:14px 1fr;grid-template-rows:8px repeat(5,1fr);gap:2px;padding:5px;border-radius:8px;background:#151b24;border:1px solid #303949}
+.tray-style-card.neon .tsp-menu i{height:auto;border-radius:4px;background:rgba(255,255,255,.06)}
+.tray-style-card.neon .tsp-menu i:nth-child(1){grid-column:1/-1;background:rgba(255,255,255,.04)}
+.tray-style-card.neon .tsp-menu i:nth-child(2),
+.tray-style-card.neon .tsp-menu i:nth-child(3),
+.tray-style-card.neon .tsp-menu i:nth-child(4),
+.tray-style-card.neon .tsp-menu i:nth-child(5){grid-column:1;border:1px solid #303949;background:#121820}
+.tray-style-card.neon .tsp-menu i:nth-child(n+6){grid-column:2}
+.tray-style-card.neon .tsp-menu i:nth-child(10){background:rgba(240,94,104,.28)}
+html[data-theme=light] .tray-style-preview{background:#e8edf4;border-color:rgba(15,23,42,.08)}
+html[data-theme=light] .tray-style-card.native .tsp-menu{background:#f3f3f3;border-color:#d0d0d0}
+html[data-theme=light] .tray-style-card.native .tsp-menu i{background:rgba(17,24,39,.35)}
+html[data-theme=light] .tray-style-card.liquid .tsp-menu{background:rgba(255,255,255,.72);border-color:rgba(15,23,42,.08)}
+html[data-theme=light] .tray-style-card.liquid .tsp-menu i{background:rgba(15,23,42,.16)}
+html[data-theme=light] .tray-style-card.glass .tsp-menu{background:rgba(255,255,255,.5);border-color:rgba(15,23,42,.08)}
+html[data-theme=light] .tray-style-card.glass .tsp-menu i{background:#fff}
+html[data-theme=light] .tray-style-card.compact .tsp-menu{background:#f4f6fa}
+html[data-theme=light] .tray-style-card.compact .tsp-menu i{background:#fff}
+html[data-theme=light] .tray-style-card.status .tsp-menu{background:#fff;border-color:#d5dce8}
+html[data-theme=light] .tray-style-card.status .tsp-menu i{background:#f3f5f8}
+html[data-theme=light] .tray-style-card.neon .tsp-menu{background:#fff;border-color:#dce1ea}
+
+html.tray-window,html.tray-window body,html.tray-window #app{min-width:0!important;max-width:100%!important;width:100%!important;height:100%!important;min-height:0!important;margin:0;overflow:hidden!important;background:transparent!important;scrollbar-width:none}
+html.tray-window::-webkit-scrollbar,html.tray-window *::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
+.tray-pop{--tray-hover:rgba(255,255,255,.08);box-sizing:border-box;width:268px;padding:6px;display:grid;gap:2px;color:var(--text);font-weight:650;user-select:none;overflow:hidden}
+.tray-pop-head{display:flex;align-items:center;gap:6px;min-height:24px;padding:3px 8px;border-radius:6px;cursor:pointer}
+.tray-pop-head:hover{background:var(--tray-hover)}
+.tray-pop-head b{flex:1;min-width:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
+.tray-dot{width:7px;height:7px;border-radius:50%;background:#929bac;flex:none}
+.tray-pop.st-online .tray-dot{background:#43c996}
+.tray-pop.st-offline .tray-dot{background:#e7bd35}
+.tray-pop.st-error .tray-dot{background:#f05e68}
+.tray-pop.st-syncing .tray-dot{background:#4f9df5}
+.tray-pop-head em{min-width:16px;height:16px;padding:0 5px;border-radius:999px;background:rgba(110,231,255,.2);color:#6ee7ff;font-size:10px;font-style:normal;display:grid;place-items:center;cursor:pointer}
+.tray-pop-head em.due{background:rgba(231,189,53,.22);color:#e7bd35}
+.tray-pop button{border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;font-weight:650}
+.tray-sep{display:block;height:1px;margin:3px 6px;background:color-mix(in srgb,var(--border) 80%,transparent);border:0}
+.tray-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px}
+.tray-pop:not(.dense) .tray-sep{display:none}
+.tray-pop:not(.dense) .tray-grid{grid-template-columns:repeat(4,1fr);gap:3px}
+.tray-grid button{display:flex;align-items:center;gap:6px;min-height:26px;padding:0 7px;border-radius:6px;font-size:12px;text-align:left}
+.tray-grid button:hover{background:var(--tray-hover)}
+.tray-pop:not(.dense) .tray-grid button{flex-direction:column;justify-content:center;gap:3px;min-height:46px;padding:6px 2px;border-radius:8px;background:var(--tray-hover);font-size:11px;text-align:center}
+.tray-grid button svg{width:14px;height:14px;flex:none;color:var(--muted)}
+.tray-grid button span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
+.tray-grid button.on{background:var(--tray-hover);box-shadow:inset 0 0 0 1px rgba(110,231,255,.35)}
+.tray-grid button.danger,.tray-grid button.danger svg{color:#f05e68}
+.tray-projects{display:flex;flex-wrap:wrap;gap:4px;padding:4px 2px 2px}
+.tray-projects button{max-width:100%;padding:3px 8px;border-radius:999px;background:var(--tray-hover);font-size:11px;font-weight:600}
+
+.tray-pop.skin-liquid{width:268px;padding:7px;border-radius:14px;background:rgba(42,48,60,.58);border:1px solid rgba(255,255,255,.2);box-shadow:0 10px 24px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.22);backdrop-filter:blur(32px) saturate(170%);-webkit-backdrop-filter:blur(32px) saturate(170%)}
+.tray-pop.skin-liquid .tray-pop-head{border-radius:999px}
+.tray-pop.skin-liquid .tray-grid button{border-radius:8px}
+.tray-pop.skin-liquid .tray-sep{background:rgba(255,255,255,.14)}
+
+.tray-pop.skin-glass{width:264px;padding:6px;border-radius:8px;background:color-mix(in srgb,var(--surface) 92%,transparent);border:1px solid var(--border);box-shadow:0 10px 24px rgba(0,0,0,.28)}
+.tray-pop.skin-glass .tray-pop-head,.tray-pop.skin-glass .tray-grid button{border-radius:4px}
+
+.tray-pop.skin-compact{width:252px;padding:4px;gap:1px;border-radius:6px;background:var(--surface);border:1px solid var(--border)}
+.tray-pop.skin-compact .tray-pop-head{min-height:20px;padding:1px 6px;border-radius:4px}
+.tray-pop.skin-compact .tray-pop-head b{font-size:11px}
+.tray-pop.skin-compact .tray-grid button{min-height:24px;padding:0 6px;border-radius:4px;font-size:11px}
+.tray-pop.skin-compact .tray-grid button svg{width:13px;height:13px}
+.tray-pop.skin-compact .tray-sep{margin:2px 4px}
+
+.tray-pop.skin-status{width:276px;padding:0;gap:0;border-radius:12px;background:var(--surface);border:1px solid var(--border);box-shadow:0 12px 28px rgba(0,0,0,.3);overflow:hidden}
+.tray-pop.skin-status .tray-pop-head{margin:0;padding:8px 10px;border-radius:0;background:var(--surface);box-shadow:inset 0 2px 0 #43c996}
+.tray-pop.skin-status .tray-grid,.tray-pop.skin-status .tray-projects{padding:6px}
+
+.tray-pop.skin-neon{width:264px;padding:6px;border-radius:8px;background:#151b24;border:1px solid var(--border);box-shadow:0 10px 24px rgba(0,0,0,.32)}
+.tray-pop.skin-neon .tray-grid button:hover{background:rgba(255,255,255,.06)}
+.tray-pop.skin-neon .tray-grid button.on{background:rgba(115,103,245,.12)}
+.tray-pop.skin-neon .tray-sep{background:var(--border)}
+
+html[data-theme=light] .tray-pop{--tray-hover:rgba(15,23,42,.06)}
+html[data-theme=light] .tray-pop.skin-liquid{background:rgba(255,255,255,.62);color:#0f172a;border-color:rgba(255,255,255,.55)}
+html[data-theme=light] .tray-pop.skin-glass,html[data-theme=light] .tray-pop.skin-compact,html[data-theme=light] .tray-pop.skin-status{background:#fff;color:#111827}
+html[data-theme=light] .tray-pop.skin-neon{background:#fff;color:#111827}
+html[data-theme=light] .tray-pop-head em{color:#0b7285;background:rgba(14,116,144,.12)}
.toast{transition:opacity .32s ease,transform .36s ease,filter .32s ease}
.toast.muted{opacity:.72;filter:saturate(.82)}
.toast.leaving{opacity:0;transform:translate(18px,-12px);pointer-events:none}
@@ -321,19 +455,20 @@ html[data-theme=light] .lg-art{background:#141a2e}
.detail-rules-badge{margin-left:2px;min-width:16px;height:16px;padding:0 5px;border-radius:999px;display:inline-grid;place-items:center;font-style:normal;font-size:10px;font-weight:800;line-height:1;color:#fff;background:linear-gradient(135deg,#7b73ff,#5b52d6)}
.detail-tabs{justify-self:start;width:max-content;max-width:100%;margin:0;padding:3px;background:rgba(255,255,255,.045);box-sizing:border-box}
.detail-tabs button{height:32px;padding:0 12px;font-size:12.5px;flex:none}
-.heat-panel{height:auto;min-height:250px}
-.heat-grid-wrap{--cell:13px;--gap:4px;position:relative;margin-top:12px;overflow-x:auto;padding-bottom:8px}
-.heat-months{display:grid;grid-template-columns:repeat(var(--weeks),var(--cell));gap:var(--gap);margin-left:34px;margin-bottom:8px;min-width:calc(var(--weeks) * (var(--cell) + var(--gap)))}
-.heat-months span{font-size:12px;color:var(--muted);white-space:nowrap}
-.heat-body{position:relative;display:flex;gap:10px;align-items:flex-start}
-.heat-weekdays{display:grid;grid-template-rows:repeat(7,var(--cell));gap:var(--gap);width:24px;color:var(--muted);font-size:12px;line-height:var(--cell);text-align:right}
-.heat-grid{display:grid;grid-template-columns:repeat(var(--weeks),var(--cell));grid-template-rows:repeat(7,var(--cell));gap:var(--gap);min-width:calc(var(--weeks) * (var(--cell) + var(--gap)))}
-.heat-cell{width:var(--cell);height:var(--cell);border:1px solid rgba(255,255,255,.035);border-radius:3px;background:#26303d;cursor:pointer;padding:0;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}
-.heat-cell:hover,.heat-cell.selected{transform:translateY(-1px);border-color:rgba(255,255,255,.45);box-shadow:0 0 0 2px rgba(123,115,255,.22)}
+.heat-panel{height:auto;min-height:0;overflow:hidden}
+.heat-grid-wrap{--cell:13px;--gap:3px;position:relative;margin-top:12px;width:100%;max-width:100%;overflow:hidden;scrollbar-width:none}
+.heat-grid-wrap::-webkit-scrollbar{display:none;width:0;height:0}
+.heat-months{position:relative;height:16px;margin:0 0 8px 34px}
+.heat-months span{position:absolute;top:0;font-size:12px;line-height:16px;color:var(--muted);white-space:nowrap;overflow:hidden}
+.heat-body{position:relative;display:flex;gap:10px;align-items:flex-start;min-width:0;overflow:hidden}
+.heat-weekdays{display:grid;grid-template-rows:repeat(7,var(--cell));gap:var(--gap);width:24px;flex:none;color:var(--muted);font-size:12px;line-height:var(--cell);text-align:right}
+.heat-grid{display:grid;grid-template-columns:repeat(var(--weeks),var(--cell));grid-template-rows:repeat(7,var(--cell));gap:var(--gap);min-width:0;flex:1}
+.heat-cell{width:var(--cell);height:var(--cell);border:1px solid rgba(255,255,255,.035);border-radius:3px;background:#26303d;cursor:pointer;padding:0;transition:border-color .12s ease,box-shadow .12s ease}
+.heat-cell:hover,.heat-cell.selected{border-color:rgba(255,255,255,.45);box-shadow:0 0 0 2px rgba(123,115,255,.22)}
.heat-cell.l1{background:#245140}.heat-cell.l2{background:#2e765b}.heat-cell.l3{background:#3cab7d}.heat-cell.l4{background:#55dfa1}
html[data-theme=light] .heat-cell{background:#e7ecf3;border-color:#d9e0ea}
html[data-theme=light] .heat-cell.l1{background:#b9efd4}html[data-theme=light] .heat-cell.l2{background:#81dfb4}html[data-theme=light] .heat-cell.l3{background:#42c990}html[data-theme=light] .heat-cell.l4{background:#159c68}
-.heat-tooltip{position:absolute;left:44px;bottom:-30px;z-index:3;border:1px solid var(--border);border-radius:7px;background:var(--surface-3);padding:6px 9px;color:var(--text);font-size:12px;box-shadow:0 10px 26px rgba(0,0,0,.28);pointer-events:none}
+.heat-tip{min-height:28px;margin:10px 0 0;color:var(--muted);font-size:12px;line-height:28px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.insights-hero{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:22px}
.score-ring{width:116px;height:116px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at center,var(--surface) 58%,transparent 59%),conic-gradient(var(--green) calc(var(--score,75)*1%),rgba(255,255,255,.08) 0);border:1px solid var(--border)}
.score-ring strong{font-size:34px;line-height:1}
@@ -345,6 +480,9 @@ html[data-theme=light] .heat-cell.l1{background:#b9efd4}html[data-theme=light] .
.insight-counts .medium,.issue-card.medium .issue-severity{color:#ffd166;background:rgba(231,189,53,.12)}
.insight-counts .low,.issue-card.low .issue-severity{color:#72b7ff;background:rgba(79,157,245,.12)}
.insight-filter select{height:36px;border:1px solid var(--border);border-radius:7px;background:var(--surface-2);color:var(--text);padding:0 10px}
+.insight-exclude-panel .section-head h2{display:flex;align-items:center;gap:8px}
+.insight-exclude-panel .section-head h2 svg{width:16px;height:16px;color:var(--primary)}
+.insight-exclude-hint{margin:0 0 12px;font-size:12.5px;color:var(--muted);line-height:1.45}
.issue-list{display:grid;gap:10px;margin-top:16px;max-height:620px;overflow:auto;padding-right:6px}
.issue-card{position:relative;display:grid;grid-template-columns:1fr;gap:10px;padding:16px 18px;border:1px solid var(--border);border-radius:8px;background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.015)),var(--surface-2);overflow:hidden}
.issue-card::before{display:none}
@@ -559,9 +697,8 @@ html[data-theme=light] .heat-cell.l1{background:#b9efd4}html[data-theme=light] .
.flow-btn{height:32px;padding:0 11px;font-size:12px}
.flow-btn svg{width:13px}
.calendar-nav{gap:10px}
-.calendar-nav .btn{width:38px;padding:0;justify-content:center;flex:0 0 auto}
-/* 文字类按钮按内容自适应宽度(不能依赖 last-child:末尾可能是管理员 icon 按钮) */
-.calendar-nav .daily-open-btn{width:auto;padding:0 14px;white-space:nowrap}
+.calendar-nav .btn{width:auto;min-width:38px;padding:0 12px;justify-content:center;flex:0 0 auto;white-space:nowrap}
+.calendar-nav .fest-admin-btn{width:38px;min-width:38px;padding:0}
.calendar-month{min-width:120px;text-align:center}
/* 固定左右两栏:右栏按比例随窗口缩放(约 1/4),不再在窄屏折叠为单列 */
.calendar-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(230px,1fr);gap:20px;align-items:start}
@@ -906,7 +1043,7 @@ html[data-theme=light] .heat-cell.l1{background:#b9efd4}html[data-theme=light] .
@keyframes loadingTrackSweep{0%,100%{transform:translateX(-62%);opacity:.35}50%{transform:translateX(62%);opacity:.9}}
@media(max-width:1150px){main::before,main::after{left:72px}.sidebar-bottom{padding-left:0;padding-right:0;justify-content:center}.quick-settings{left:0}.quick-settings-btn{width:40px;height:40px}.stats-grid.three,.stats-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.project-card{padding:20px}}
@media(max-width:980px){body{min-width:0}.page{padding:24px 24px 56px}.stats-grid.three,.stats-grid.four,.stats-grid.five{grid-template-columns:repeat(2,minmax(0,1fr))}.project-grid{grid-template-columns:1fr}.section-head{align-items:flex-start;gap:12px;flex-direction:column}.project-tools{width:100%;justify-content:flex-start}.group-filter{width:100%;flex-wrap:wrap;height:auto}.group-filter select{flex:1;min-width:160px}.search{width:100%}.git-error-panel{grid-template-columns:36px 1fr}.git-error-panel .btn{grid-column:1/3;width:max-content}}
-@media(max-width:720px){.loading-style-grid{grid-template-columns:1fr}.loading-style-card{min-height:104px}}
+@media(max-width:720px){.loading-style-grid{grid-template-columns:1fr}.loading-style-card{min-height:104px}.tray-style-grid{grid-template-columns:1fr 1fr}}
@media(max-width:980px){.detail-page{--detail-sticky-offset:12px;padding:var(--detail-sticky-offset) 20px 56px}.insights-hero{grid-template-columns:1fr}.detail-head-row{align-items:flex-start;flex-wrap:wrap;gap:10px}.detail-head-id{flex:1 1 220px}.detail-head-acts{width:100%;flex-wrap:wrap;justify-content:flex-start}.detail-tabs{width:100%;max-width:100%;overflow-x:auto}}
@media(prefers-reduced-motion:reduce){main::before,main::after,.logo-track,.logo-spark,.shine-card:hover::after{animation:none!important}.shine-card:hover,.heat-cell:hover{transform:none}.toast{transition:opacity .2s ease}}
@@ -1825,11 +1962,13 @@ html[data-theme=light] .lp-log-line{color:#1f2937}
/* ============ 日历页头紧凑化:单行标题 + 32px 按钮 ============ */
.calendar-page .calendar-head{padding:9px 16px;margin-bottom:14px}
-.calendar-page .calendar-head>div{display:flex;align-items:baseline;gap:10px;min-width:0}
+.calendar-page .calendar-head>div{display:flex;align-items:center;gap:10px;min-width:0}
+.calendar-page .calendar-head>div:first-child{align-items:baseline}
.calendar-page .calendar-head h1{font-size:19px;margin:0;white-space:nowrap}
.calendar-page .calendar-head p{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
-.calendar-page .calendar-head .actions{flex-wrap:nowrap}
-.calendar-page .calendar-head .actions .btn{height:32px;padding:0 10px;font-size:12.5px;white-space:nowrap;flex-shrink:0}
+.calendar-page .calendar-head .actions{align-items:center;flex-wrap:nowrap}
+.calendar-page .calendar-head .actions .btn{height:32px;width:auto;padding:0 12px;font-size:12.5px;white-space:nowrap;flex-shrink:0}
+.calendar-page .calendar-head .actions .fest-admin-btn{width:38px;padding:0}
.calendar-page .calendar-head .calendar-month{font-size:13.5px;white-space:nowrap}
.calendar-grid-panel{min-height:calc(100vh - 150px)}
@@ -2029,6 +2168,8 @@ html[data-theme=light] .lp-log-line{color:#1f2937}
/* ============ 无边框自定义标题栏(logo + 菜单 + 窗控同一行) ============ */
:root{--titlebar-h:40px}
html,body,#app{height:100%;overflow:hidden}
+html.tray-window,html.tray-window body,html.tray-window #app{min-width:0!important;width:100%!important;height:100%!important;overflow:hidden!important;background:transparent!important;scrollbar-width:none!important}
+html.tray-window::-webkit-scrollbar,html.tray-window body::-webkit-scrollbar,html.tray-window #app::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
/* 只有主内容区滚动;侧栏不设 overflow:auto,避免滚动条夹在 rail 中间、裁切铃铛/飞出菜单 */
.shell{
height:100%;
diff --git a/frontend/src/store.js b/frontend/src/store.js
index 68130f1..19e85bf 100644
--- a/frontend/src/store.js
+++ b/frontend/src/store.js
@@ -8,7 +8,7 @@ export const useAppStore = defineStore('app', {
projectGroups: [],
selectedProjectGroupId: Number(localStorage.getItem('cc-project-group-id') || 0),
dashboard: { projects: 0, totalLines: 0, commits: 0 },
- settings: { theme: 'dark', locale: 'zh-CN', glassOpacity: 55, gitScope: 'current', autoRefresh: true, loadingStyle: 'fullscreen-orbit', imageMode: 'base64' },
+ settings: { theme: 'dark', locale: 'zh-CN', glassOpacity: 55, gitScope: 'current', autoRefresh: true, loadingStyle: 'fullscreen-orbit', trayMenuStyle: 'native', imageMode: 'base64' },
tasks: {},
batchTaskIds: [],
batchSummary: null,
diff --git a/frontend/src/style.css b/frontend/src/style.css
index bbebb8c..62b1ace 100644
--- a/frontend/src/style.css
+++ b/frontend/src/style.css
@@ -1 +1 @@
-@font-face{font-family:Nunito;src:url('./assets/fonts/nunito-v16-latin-regular.woff2')}*{box-sizing:border-box}html{--bg:#0e141d;--side:#151b24;--surface:#19212b;--surface-2:#202838;--surface-3:#252e40;--border:#303949;--text:#f4f5f8;--muted:#929bac;--primary:#7367f5;--green:#43c996;--blue:#4f9df5;--red:#f05e68;--yellow:#e7bd35;background:var(--bg);color:var(--text);font-family:Nunito,"Segoe UI",sans-serif;letter-spacing:0}html[data-theme=light]{--bg:#f4f6fa;--side:#fff;--surface:#fff;--surface-2:#f6f7fa;--surface-3:#edf0f6;--border:#dce1ea;--text:#111827;--muted:#526071;--primary:#6557e8}body{margin:0;min-width:960px}button,input,textarea,select{font:inherit;letter-spacing:0}.shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:232px;background:var(--side);border-right:1px solid var(--border);padding:24px 16px;display:flex;flex-direction:column;z-index:10}.brand{height:52px;display:flex;align-items:center;gap:14px;font-size:18px;padding:0 8px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;background:var(--primary);border-radius:8px;color:white}.brand-mark svg{width:23px}.sidebar nav{display:grid;gap:8px;margin-top:35px}.sidebar nav a{height:54px;display:flex;align-items:center;gap:16px;padding:0 18px;color:var(--muted);text-decoration:none;border-radius:7px;transition:background .2s,color .2s}.sidebar nav a:hover,.sidebar nav a.active{background:var(--surface-3);color:var(--text)}.sidebar nav a.active{color:#867eff}.sidebar svg{width:21px}.version{margin-top:auto;border-top:1px solid var(--border);padding:24px 8px 0;color:var(--muted);font-size:13px}.version i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#26c795;margin-right:8px}main{margin-left:232px;min-height:100vh;background:radial-gradient(circle at 100% 0,rgba(91,86,192,.12),transparent 34%),var(--bg)}.page{padding:34px 42px 60px;max-width:1540px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.page h1{font-size:30px;margin:0 0 6px}.page-head p,.project-head p{margin:0;color:var(--muted)}.actions{display:flex;align-items:center;gap:12px}.btn{height:40px;border:1px solid var(--border);border-radius:7px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:9px;color:var(--text);background:var(--surface-2);cursor:pointer;transition:border-color .2s,background .2s;white-space:nowrap;flex-shrink:0;line-height:1}.btn svg{width:17px}.btn:hover{border-color:var(--primary)}.btn.primary{background:var(--primary);border-color:var(--primary);color:white;box-shadow:0 8px 18px rgba(115,103,245,.25)}.btn.danger{background:#ef4444;border-color:#ef4444;color:white}.stats-grid{display:grid;gap:16px;margin-bottom:30px}.stats-grid.three{grid-template-columns:repeat(3,1fr)}.stats-grid.four{grid-template-columns:repeat(4,1fr)}.stats-grid.five{grid-template-columns:repeat(5,1fr)}.stat-card{height:124px;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:23px 24px;display:flex;align-items:center;gap:16px}.stat-icon{width:48px;height:48px;border-radius:8px;display:grid;place-items:center;background:rgba(115,103,245,.18);color:#8178ff}.stat-icon.green{background:rgba(67,201,150,.16);color:var(--green)}.stat-icon.blue{background:rgba(79,157,245,.16);color:var(--blue)}.stat-icon.red{background:rgba(240,94,104,.16);color:var(--red)}.stat-icon svg{width:22px}.stat-card strong{font-size:29px;display:block}.stat-card small{display:block;color:var(--muted);margin-top:5px}.section-head{display:flex;align-items:center;justify-content:space-between}.section-head h2,.panel h2{font-size:18px;margin:0}.search{height:38px;width:280px;border:1px solid var(--border);background:var(--surface-2);border-radius:7px;display:flex;align-items:center;padding:0 13px;color:var(--muted)}.search svg{width:17px}.search input{border:0;outline:0;background:transparent;color:var(--text);width:100%;padding-left:9px}.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:20px}.project-card{min-height:280px;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:24px;cursor:pointer;transition:border-color .2s,background .2s}.project-card:hover{border-color:#555f77;background:var(--surface-2)}.project-title{display:flex;justify-content:space-between}.project-title h3{margin:0 0 5px}.project-title p{color:var(--muted);font-size:12px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:280px}.icon-actions{display:flex}.icon-actions button,.toast button{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:5px}.icon-actions svg{width:16px}.metric-row{display:grid;grid-template-columns:repeat(3,1fr);margin:27px 0 17px}.metric-row b{display:block;font-size:25px}.metric-row span{font-size:12px;color:var(--muted)}.language-bar{height:6px;border-radius:4px;overflow:hidden;display:flex;background:var(--surface-3)}.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:15px;color:var(--muted);font-size:11px;min-height:34px}.legend i{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:5px}.project-card footer{border-top:1px solid var(--border);margin-top:13px;padding-top:13px;display:flex;gap:14px;color:var(--muted);font-size:12px}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.add-card{min-height:280px;border:1px dashed #3a4558;background:transparent;border-radius:8px;color:var(--muted);display:grid;place-content:center;gap:15px;cursor:pointer}.add-card span{width:48px;height:48px;background:var(--surface-2);display:grid;place-items:center;border-radius:50%;margin:auto}.overlay{position:fixed;inset:0;background:rgba(0,0,0,.66);backdrop-filter:blur(5px);z-index:30;display:grid;place-items:center}.modal{width:500px;background:var(--surface);border:1px solid var(--border);border-radius:8px}.modal header,.modal footer{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between}.modal footer{border:0;border-top:1px solid var(--border);justify-content:flex-end}.modal header h2{margin:0}.modal header button{border:0;background:transparent;color:var(--muted);font-size:25px;cursor:pointer}.modal>label{display:block;margin:20px 24px 0;font-size:13px}.modal input,.modal textarea,.rule-add input,.rule-add select,.form-panel select{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:7px;color:var(--text);padding:10px 12px;margin-top:7px;outline:none}.modal textarea{height:80px;resize:vertical}.browse{display:flex;gap:8px}.browse input{margin-top:7px}.browse .btn{margin-top:7px;flex:none}.form-error{color:var(--red);padding:0 24px}.project-head{display:flex;align-items:center;gap:30px;background:rgba(8,12,19,.65);padding:24px;margin:-10px 0 12px}.project-head h1{font-size:25px}.back{border:0;background:transparent;color:var(--text);display:flex;align-items:center;gap:7px;cursor:pointer}.back svg{width:18px}.tabs{display:flex;gap:3px;background:var(--surface);width:max-content;padding:4px;border-radius:8px;margin:10px 0 25px}.tabs button{height:37px;padding:0 14px;border:0;background:transparent;color:var(--muted);border-radius:7px;display:flex;align-items:center;gap:8px;cursor:pointer}.tabs svg{width:18px}.tabs button.active{background:var(--primary);color:white}.split{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-bottom:22px}.panel{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:24px;margin-bottom:22px}.panel>.chart{height:310px}.language-list{height:310px;overflow:auto;margin-top:14px}.language-list>div{display:grid;grid-template-columns:1fr auto auto;gap:20px;background:var(--surface-2);padding:13px;margin-bottom:8px;border-radius:7px}.language-list i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px}.language-list span{color:var(--muted)}.center-action{text-align:center}.heat-panel{height:220px}.heatmap{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;grid-auto-columns:12px;gap:4px;overflow:hidden;margin-top:25px}.heatmap i{background:#2b3441;border-radius:2px}.heatmap i.l1{background:#28594b}.heatmap i.l2{background:#318266}.heatmap i.l3{background:#3cab7d}.heatmap i.l4{background:#4dd69b}.branch{height:76px;background:var(--surface-2);border-radius:7px;margin-top:10px;padding:12px 16px;display:grid;grid-template-columns:1fr auto;align-items:center}.branch span{display:flex;gap:9px;align-items:center;font-weight:bold}.branch svg{width:17px}.branch .current{color:var(--green)}.branch small{grid-column:1;color:var(--muted)}.branch code{grid-row:1/3;grid-column:2}.commit{min-height:76px;background:var(--surface-2);border-radius:7px;margin-top:10px;padding:12px;display:grid;grid-template-columns:42px 1fr auto auto;gap:9px;align-items:center}.avatar{width:36px;height:36px;border-radius:8px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:bold}.commit div{min-width:0}.commit div b,.commit small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.commit small,.contributor small{color:var(--muted);margin-top:5px}.trend .chart{height:250px}.segments{display:flex;background:var(--surface-2);padding:3px;border-radius:7px}.segments button{border:0;background:transparent;color:var(--muted);height:31px;padding:0 13px;border-radius:5px;cursor:pointer}.segments button.active{background:var(--primary);color:white}.contributor{height:65px;background:var(--surface-2);display:grid;grid-template-columns:35px 45px 1fr auto auto auto;gap:12px;align-items:center;padding:0 15px;margin-top:8px;border-radius:7px}.contributor div strong,.contributor div small{display:block}.file-tree{height:620px;overflow:auto;margin-top:18px}.file-tree>div{height:32px;display:flex;align-items:center;gap:7px}.file-tree svg{width:15px;color:var(--yellow)}.file-tree small{margin-left:auto;color:var(--muted)}.folder-size{display:grid;grid-template-columns:1fr auto;gap:8px 20px;background:var(--surface-2);padding:14px;margin-top:10px;border-radius:7px}.folder-size span{color:var(--muted);font-size:12px}.folder-size i{height:5px;background:#3b4353;border-radius:3px}.folder-size em{display:block;height:100%;background:var(--primary);border-radius:3px}.folder-size strong{font-size:13px}.large-file{display:flex;justify-content:space-between;background:var(--surface-2);padding:14px;margin-top:10px}.large-file b,.large-file small{display:block}.large-file small{color:var(--muted);margin-top:5px}.large-file>strong{color:var(--red)}.extension-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:15px}.extension-grid>div{background:var(--surface-2);padding:16px;display:flex;gap:10px;justify-content:space-between}.extension-grid code{color:#8178ff}.extension-grid span{color:var(--muted)}.empty{height:100%;min-height:130px;display:grid;place-content:center;text-align:center;color:var(--muted);gap:10px}.empty svg{margin:auto;width:38px}.taskbar{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:25;width:460px;background:var(--surface-3);border:1px solid var(--border);box-shadow:0 12px 30px rgba(0,0,0,.3);padding:12px 15px;border-radius:8px;display:grid;grid-template-columns:1fr 60px;gap:7px}.taskbar div:first-child{display:flex;gap:10px}.taskbar span{color:var(--muted)}.taskbar .progress{grid-column:1/3;height:4px;background:#3b4353}.taskbar .progress i{display:block;height:100%;background:var(--primary)}.toast{position:fixed;right:24px;top:22px;z-index:40;background:var(--surface-3);border:1px solid var(--border);padding:13px 15px;border-radius:7px}.toast.success{border-color:var(--green)}.toast.error{border-color:var(--red)}.toggle{display:flex;align-items:center;gap:7px;color:var(--primary)}.log-panel{min-height:400px}.log{min-height:96px;border-left:3px solid var(--blue);background:var(--surface-2);padding:15px 16px;margin-bottom:8px;display:grid;grid-template-columns:34px 1fr auto;gap:14px}.log.warning{border-color:var(--yellow)}.log.error{border-color:var(--red)}.log>span{width:30px;height:30px;background:rgba(79,157,245,.13);display:grid;place-items:center;border-radius:6px;color:var(--blue)}.log svg{width:15px}.log small,.log b,.log code{display:block}.log small{color:var(--muted)}.log code{background:rgba(0,0,0,.22);padding:8px;margin-top:7px}.log time{color:var(--muted);font-size:12px}.settings-page{max-width:1000px}.settings-tabs{width:100%;display:grid;grid-auto-flow:column;grid-auto-columns:1fr}.settings-tabs button{justify-content:center}.rule-add h2,.form-panel h2{display:flex;gap:10px;align-items:center}.rule-add h2 svg,.form-panel h2 svg{width:20px;color:var(--primary)}.rule-add>div{display:grid;grid-template-columns:1fr 240px auto;gap:15px;margin-top:20px}.rule-add input,.rule-add select{margin:0}.rule-add>small{color:var(--muted);display:block;margin-top:12px}.rule-group h2 small{color:var(--muted);font-weight:normal}.rule-group>div{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding-top:15px;margin-top:15px}.rule-group button{border:0;background:var(--surface-3);color:var(--text);border-radius:7px;padding:8px 10px;display:flex;align-items:center;gap:7px;cursor:pointer}.rule-group button.builtin{cursor:default}.rule-group button small{color:#8178ff}.rule-group svg{width:13px}.form-panel label{display:grid;grid-template-columns:180px 1fr;align-items:center;margin-top:18px}.db-path{background:var(--surface-2);padding:18px;margin:20px 0}.db-path code{color:#8178ff}.migrate{height:78px}.danger-zone h2{color:var(--red);display:flex;gap:9px}.danger-zone h2 svg{width:20px}.danger-zone p{color:var(--muted)}.danger-zone>div{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.danger-zone button{border:1px solid var(--border);background:var(--surface-2);color:var(--text);padding:20px;text-align:left;display:flex;gap:14px;align-items:center;border-radius:8px;cursor:pointer}.danger-zone button.danger{border-color:#713947}.danger-zone svg{width:25px}.danger-zone b,.danger-zone small{display:block}.danger-zone small{color:var(--muted);margin-top:5px}@media(max-width:1150px){.sidebar{width:72px}.brand b,.sidebar nav span{display:none}.brand{padding:0}.sidebar nav a{justify-content:center;padding:0}.version{font-size:0}.version i{margin:0}main{margin-left:72px}.project-grid{grid-template-columns:repeat(2,1fr)}.stats-grid.five{grid-template-columns:repeat(3,1fr)}.split{grid-template-columns:1fr}.extension-grid{grid-template-columns:repeat(3,1fr)}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
+@font-face{font-family:Nunito;src:url('./assets/fonts/nunito-v16-latin-regular.woff2')}*{box-sizing:border-box}html{--bg:#0e141d;--side:#151b24;--surface:#19212b;--surface-2:#202838;--surface-3:#252e40;--border:#303949;--text:#f4f5f8;--muted:#929bac;--primary:#7367f5;--green:#43c996;--blue:#4f9df5;--red:#f05e68;--yellow:#e7bd35;background:var(--bg);color:var(--text);font-family:Nunito,"Segoe UI",sans-serif;letter-spacing:0}html[data-theme=light]{--bg:#f4f6fa;--side:#fff;--surface:#fff;--surface-2:#f6f7fa;--surface-3:#edf0f6;--border:#dce1ea;--text:#111827;--muted:#526071;--primary:#6557e8}body{margin:0;min-width:960px}html.tray-window,html.tray-window body,html.tray-window #app{min-width:0!important;width:100%!important;height:100%!important;margin:0;overflow:hidden!important;background:transparent!important}button,input,textarea,select{font:inherit;letter-spacing:0}.shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:232px;background:var(--side);border-right:1px solid var(--border);padding:24px 16px;display:flex;flex-direction:column;z-index:10}.brand{height:52px;display:flex;align-items:center;gap:14px;font-size:18px;padding:0 8px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;background:var(--primary);border-radius:8px;color:white}.brand-mark svg{width:23px}.sidebar nav{display:grid;gap:8px;margin-top:35px}.sidebar nav a{height:54px;display:flex;align-items:center;gap:16px;padding:0 18px;color:var(--muted);text-decoration:none;border-radius:7px;transition:background .2s,color .2s}.sidebar nav a:hover,.sidebar nav a.active{background:var(--surface-3);color:var(--text)}.sidebar nav a.active{color:#867eff}.sidebar svg{width:21px}.version{margin-top:auto;border-top:1px solid var(--border);padding:24px 8px 0;color:var(--muted);font-size:13px}.version i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#26c795;margin-right:8px}main{margin-left:232px;min-height:100vh;background:radial-gradient(circle at 100% 0,rgba(91,86,192,.12),transparent 34%),var(--bg)}.page{padding:34px 42px 60px;max-width:1540px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.page h1{font-size:30px;margin:0 0 6px}.page-head p,.project-head p{margin:0;color:var(--muted)}.actions{display:flex;align-items:center;gap:12px}.btn{height:40px;border:1px solid var(--border);border-radius:7px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:9px;color:var(--text);background:var(--surface-2);cursor:pointer;transition:border-color .2s,background .2s;white-space:nowrap;flex-shrink:0;line-height:1}.btn svg{width:17px}.btn:hover{border-color:var(--primary)}.btn.primary{background:var(--primary);border-color:var(--primary);color:white;box-shadow:0 8px 18px rgba(115,103,245,.25)}.btn.danger{background:#ef4444;border-color:#ef4444;color:white}.stats-grid{display:grid;gap:16px;margin-bottom:30px}.stats-grid.three{grid-template-columns:repeat(3,1fr)}.stats-grid.four{grid-template-columns:repeat(4,1fr)}.stats-grid.five{grid-template-columns:repeat(5,1fr)}.stat-card{height:124px;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:23px 24px;display:flex;align-items:center;gap:16px}.stat-icon{width:48px;height:48px;border-radius:8px;display:grid;place-items:center;background:rgba(115,103,245,.18);color:#8178ff}.stat-icon.green{background:rgba(67,201,150,.16);color:var(--green)}.stat-icon.blue{background:rgba(79,157,245,.16);color:var(--blue)}.stat-icon.red{background:rgba(240,94,104,.16);color:var(--red)}.stat-icon svg{width:22px}.stat-card strong{font-size:29px;display:block}.stat-card small{display:block;color:var(--muted);margin-top:5px}.section-head{display:flex;align-items:center;justify-content:space-between}.section-head h2,.panel h2{font-size:18px;margin:0}.search{height:38px;width:280px;border:1px solid var(--border);background:var(--surface-2);border-radius:7px;display:flex;align-items:center;padding:0 13px;color:var(--muted)}.search svg{width:17px}.search input{border:0;outline:0;background:transparent;color:var(--text);width:100%;padding-left:9px}.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:20px}.project-card{min-height:280px;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:24px;cursor:pointer;transition:border-color .2s,background .2s}.project-card:hover{border-color:#555f77;background:var(--surface-2)}.project-title{display:flex;justify-content:space-between}.project-title h3{margin:0 0 5px}.project-title p{color:var(--muted);font-size:12px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:280px}.icon-actions{display:flex}.icon-actions button,.toast button{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:5px}.icon-actions svg{width:16px}.metric-row{display:grid;grid-template-columns:repeat(3,1fr);margin:27px 0 17px}.metric-row b{display:block;font-size:25px}.metric-row span{font-size:12px;color:var(--muted)}.language-bar{height:6px;border-radius:4px;overflow:hidden;display:flex;background:var(--surface-3)}.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:15px;color:var(--muted);font-size:11px;min-height:34px}.legend i{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:5px}.project-card footer{border-top:1px solid var(--border);margin-top:13px;padding-top:13px;display:flex;gap:14px;color:var(--muted);font-size:12px}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.add-card{min-height:280px;border:1px dashed #3a4558;background:transparent;border-radius:8px;color:var(--muted);display:grid;place-content:center;gap:15px;cursor:pointer}.add-card span{width:48px;height:48px;background:var(--surface-2);display:grid;place-items:center;border-radius:50%;margin:auto}.overlay{position:fixed;inset:0;background:rgba(0,0,0,.66);backdrop-filter:blur(5px);z-index:30;display:grid;place-items:center}.modal{width:500px;background:var(--surface);border:1px solid var(--border);border-radius:8px}.modal header,.modal footer{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between}.modal footer{border:0;border-top:1px solid var(--border);justify-content:flex-end}.modal header h2{margin:0}.modal header button{border:0;background:transparent;color:var(--muted);font-size:25px;cursor:pointer}.modal>label{display:block;margin:20px 24px 0;font-size:13px}.modal input,.modal textarea,.rule-add input,.rule-add select,.form-panel select{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:7px;color:var(--text);padding:10px 12px;margin-top:7px;outline:none}.modal textarea{height:80px;resize:vertical}.browse{display:flex;gap:8px}.browse input{margin-top:7px}.browse .btn{margin-top:7px;flex:none}.form-error{color:var(--red);padding:0 24px}.project-head{display:flex;align-items:center;gap:30px;background:rgba(8,12,19,.65);padding:24px;margin:-10px 0 12px}.project-head h1{font-size:25px}.back{border:0;background:transparent;color:var(--text);display:flex;align-items:center;gap:7px;cursor:pointer}.back svg{width:18px}.tabs{display:flex;gap:3px;background:var(--surface);width:max-content;padding:4px;border-radius:8px;margin:10px 0 25px}.tabs button{height:37px;padding:0 14px;border:0;background:transparent;color:var(--muted);border-radius:7px;display:flex;align-items:center;gap:8px;cursor:pointer}.tabs svg{width:18px}.tabs button.active{background:var(--primary);color:white}.split{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-bottom:22px}.panel{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:24px;margin-bottom:22px}.panel>.chart{height:310px}.language-list{height:310px;overflow:auto;margin-top:14px}.language-list>div{display:grid;grid-template-columns:1fr auto auto;gap:20px;background:var(--surface-2);padding:13px;margin-bottom:8px;border-radius:7px}.language-list i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px}.language-list span{color:var(--muted)}.center-action{text-align:center}.heat-panel{height:220px}.heatmap{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;grid-auto-columns:12px;gap:4px;overflow:hidden;margin-top:25px}.heatmap i{background:#2b3441;border-radius:2px}.heatmap i.l1{background:#28594b}.heatmap i.l2{background:#318266}.heatmap i.l3{background:#3cab7d}.heatmap i.l4{background:#4dd69b}.branch{height:76px;background:var(--surface-2);border-radius:7px;margin-top:10px;padding:12px 16px;display:grid;grid-template-columns:1fr auto;align-items:center}.branch span{display:flex;gap:9px;align-items:center;font-weight:bold}.branch svg{width:17px}.branch .current{color:var(--green)}.branch small{grid-column:1;color:var(--muted)}.branch code{grid-row:1/3;grid-column:2}.commit{min-height:76px;background:var(--surface-2);border-radius:7px;margin-top:10px;padding:12px;display:grid;grid-template-columns:42px 1fr auto auto;gap:9px;align-items:center}.avatar{width:36px;height:36px;border-radius:8px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:bold}.commit div{min-width:0}.commit div b,.commit small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.commit small,.contributor small{color:var(--muted);margin-top:5px}.trend .chart{height:250px}.segments{display:flex;background:var(--surface-2);padding:3px;border-radius:7px}.segments button{border:0;background:transparent;color:var(--muted);height:31px;padding:0 13px;border-radius:5px;cursor:pointer}.segments button.active{background:var(--primary);color:white}.contributor{height:65px;background:var(--surface-2);display:grid;grid-template-columns:35px 45px 1fr auto auto auto;gap:12px;align-items:center;padding:0 15px;margin-top:8px;border-radius:7px}.contributor div strong,.contributor div small{display:block}.file-tree{height:620px;overflow:auto;margin-top:18px}.file-tree>div{height:32px;display:flex;align-items:center;gap:7px}.file-tree svg{width:15px;color:var(--yellow)}.file-tree small{margin-left:auto;color:var(--muted)}.folder-size{display:grid;grid-template-columns:1fr auto;gap:8px 20px;background:var(--surface-2);padding:14px;margin-top:10px;border-radius:7px}.folder-size span{color:var(--muted);font-size:12px}.folder-size i{height:5px;background:#3b4353;border-radius:3px}.folder-size em{display:block;height:100%;background:var(--primary);border-radius:3px}.folder-size strong{font-size:13px}.large-file{display:flex;justify-content:space-between;background:var(--surface-2);padding:14px;margin-top:10px}.large-file b,.large-file small{display:block}.large-file small{color:var(--muted);margin-top:5px}.large-file>strong{color:var(--red)}.extension-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:15px}.extension-grid>div{background:var(--surface-2);padding:16px;display:flex;gap:10px;justify-content:space-between}.extension-grid code{color:#8178ff}.extension-grid span{color:var(--muted)}.empty{height:100%;min-height:130px;display:grid;place-content:center;text-align:center;color:var(--muted);gap:10px}.empty svg{margin:auto;width:38px}.taskbar{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:25;width:460px;background:var(--surface-3);border:1px solid var(--border);box-shadow:0 12px 30px rgba(0,0,0,.3);padding:12px 15px;border-radius:8px;display:grid;grid-template-columns:1fr 60px;gap:7px}.taskbar div:first-child{display:flex;gap:10px}.taskbar span{color:var(--muted)}.taskbar .progress{grid-column:1/3;height:4px;background:#3b4353}.taskbar .progress i{display:block;height:100%;background:var(--primary)}.toast{position:fixed;right:24px;top:22px;z-index:40;background:var(--surface-3);border:1px solid var(--border);padding:13px 15px;border-radius:7px}.toast.success{border-color:var(--green)}.toast.error{border-color:var(--red)}.toggle{display:flex;align-items:center;gap:7px;color:var(--primary)}.log-panel{min-height:400px}.log{min-height:96px;border-left:3px solid var(--blue);background:var(--surface-2);padding:15px 16px;margin-bottom:8px;display:grid;grid-template-columns:34px 1fr auto;gap:14px}.log.warning{border-color:var(--yellow)}.log.error{border-color:var(--red)}.log>span{width:30px;height:30px;background:rgba(79,157,245,.13);display:grid;place-items:center;border-radius:6px;color:var(--blue)}.log svg{width:15px}.log small,.log b,.log code{display:block}.log small{color:var(--muted)}.log code{background:rgba(0,0,0,.22);padding:8px;margin-top:7px}.log time{color:var(--muted);font-size:12px}.settings-page{max-width:1000px}.settings-tabs{width:100%;display:grid;grid-auto-flow:column;grid-auto-columns:1fr}.settings-tabs button{justify-content:center}.rule-add h2,.form-panel h2{display:flex;gap:10px;align-items:center}.rule-add h2 svg,.form-panel h2 svg{width:20px;color:var(--primary)}.rule-add>div{display:grid;grid-template-columns:1fr 240px auto;gap:15px;margin-top:20px}.rule-add input,.rule-add select{margin:0}.rule-add>small{color:var(--muted);display:block;margin-top:12px}.rule-group h2 small{color:var(--muted);font-weight:normal}.rule-group>div{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding-top:15px;margin-top:15px}.rule-group button{border:0;background:var(--surface-3);color:var(--text);border-radius:7px;padding:8px 10px;display:flex;align-items:center;gap:7px;cursor:pointer}.rule-group button.builtin{cursor:default}.rule-group button small{color:#8178ff}.rule-group svg{width:13px}.form-panel label{display:grid;grid-template-columns:180px 1fr;align-items:center;margin-top:18px}.db-path{background:var(--surface-2);padding:18px;margin:20px 0}.db-path code{color:#8178ff}.migrate{height:78px}.danger-zone h2{color:var(--red);display:flex;gap:9px}.danger-zone h2 svg{width:20px}.danger-zone p{color:var(--muted)}.danger-zone>div{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.danger-zone button{border:1px solid var(--border);background:var(--surface-2);color:var(--text);padding:20px;text-align:left;display:flex;gap:14px;align-items:center;border-radius:8px;cursor:pointer}.danger-zone button.danger{border-color:#713947}.danger-zone svg{width:25px}.danger-zone b,.danger-zone small{display:block}.danger-zone small{color:var(--muted);margin-top:5px}@media(max-width:1150px){.sidebar{width:72px}.brand b,.sidebar nav span{display:none}.brand{padding:0}.sidebar nav a{justify-content:center;padding:0}.version{font-size:0}.version i{margin:0}main{margin-left:72px}.project-grid{grid-template-columns:repeat(2,1fr)}.stats-grid.five{grid-template-columns:repeat(3,1fr)}.split{grid-template-columns:1fr}.extension-grid{grid-template-columns:repeat(3,1fr)}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vue
index a707199..ef15150 100644
--- a/frontend/src/views/ProjectDetail.vue
+++ b/frontend/src/views/ProjectDetail.vue
@@ -2,7 +2,7 @@
import { computed, onMounted, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
-import { ArrowLeft, Code2, GitCommitHorizontal, FolderTree, RefreshCw, Files, MessageSquareText, Rows3, Users, Plus, Minus, HardDrive, Folder, FileWarning, GitBranch, ExternalLink, TriangleAlert, ClipboardCheck, Flame, Sparkles, MessageCircleQuestion, Rocket, ListFilter } from 'lucide-vue-next'
+import { ArrowLeft, Code2, GitCommitHorizontal, FolderTree, RefreshCw, Files, MessageSquareText, Rows3, Users, Plus, Minus, HardDrive, Folder, FileWarning, GitBranch, ExternalLink, TriangleAlert, ClipboardCheck, Flame, Sparkles, MessageCircleQuestion, Rocket, ListFilter, Trash2 } from 'lucide-vue-next'
import StatCard from '../components/StatCard.vue'
import ChartView from '../components/ChartView.vue'
import GitHeatmap from '../components/GitHeatmap.vue'
@@ -38,7 +38,11 @@ const previewLine = ref(0)
// AI 问答抽屉:详情页内的“二级页面”,不跳转
const aiDrawer = ref(false)
const aiAsk = ref('')
+const aiDiffHash = ref('')
const askText = ref('')
+const insightExcludes = ref([])
+const insightExcludeInput = ref('')
+const insightExcludeBusy = ref(false)
// 这些检查项的 path 是真实源码文件(folder_concentration 是目录、large_commit 是提交哈希,不可预览)
const fileIssueTypes = ['large_file', 'long_file', 'todo_marker']
const colors = ['#7b73ff', '#4fd1a1', '#4da5ff', '#f4c84a', '#ef6683', '#23b5d3']
@@ -69,6 +73,7 @@ async function load() {
;[p.value, git.value, structure.value, insights.value] = await Promise.all([call('GetProject', +route.params.id), call('GetGitStats', +route.params.id), call('GetStructure', +route.params.id), call('GetProjectInsights', +route.params.id)])
try { diag.value = await call('GetGitDiagnostics', +route.params.id) } catch { diag.value = null }
loadProjRules()
+ loadInsightExcludes()
loading.value = false
}
@@ -82,11 +87,11 @@ async function loadProjRules() {
function onRulesChanged(list) {
projRules.value = list || []
}
-async function refreshInsights() {
+async function refreshInsights(silent = false) {
insightLoading.value = true
try {
insights.value = await call('RefreshProjectInsights', +route.params.id)
- store.showToast({ type: 'success', key: 'insightDone' })
+ if (!silent) store.showToast({ type: 'success', key: 'insightDone' })
} catch (e) {
store.showToast({ type: 'error', text: String(e) })
} finally {
@@ -131,10 +136,48 @@ async function showCommit(c) {
try { detail.value = await call('GetCommitDetails', +route.params.id, c.hash) } finally { detailLoading.value = false }
}
function openChat(text) {
+ aiDiffHash.value = ''
aiAsk.value = (text || '').trim()
askText.value = ''
aiDrawer.value = true
}
+function analyzeDiff(d) {
+ const hash = d?.hash || detail.value?.hash || ''
+ if (!hash) return
+ aiDiffHash.value = hash
+ aiAsk.value = t('aiPromptDiff')
+ askText.value = ''
+ aiDrawer.value = true
+}
+async function loadInsightExcludes() {
+ try { insightExcludes.value = (await call('GetInsightExcludes', +route.params.id)) || [] } catch { insightExcludes.value = [] }
+}
+async function addInsightExclude() {
+ const v = insightExcludeInput.value.trim()
+ const id = +route.params.id
+ if (!v || !id || insightExcludeBusy.value) return
+ insightExcludeBusy.value = true
+ try {
+ await call('AddInsightExclude', id, v)
+ insightExcludeInput.value = ''
+ await loadInsightExcludes()
+ await refreshInsights(true)
+ } catch (e) {
+ const code = String(e).split(':')[0].trim()
+ store.showToast({ type: 'error', key: code ? `errors.${code}` : null, text: String(e) })
+ } finally {
+ insightExcludeBusy.value = false
+ }
+}
+async function removeInsightExclude(r) {
+ try {
+ await call('DeleteRule', r.id)
+ await loadInsightExcludes()
+ await refreshInsights(true)
+ } catch (e) {
+ store.showToast({ type: 'error', text: String(e) })
+ }
+}
onMounted(load)
@@ -216,7 +259,7 @@ onMounted(load)