dsh-team-bots 0.2.395 → 0.2.460

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/package.json +4 -1
  2. package/scripts/doctor.mjs +14 -3
  3. package/src/api.js +30 -3
  4. package/src/config.js +108 -0
  5. package/src/db-migrations.js +24 -0
  6. package/src/db.js +5 -0
  7. package/src/feishu/channel.js +702 -0
  8. package/src/feishu/commands.js +20 -0
  9. package/src/feishu/format.js +56 -0
  10. package/src/feishu/index.js +19 -0
  11. package/src/feishu/store.js +205 -0
  12. package/src/http.js +11 -5
  13. package/src/service.js +7 -0
  14. package/src/services/bots.js +42 -0
  15. package/src/services/chat.js +19 -10
  16. package/src/services/core.js +153 -8
  17. package/src/services/external-trigger-schema.js +61 -0
  18. package/src/services/feishu.js +181 -0
  19. package/src/services/github-source.js +157 -0
  20. package/src/services/memory.js +122 -34
  21. package/src/services/projects.js +2 -0
  22. package/src/services/reason-codes.js +63 -0
  23. package/src/services/review-watchdog.js +30 -8
  24. package/src/services/run-finish.js +33 -9
  25. package/src/services/runs.js +48 -7
  26. package/src/services/runtime/context-window.js +53 -0
  27. package/src/services/runtime/prompt.js +165 -139
  28. package/src/services/runtime/sandbox-policy.js +65 -0
  29. package/src/services/runtime/session-continuity.js +38 -0
  30. package/src/services/runtime/session.js +148 -4
  31. package/src/services/scheduler.js +9 -2
  32. package/src/services/system.js +51 -3
  33. package/src/services/task-dispatch.js +43 -4
  34. package/src/services/task-notify.js +13 -8
  35. package/src/services/tasks.js +12 -4
  36. package/src/services/wechat-trigger-schema.js +62 -0
  37. package/src/services/wechat.js +129 -19
  38. package/src/services/write-scopes.js +38 -0
  39. package/src/tools.js +13 -3
  40. package/src/wechat/channel.js +130 -26
  41. package/src/wechat/commands.js +13 -1
  42. package/src/wechat/store.js +69 -18
  43. package/ui/app.js +8 -3
  44. package/ui/i18n/en/chat.js +1 -0
  45. package/ui/i18n/en/nav.js +5 -0
  46. package/ui/i18n/en/settings.js +25 -5
  47. package/ui/i18n/en/tasks.js +12 -0
  48. package/ui/i18n/en/wechat.js +25 -3
  49. package/ui/i18n/zh/chat.js +1 -0
  50. package/ui/i18n/zh/nav.js +5 -0
  51. package/ui/i18n/zh/settings.js +25 -5
  52. package/ui/i18n/zh/tasks.js +12 -0
  53. package/ui/i18n/zh/wechat.js +25 -3
  54. package/ui/modules/api.js +23 -1
  55. package/ui/modules/cards.js +15 -0
  56. package/ui/modules/chat.js +43 -2
  57. package/ui/modules/dom-morph.js +14 -7
  58. package/ui/modules/events-board.js +73 -23
  59. package/ui/modules/events-click.js +16 -0
  60. package/ui/modules/file-preview.js +89 -0
  61. package/ui/modules/global-pages.js +138 -10
  62. package/ui/modules/modal-forms.js +8 -9
  63. package/ui/modules/modal-layer.js +2 -0
  64. package/ui/modules/settings.js +51 -9
  65. package/ui/modules/state.js +2 -0
  66. package/ui/modules/tasks.js +20 -0
  67. package/ui/modules/util.js +39 -0
  68. package/ui/styles/base.css +13 -13
  69. package/ui/styles/chat-cards.css +28 -0
  70. package/ui/styles/frame.css +27 -3
  71. package/ui/styles/global-config.css +28 -3
  72. package/ui/styles/surfaces.css +2 -0
