Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(bots): 登记隐藏任务的无框点击并去掉超时掩盖
xuzini-xzne3d391831b2d
diff --git a/apps/desktop/scripts/fixtures/wechat-companion/ui-page.mjs b/apps/desktop/scripts/fixtures/wechat-companion/ui-page.mjsindex 119d8fb6a7..05a1d6e213 100644--- a/apps/desktop/scripts/fixtures/wechat-companion/ui-page.mjs+++ b/apps/desktop/scripts/fixtures/wechat-companion/ui-page.mjs@@ -1,3 +1,5 @@+import assert from 'node:assert/strict';+export default {name: 'wechat-companion',entry: './wechat-companion-fixture.tsx',@@ -16,7 +18,23 @@ export default {if (ui.data.hiddenIm) {await page.locator('[title="拉拉, 徐紫旎, 姚刘浏"]').waitFor({ state: 'visible' });const row = page.locator('button').filter({ hasText: '8c9b5c' });- if (await row.count()) await row.focus();+ await row.waitFor({ state: 'visible' });+ const resting = await row.evaluate((el) => getComputedStyle(el).boxShadow);+ assert.equal(resting, 'none', 'hidden record stays frameless at rest');+ // Programmatic focus does not match :focus-visible; request the keyboard treatment.+ await row.evaluate((el) => el.focus({ focusVisible: true }));+ const focused = await row.evaluate((el) => {+ const style = getComputedStyle(el);+ return {+ visible: el.matches(':focus-visible'),+ boxShadow: style.boxShadow,+ outlineStyle: style.outlineStyle,+ };+ });+ assert.equal(focused.visible, true, 'keyboard focus must match :focus-visible');+ assert.notEqual(focused.boxShadow, 'none', 'focus ring must survive the global outline suppression');+ assert.equal(focused.outlineStyle, 'none');+ await row.evaluate((el) => el.blur());} else {await page.locator('#companion-im-wechat-trigger').click();}diff --git a/apps/desktop/src/renderer/features/bots/__tests__/botChannelsPage.test.tsx b/apps/desktop/src/renderer/features/bots/__tests__/botChannelsPage.test.tsxindex 1e980053f0..bb93382922 100644--- a/apps/desktop/src/renderer/features/bots/__tests__/botChannelsPage.test.tsx+++ b/apps/desktop/src/renderer/features/bots/__tests__/botChannelsPage.test.tsx@@ -113,9 +113,6 @@ describe('BotChannelsPage', () => {for (const lane of lanes) {const name = lane.kind === 'owner-dm' ? 'bots.channels.lanes.ownerName' : lane.name;const open = await screen.findByRole('button', { name: new RegExp(`^${name}`) });- // globals.css 会用 outline:none !important 盖掉非输入控件的描边,键盘焦点必须走 ring。- expect(open.className).toContain('focus-visible:ring-2');- expect(open.className).not.toContain('focus-visible:outline');fireEvent.click(open);expect(mocks.navigate).toHaveBeenLastCalledWith(`/bots/bot%2F1/history/${encodeURIComponent(lane.sessionId)}`);}diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex 9a5d720655..0172308dd9 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -637,6 +637,22 @@ The registration covers only the collapsed outer frame; the inner buttons retaincontrol-tier treatment. Keep semantic surface/border/text colors in both Light and Dark.It does not authorize pill-shaped toolbars or other status panels.+### Desktop hidden channel records++`BotChannelsPage` lists each connection's hidden channel tasks. The record name and+summary are one narrowly scoped bare-text control: resting, hover and pressed states+keep the existing text block (12px `--text-primary` name, 11px `--text-tertiary` meta,+no fill, border, radius or added padding). Making that existing text open the read-only+history page does not assign a pill frame or change task state. The separate restart+action remains the registered compact secondary Button and is outside this exemption.+This records the accepted quiet list, not a general exemption for settings actions.++Keyboard focus uses the theme-invariant `--focus-ring` as a `focus-visible` box-shadow+ring. Non-input `outline` is suppressed globally, so an outline class is not a visible+focus treatment here. The ring appears only for keyboard focus and does not create an+ordinary control frame (§5). The single-page comparison showed no resting-pixel change;+this registration does not claim a new client screenshot of the keyboard ring.+### About: harness versionsEach harness occupies one compact row. Pi shows the executable's actual version and a short@@ -767,7 +783,7 @@ Ordinary control frames, containers and inner-control surfaces not covered by St**A layer with no frame or surface to round needs no corner-radius assignment.** This does not authorize a control to discard its prescribed frame treatment merely by omitting a fill or border. A transient hover or pressed surface on an ordinary control remains that control's frame and takes its assigned tier.-**A focus or selection indicator is a separate visual treatment.** Its appearance alone does not create a new ordinary control frame or reclassify the associated layer. Registered bare-text buttons (wizard back-navigation "← 上一步", the §16.3 login text-button category) remain frameless and retain their visible focus treatment; new bare-text-button usages must still be registered in the introducing component entry.+**A focus or selection indicator is a separate visual treatment.** Its appearance alone does not create a new ordinary control frame or reclassify the associated layer. Registered bare-text buttons (wizard back-navigation "← 上一步", the §16.3 login text-button category, and the hidden-channel record text in the §4 Desktop hidden channel records entry) remain frameless and retain their visible focus treatment; new bare-text-button usages must still be registered in the introducing component entry.Evaluate the approved component treatment across its states, including shared styles and pseudo-elements. **The absence of a local background or border class is not evidence of frameless status.**diff --git a/docs/design-rules/design-decision-log.md b/docs/design-rules/design-decision-log.mdindex f5a5914ca1..fbedce2ef5 100644--- a/docs/design-rules/design-decision-log.md+++ b/docs/design-rules/design-decision-log.md@@ -12,6 +12,8 @@## 2026-10+- **10-22 消息平台隐藏任务记录登记为无框文字点击层**——用户要求点击记录进入只读详情,并保留列表原有样式;中国大陆版 macOS 测试包已验收。现行:`BotChannelsPage` 的记录名称与摘要是一处窄口径无框文字控件,静止、悬停和按下都不加底、边框或圆角;「重新开始」仍是已登记的紧凑次要按钮,不属于该豁免。键盘焦点用 `--focus-ring` 的 box-shadow ring,因为全局规则会抹掉非输入控件的 outline。这不是设置页其他操作的通用豁免,也不新增键盘焦点的实机截图结论。落点:DESIGN.md §4 Desktop hidden channel records、§5 已登记无框按钮例外。+- **10-21 群聊话题未读沿用伙伴未读蓝点**——用户确认 r4 独立话题原型(话题入口「N 条新回复」「@你」、输入框上方右下角的话题提示与本群话题列表、话题面板「新回复」分隔线)。原型里未读字用蓝色;为守住「近乎全灰」规则,实现只把伙伴未读 token `--bot-unread-bg` 用在 6px 圆点上,旁边文字保持 `--text-primary` 中粗。`DESIGN.md §2 Bot Unread Badge` 的作用域加上这四处话题未读标记,仅限圆点、不作文字色。提示是普通按钮(胶囊档)、列表是普通容器(12px、行 8px),不新增登记形状。现行规则见 `bot-group-chat.md §10「话题未读与提示」`。- **10-20 Desktop 群聊进行中胶囊登记**——[#6549](https://github.com/makecindy/cindy/pull/6549) 的群聊设计采用输入框上方居中、按内容宽的进行中胶囊,展开过程时转为面板。补齐 `DESIGN.md §5` 的具体形状登记与 §4 组件条目,使其与 `bot-group-chat.md §5` 一致:登记仅覆盖 `BotGroupProgressStrip` 收起时承载状态与独立操作的外层可见框;展开面板、内部按钮和其它工具栏不继承此例外。本次只补文档,不改变实现或视觉,也不新增实机验收结论。diff --git a/packages/maker-core/src/agents/pi/__tests__/pi-startsession-cleanup.test.ts b/packages/maker-core/src/agents/pi/__tests__/pi-startsession-cleanup.test.tsindex 944cdf4af1..7f34618782 100644--- a/packages/maker-core/src/agents/pi/__tests__/pi-startsession-cleanup.test.ts+++ b/packages/maker-core/src/agents/pi/__tests__/pi-startsession-cleanup.test.ts@@ -144,9 +144,6 @@ const noopLogger: Logger = {// Durable approval assertions allow 3s for the 500ms poll and asynchronous delivery.// The default 1s wait races the second poll on loaded CI runners; permission assertions stay exact.// The same durable store feeds streaming foreground discovery and detached lease inspection.-// The default 5s test timeout can abort that 3s wait on a loaded Windows runner-// before Vitest reports the assertion (observed 5157ms, no assertion).-if (process.platform === 'win32') vi.setConfig({ testTimeout: 20_000, hookTimeout: 20_000 });function mockRunDiscovery() {const list = vi.spyOn(piSubagentRuns, 'listPiSubagentRuns');vi.spyOn(piSubagentRuns, 'scanPiSubagentRuns').mockImplementation(async function* (root) {