@@ -179,7 +179,6 @@ function renderRunLimitsCard() {
179
179
  const stallValue = savedStall !== '' ? savedStall : String(limits.stallTimeoutMinutes ?? 30)
180
180
  // 验收滞留阈值(DSHBOTS-235):未保存回填生效值;'0'(关闭守门)同样合法不短路。
181
181
  const reviewIdleValue = savedReviewIdle !== '' ? savedReviewIdle : String(limits.reviewIdleMinutes ?? 30)
182
- const autoCloseOn = savedAutoClose !== '0'
183
182
  const envNames = [
184
183
  limits.runTimeoutEnv ? 'DSH_TEAM_RUN_TIMEOUT_MS' : '',
185
184
  limits.stallTimeoutEnv ? 'DSH_TEAM_STALL_TIMEOUT_MS' : '',
@@ -207,8 +206,9 @@ function renderRunLimitsCard() {
207
206
  <div class="field"><label id="settings-review-idle-label" for="settings-review-idle">${t('global.reviewIdleLabel')}</label><input class="input mono" style="text-align:right" type="number" min="0" max="1440" id="settings-review-idle" name="review_idle_minutes" value="${attr(reviewIdleValue)}"></div>
208
207
  <div class="field"><label id="settings-review-auto-close-label" for="settings-review-auto-close">${t('global.reviewAutoCloseLabel')}</label>
209
208
  <select class="select" id="settings-review-auto-close" name="review_auto_close">
210
- <option value="1" ${autoCloseOn ? 'selected' : ''}>${t('global.on')}</option>
211
- <option value="0" ${!autoCloseOn ? 'selected' : ''}>${t('global.off')}</option>
209
+ <option value="1" ${settings.review_auto_close === '1' ? 'selected' : ''}>${t('global.on')}</option>
210
+ <option value="observe" ${settings.review_auto_close === 'observe' ? 'selected' : ''}>${t('global.observe')}</option>
211
+ <option value="0" ${settings.review_auto_close === '0' ? 'selected' : ''}>${t('global.off')}</option>
212
212
  </select>
213
213
  </div>
214
214
  </div>
@@ -222,6 +222,46 @@ function renderRunLimitsCard() {
222
222
  </div>`
223
223
  }
224
224
 
225
+ // 团队指令段(B1/DSHBOTS-324):四段可编辑提示词的查看与编辑。
226
+ // defaultChanged 徽标提示「内置默认已升级」;保存即经后端预算校验(拆卡三段 ≤1200),
227
+ // 改动只对之后启动的会话生效(identity 段随会话冻结,进行中会话不唤醒)。
228
+ const PROMPT_SEGMENT_LABEL_KEYS = {
229
+ communication: 'global.promptSegCommunication',
230
+ subtask: 'global.promptSegSubtask',
231
+ splitting: 'global.promptSegSplitting',
232
+ selfcheck: 'global.promptSegSelfcheck',
233
+ }
234
+ const PROMPT_SEGMENT_HINT_KEYS = {
235
+ communication: 'global.promptSegCommunicationHint',
236
+ subtask: 'global.promptSegSubtaskHint',
237
+ splitting: 'global.promptSegSplittingHint',
238
+ selfcheck: 'global.promptSegSelfcheckHint',
239
+ }
240
+ function renderPromptSegmentsCard() {
241
+ const segments = state.data.promptSegments ?? []
242
+ if (!segments.length) return ''
243
+ return `
244
+ <div class="card form-card g-card">
245
+ <div class="card-head"><h3>${t('global.promptSegmentsTitle')}</h3><span class="meta">${t('global.promptSegmentsMeta')}</span></div>
246
+ ${segments.map(segment => `
247
+ <div class="field" style="margin-top:12px">
248
+ <label for="prompt-seg-${attr(segment.key)}">${t(PROMPT_SEGMENT_LABEL_KEYS[segment.key] ?? '')}
249
+ ${segment.override ? `<span class="unread-badge">${t('global.promptSegCustom')}</span>` : ''}
250
+ ${segment.defaultChanged ? `<span class="unread-badge">${t('global.promptSegDefaultChanged')}</span>` : ''}
251
+ </label>
252
+ <textarea class="input" id="prompt-seg-${attr(segment.key)}" rows="4" style="min-height:72px;font:inherit">${esc(segment.effectiveText ?? '')}</textarea>
253
+ <div class="hint">${t(PROMPT_SEGMENT_HINT_KEYS[segment.key] ?? '')}</div>
254
+ <div class="btn-row" style="margin-top:8px">
255
+ <button class="btn small" type="button" data-action="save-prompt-segment" data-segment="${attr(segment.key)}">${t('global.save')}</button>
256
+ <button class="btn small" type="button" data-action="reset-prompt-segment" data-segment="${attr(segment.key)}"${segment.override ? '' : ' disabled'}>${t('global.promptSegReset')}</button>
257
+ </div>
258
+ </div>`).join('')}
259
+ <div class="hint">${t('global.promptSegmentsHint')}</div>
260
+ </div>`
261
+ }
262
+
263
+ // 设置变更历史(A4/DSHBOTS-330):audit_log 只读视图的呈现——回答「谁在什么时候改了什么」。
264
+ // 只回看不代恢复:历史行是增量 patch,恢复语义 = 按行内值手动重存(revision 闸兜并发)。
225
265
  function renderOpsCard() {
226
266
  const settings = state.data.settings ?? {}
227
267
  const currency = settings.budget_currency || 'CNY'
@@ -271,7 +311,6 @@ function dshPathsCard() {
271
311
  <div class="path-row"><span>${t('global.pathWorkspace')}</span>${pathCode(tildePath(paths.workspace))}${copyPath(paths.workspace)}</div>
272
312
  <div class="path-row"><span>${t('global.pathSkills')}</span>${pathCode(paths.skillRoot)}${copyPath(paths.skillRoot)}</div>
273
313
  <div class="path-row"><span>${t('global.pathData')}</span>${pathCode(paths.dataDir)}${copyPath(paths.dataDir)}</div>
274
- <div class="hint">${t('global.dshPathsHint')}</div>
275
314
  </div>`
276
315
  }
277
316
 
@@ -284,7 +323,7 @@ function versionRow(labelKey, value) {
284
323
  : ''
285
324
  }
286
325
 
287
- // DSH 服务卡:版本检查 + 投递失败提示(投递失败 kv 落在本卡尾部)。
326
+ // DSH 服务卡:版本检查。
288
327
  function dshServiceCard() {
289
328
  const data = state.data
290
329
  // @ts-ignore 「DSH 服务」卡检查结果:loadState 只换 state.data,dshUpdate 存这里不被轮询盖掉。
@@ -294,7 +333,6 @@ function dshServiceCard() {
294
333
  : available
295
334
  ? `<strong>${esc(latest)} <span class="pill amber">${t('可升级')}</span></strong>`
296
335
  : `<strong>${esc(latest)} <span class="pill green">${t('global.latest')}</span></strong>`
297
- const outbox = data.outbox ?? { pending: 0, failed: 0, delivered: 0 }
298
336
  return `
299
337
  <div class="card form-card g-card">
300
338
  <div class="card-head">
@@ -305,7 +343,6 @@ function dshServiceCard() {
305
343
  <div class="kv"><span>${t('global.dshLatestVersion')}</span>${latestCell(update?.latest, update?.updateAvailable)}</div>
306
344
  ${versionRow('global.pluginCurrentVersion', data.pluginVersion)}
307
345
  <div class="kv"><span>${t('global.pluginLatestVersion')}</span>${latestCell(update?.pluginLatest, update?.pluginUpdateAvailable)}</div>
308
- ${Number(outbox.failed ?? 0) > 0 ? `<div class="kv" style="margin-top:12px"><span>${t('global.outboxQueue')}</span><strong>${t('global.outboxFailed', { count: outbox.failed })}</strong></div>` : ''}
309
346
  </div>`
310
347
  }
311
348
 
@@ -391,6 +428,7 @@ function renderGlobal() {
391
428
  pageNav([
392
429
  { id: 'g-pref', label: t('global.groupPref') },
393
430
  { id: 'g-runtime', label: t('global.groupRuntime') },
431
+ { id: 'g-prompts', label: t('global.groupPrompts') },
394
432
  { id: 'g-about', label: t('global.groupAbout') },
395
433
  ], t('global.navLabel')),
396
434
  [
@@ -446,11 +484,15 @@ function renderGlobal() {
446
484
  body: `${slot('half', renderRunLimitsCard())}${slot('half', renderOpsCard())}`,
447
485
  }),
448
486
  pageSection({
449
- index: '03', id: 'g-about', title: t('global.groupAbout'), desc: t('global.groupAboutDesc'),
487
+ index: '03', id: 'g-prompts', title: t('global.groupPrompts'), desc: t('global.groupPromptsDesc'),
488
+ body: slot('full', renderPromptSegmentsCard()),
489
+ }),
490
+ pageSection({
491
+ index: '04', id: 'g-about', title: t('global.groupAbout'), desc: t('global.groupAboutDesc'),
450
492
  body: `${slot('half', dshPathsCard())}${slot('half', dshServiceCard())}`,
451
493
  }),
452
494
  ],
453
495
  )
454
496
  }
455
497
 
456
- export { renderUsageGlobal, renderUsageDomain, renderUsageSolo, renderRunLimitsCard, renderOpsCard, renderSettings, currentScale, renderGlobal }
498
+ export { renderUsageGlobal, renderUsageDomain, renderUsageSolo, renderRunLimitsCard, renderOpsCard, renderPromptSegmentsCard, renderSettings, currentScale, renderGlobal }
@@ -26,6 +26,8 @@ export const state = {
26
26
  // 折叠面板(<details data-panel>)展开态的 key 集合,toggle 时增删;render 全量重建后据此恢复 open 属性。
27
27
  // 任务面板的分组(task-group:<status>)与子任务(task-children:<taskId>)也走这套 key(DSHBOTS-58)。
28
28
  openPanels: new Set(),
29
+ // 连续系统通知折叠的展开态(B8/DSHBOTS-336):组键=首条消息 id,跨轮询稳定。
30
+ expandedCollapses: new Set(),
29
31
  // 顶部「待处理审批」条(DSHBOTS-102):跨项目 pending 聚合;approvalPanelOpen 是明细面板展开态,
30
32
  // approvalDeciding 是正在决策的 approval id 集合(决策中禁用按钮,防重复点击)。
31
33
  approvalPanelOpen: false,
@@ -3,6 +3,7 @@ import { icon } from './icons.js'
3
3
  import { activeProject, actorLabel, attr, avatar, botById, canaryText, duration, esc, evaluationText, formatCost, formatNumber, formatTime, inSoloContext, memberRunDot, memorySource, pageProject, proposalPreview, runDot, tildePath, timeAgo } from './util.js'
4
4
  import { api } from './api.js'
5
5
  import { t } from './i18n.js'
6
+ import { isPreviewableText, deliverableFileUrl } from './file-preview.js'
6
7
  import { refresh, startTerminalPoll, panelAttrs, render, noProject } from '../app.js'
7
8
 
8
9
  // task-sort:start —— 任务面板排序的纯逻辑(tests/task-sort.test.js 按本标记块抽取断言)。
@@ -774,4 +775,23 @@ export function taskUsageBlock(usage) {
774
775
  <div class="divider"></div>`
775
776
  }
776
777
 
778
+ // 交付产物块(DSHBOTS-345 复盘):卡面声明的交付文件路径,核验按路径直接读文件;未声明不渲染。
779
+ // 文本型 chip 可点开应用内预览(DSHBOTS-347),其余保持纯文字。
780
+ export function taskDeliverablesBlock(task) {
781
+ const deliverables = Array.isArray(task?.deliverables) ? task.deliverables.filter(item => typeof item === 'string' && item) : []
782
+ if (!deliverables.length) return ''
783
+ const projectId = String(task?.project_id ?? pageProject()?.id ?? '')
784
+ const chip = (path) => {
785
+ const url = isPreviewableText(path) ? deliverableFileUrl(projectId, path) : null
786
+ return url
787
+ ? `<button type="button" class="approval-chip mono" data-action="preview-file" data-url="${attr(url)}" data-path="${attr(path)}" title="${attr(path)}">${esc(path)}</button>`
788
+ : `<span class="approval-chip mono" title="${attr(path)}">${esc(path)}</span>`
789
+ }
790
+ return `<div class="scope-block">
791
+ <div class="eyebrow" style="margin-bottom:6px">${t("交付产物")}</div>
792
+ <div class="scope-chips">${deliverables.map(chip).join('')}</div>
793
+ <div class="hint" style="margin-top:6px">${t("核验按路径直接读文件;交付报告只引用路径,不复述正文。")}</div>
794
+ </div>`
795
+ }
796
+
777
797
  export { renderTasks, taskGroupKey, taskChildrenKey, terminalOutputText, renderTerminal, renderBotsOverview, renderMembers, renderSkills, searchMemories, renderMemory, currentSkillVersion, skillVersions, renderEvolution }
@@ -13,6 +13,45 @@ export function applyUiTheme(value) {
13
13
  else document.documentElement.setAttribute('data-theme', theme)
14
14
  return theme
15
15
  }
16
+
17
+ // color-scheme:start —— 深/浅色判定唯一出口(DSHBOTS-349/351)。
18
+ // 宿主深色不走媒体查询(WebView 的 prefers-color-scheme 失真恒报 light),而是给
19
+ // 同源祖先文档 body 打 data-ds-dark-theme:嵌入态自直接父逐层上溯到 window.top,
20
+ // 任一祖先带属性才判 dark;祖先链全程无属性、跨源访问异常与独立态一律回落系统
21
+ // 媒体查询——单一层级信号失真不再绝对压过系统偏好。
22
+ export function resolveColorScheme() {
23
+ try {
24
+ for (let current = window.parent; current && current !== window; current = current.parent) {
25
+ if (current.document.body.hasAttribute('data-ds-dark-theme')) return 'dark'
26
+ if (current === window.top) break
27
+ }
28
+ } catch { /* 跨源祖先不可读:回落系统媒体查询 */ }
29
+ return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
30
+ }
31
+
32
+ export function applyColorScheme() {
33
+ const scheme = resolveColorScheme()
34
+ document.documentElement.setAttribute('data-color-scheme', scheme)
35
+ document.documentElement.style.colorScheme = scheme
36
+ return scheme
37
+ }
38
+
39
+ // 宿主切换深浅时实时跟随:观察祖先链各层 body 的主题属性变化 + 自身媒体查询变化。
40
+ export function initColorScheme() {
41
+ applyColorScheme()
42
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', applyColorScheme)
43
+ try {
44
+ const observer = new MutationObserver(applyColorScheme)
45
+ for (let current = window.parent; current && current !== window; current = current.parent) {
46
+ observer.observe(current.document.body, {
47
+ attributes: true,
48
+ attributeFilter: ['data-ds-dark-theme'],
49
+ })
50
+ if (current === window.top) break
51
+ }
52
+ } catch { /* 跨源宿主:仅跟媒体查询 */ }
53
+ }
54
+ // color-scheme:end
16
55
  export const esc = (value) => String(value ?? '')
17
56
  .replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;')
18
57
  .replaceAll('"', '&quot;').replaceAll("'", '&#39;')
@@ -108,15 +108,18 @@
108
108
  /* legacy aliases used by inline styles in app.js */
109
109
  }
110
110
 
111
- @media (prefers-color-scheme: dark) {
112
- .card,
113
- .side-card {
114
- box-shadow:
115
- var(--shadow-1),
116
- inset 0 1px 0 rgba(255, 255, 255, 0.05);
117
- }
118
- :root {
119
- color-scheme: dark;
111
+ /* 深色由 :root[data-color-scheme="dark"] 承载(DSHBOTS-349):宿主深色不走媒体查询
112
+ (其 WebView 的 prefers-color-scheme 失真恒报 light),而是给同源父文档 body 打
113
+ data-ds-dark-theme——util.ts resolveColorScheme() 据此同步本属性,嵌入态实时
114
+ 跟随宿主深浅,独立态与跨源异常回落系统媒体查询。 */
115
+ :root[data-color-scheme="dark"] .card,
116
+ :root[data-color-scheme="dark"] .side-card {
117
+ box-shadow:
118
+ var(--shadow-1),
119
+ inset 0 1px 0 rgba(255, 255, 255, 0.05);
120
+ }
121
+ :root[data-color-scheme="dark"] {
122
+ color-scheme: dark;
120
123
  --bg: #101219;
121
124
  --surface: #191b26;
122
125
  --surface-2: #21242f;
@@ -158,7 +161,6 @@
158
161
  0 2px 12px -2px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
159
162
  --shadow-3:
160
163
  0 28px 64px -12px rgba(0, 0, 0, 0.62), 0 2px 10px rgba(0, 0, 0, 0.4);
161
- }
162
164
  }
163
165
 
164
166
  /* Palette option: Catppuccin (Latte in light mode, Macchiato in dark mode).
@@ -205,8 +207,7 @@
205
207
  0 2px 8px rgba(76, 79, 105, 0.07);
206
208
  }
207
209
 
208
- @media (prefers-color-scheme: dark) {
209
- :root[data-theme="catppuccin"] {
210
+ :root[data-color-scheme="dark"][data-theme="catppuccin"] {
210
211
  --bg: #181926;
211
212
  --surface: #24273a;
212
213
  --surface-2: #363a4f;
@@ -246,7 +247,6 @@
246
247
  0 2px 12px -2px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
247
248
  --shadow-3:
248
249
  0 28px 64px -12px rgba(0, 0, 0, 0.62), 0 2px 10px rgba(0, 0, 0, 0.4);
249
- }
250
250
  }
251
251
 
252
252
  * {
@@ -183,6 +183,34 @@
183
183
  gap: 8px;
184
184
  }
185
185
  .approval-menu-empty { padding: 8px 10px; color: var(--ink-3); font-size: var(--fs-small); }
186
+ /* 连续系统通知折叠行(B8/DSHBOTS-336):Quiet by default——≥3 条连续系统通知折叠为一行,
187
+ 展开态按组键存 state.expandedCollapses(跨轮询持久),bot/user 消息不折叠。 */
188
+ .msg-collapse-row {
189
+ display: flex;
190
+ align-items: center;
191
+ gap: 8px;
192
+ width: 100%;
193
+ padding: 6px 12px;
194
+ margin: 4px 0;
195
+ border: 1px dashed var(--line);
196
+ border-radius: 8px;
197
+ background: transparent;
198
+ color: var(--ink-3);
199
+ font: 500 var(--fs-small) var(--sans);
200
+ cursor: pointer;
201
+ text-align: left;
202
+ }
203
+ .msg-collapse-row:hover { border-color: var(--line-2); color: var(--ink); }
204
+ /* chevron 图标必须显式约束尺寸:icon() 产出的 svg 只有 viewBox,无 width/height 属性时
205
+ 按 replaced element 默认尺寸(约 300×150)渲染,会把折叠行撑破群聊时间线。 */
206
+ .msg-collapse-row > svg { flex: 0 0 auto; width: 12px; height: 12px; }
207
+ .msg-collapse-last {
208
+ flex: 1 1 auto;
209
+ min-width: 0;
210
+ overflow: hidden;
211
+ text-overflow: ellipsis;
212
+ white-space: nowrap;
213
+ }
186
214
  /* 来源定位行(DSHBOTS-240):顶部跨会话审批通知的卡片多一行「来源群聊(项目名/KEY)+ 任务 ID/任务名」,
187
215
  让 owner 不跳转即可判断该批谁。群聊卡片不带这些字段,不渲染该行。 */
188
216
  .approval-source {
@@ -271,6 +271,28 @@
271
271
  flex-direction: column;
272
272
  gap: 4px;
273
273
  }
274
+ /* 用户需办气泡(DSHBOTS-339):侧栏「总览bots」上方,问答/提权审批/进化审批三类
275
+ 需用户干预事项的常驻信号;全 0 不渲染。点击复用顶部窄条展开/进化页导航。 */
276
+ .sidebar-bubbles {
277
+ display: flex;
278
+ flex-wrap: wrap;
279
+ gap: 6px;
280
+ padding: 0 4px 2px;
281
+ }
282
+ .sidebar-bubble {
283
+ display: inline-flex;
284
+ align-items: center;
285
+ gap: 6px;
286
+ padding: 3px 9px;
287
+ border: 1px solid var(--line);
288
+ border-radius: 999px;
289
+ background: var(--star-wash);
290
+ color: var(--ink);
291
+ font-size: var(--fs-small);
292
+ cursor: pointer;
293
+ }
294
+ .sidebar-bubble:hover { border-color: var(--line-2); }
295
+ .sidebar-bubble .unread-badge { margin-left: 0; }
274
296
  .global-config {
275
297
  width: 100%;
276
298
  display: flex;
@@ -306,14 +328,16 @@
306
328
  color: var(--accent-text);
307
329
  opacity: 1;
308
330
  }
309
- /* 链接复用 global-config 按钮形态(DSH 原生界面切换入口) */
331
+ /* 链接复用 global-config 按钮形态(DSH 原生界面切换入口、GitHub star 外链) */
310
332
  a.global-config {
311
333
  text-decoration: none;
312
334
  }
313
- a.global-config.dsh-official-link {
335
+ a.global-config.dsh-official-link,
336
+ a.global-config.github-star-link {
314
337
  color: var(--ink-3);
315
338
  }
316
- a.global-config.dsh-official-link:hover {
339
+ a.global-config.dsh-official-link:hover,
340
+ a.global-config.github-star-link:hover {
317
341
  color: var(--ink);
318
342
  }
319
343
 
@@ -180,26 +180,51 @@
180
180
  flex: 1 1 auto;
181
181
  min-width: 0;
182
182
  }
183
- .wechat-status {
183
+ /* 状态行与管理员标识:微信/飞书两卡同款(并列选择器,样式零重复) */
184
+ .wechat-status,
185
+ .feishu-status {
184
186
  display: flex;
185
187
  align-items: center;
186
188
  gap: 12px;
187
189
  flex-wrap: wrap;
188
190
  margin-bottom: 12px;
189
191
  }
190
- .wechat-admin {
192
+ .wechat-admin,
193
+ .feishu-admin {
191
194
  color: var(--ink-3);
192
195
  font-size: var(--fs-small);
193
196
  }
194
- .wechat-admin strong {
197
+ .wechat-admin strong,
198
+ .feishu-admin strong {
195
199
  color: var(--ink);
196
200
  font-family: var(--mono);
197
201
  font-weight: 500;
202
+ display: inline-block;
203
+ max-width: min(220px, 50vw);
204
+ overflow: hidden;
205
+ text-overflow: ellipsis;
206
+ white-space: nowrap;
207
+ vertical-align: bottom;
198
208
  }
199
209
  .wechat-card .wechat-qr {
200
210
  flex: 0 0 auto;
201
211
  }
202
212
 
213
+ /* ---------- 飞书通道卡:元信息行 + 冲突警示(无扫码区) ---------- */
214
+ .feishu-meta {
215
+ display: flex;
216
+ flex-wrap: wrap;
217
+ gap: 6px 20px;
218
+ color: var(--ink-3);
219
+ font-size: var(--fs-small);
220
+ }
221
+ .feishu-conflict {
222
+ color: var(--star);
223
+ }
224
+ .feishu-error {
225
+ color: var(--danger);
226
+ }
227
+
203
228
  /* ---------- 界面卡内部:字段两列 + 底部条 ---------- */
204
229
  .g-fields {
205
230
  display: grid;
@@ -10,6 +10,8 @@
10
10
  align-items: center;
11
11
  justify-content: space-between;
12
12
  gap: 12px;
13
+ /* 窄窗口下标题与按钮组放不下时换行,而不是溢出被 .list-card 的 overflow:hidden 裁掉 */
14
+ flex-wrap: wrap;
13
15
  margin-bottom: 12px;
14
16
  }
15
17
  .card-head h3 {