From 06f09887f404aa89a79f2bd7a4b3a9ea33be7aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E7=81=AF?= Date: Tue, 20 Oct 2026 02:54:27 +0800 Subject: [PATCH 1/3] fix: align sidebar connection loading mark Model: gpt-6 --- ...6-10-20-sidebar-connection-working-mark.md | 34 +++++++++++++++++++ ...0-20-sidebar-connection-working-mark.zh.md | 25 ++++++++++++++ .../src/components/loro-sidebar.tsx | 4 +-- 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md create mode 100644 .agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md diff --git a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md new file mode 100644 index 000000000..60c3e50d8 --- /dev/null +++ b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md @@ -0,0 +1,34 @@ +# Use the sidebar working mark for connection loading + +Status: implemented +Translation: current + +[中文](2026-10-20-sidebar-connection-working-mark.zh.md) + +## Abstract + +The sidebar connection pill used a rotating ring while session rows used the +sidebar's shared 3×3 working mark, making two active states look unrelated. +`ConnectionPill` now uses the same `WorkingGrid` at its existing 12px size and +keeps the pill's running tone and accessible label. The grid already belongs to +the sidebar and preserves its compositor-friendly animation; this change does +not extend it to other surfaces. + +## Decision + +- Use `WorkingGrid` for loading, reconnecting and syncing states in the sidebar + connection pill, matching the mark used for active sidebar sessions. +- Keep the existing 12px footprint, badge tone, and `aria-label`; offline stays + a static danger state without an icon. + +## Verification + +- `git diff --check` passed. +- `pnpm check`, `pnpm format` and `pnpm run docs check` could not complete because + this nested worktree has no `node_modules`; required tools such as `tsgo` and + `oxfmt` are unavailable. The documentation check also reported existing + repository-wide status and `AGENTS.md` size findings. + +## Pull request + +- Pending. diff --git a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md new file mode 100644 index 000000000..224d8006d --- /dev/null +++ b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md @@ -0,0 +1,25 @@ +# 侧栏连接加载状态沿用工作标记 + +Status: implemented +Translation: current + +[English](2026-10-20-sidebar-connection-working-mark.md) + +## 摘要 + +侧栏连接状态胶囊使用旋转圆环,会话行却使用侧栏统一的 3×3 工作标记,导致两种进行中的状态看起来不一致。现在 `ConnectionPill` 改用相同的 `WorkingGrid`,尺寸仍为 12px,并保留原有运行色调和无障碍标签。该方格动画已用于侧栏且支持合成器播放;本次不把它扩展到其他界面。 + +## 决策 + +- 侧栏连接胶囊的加载、重连和同步状态使用 `WorkingGrid`,与正在工作的会话标记一致。 +- 保留现有 12px 尺寸、徽标色调和 `aria-label`;离线状态仍显示无图标的静态危险样式。 + +## 验证 + +- `git diff --check` 通过。 +- `pnpm check`、`pnpm format` 和 `pnpm run docs check` 因嵌套 worktree 缺少 + `node_modules` 而无法完成;所需的 `tsgo`、`oxfmt` 等工具不可用。文档检查还报告了仓库已有的状态和 `AGENTS.md` 体积问题。 + +## Pull request + +- 待创建。 diff --git a/packages/components/src/components/loro-sidebar.tsx b/packages/components/src/components/loro-sidebar.tsx index 735b90788..ff8b26b37 100644 --- a/packages/components/src/components/loro-sidebar.tsx +++ b/packages/components/src/components/loro-sidebar.tsx @@ -34,6 +34,7 @@ import { colors } from '@lody/ui/tokens/colors.stylex'; import { radius, space } from '@lody/ui/tokens/scales.stylex'; import { Kbd } from '@lody/ui/kbd'; import { Tooltip } from '@lody/ui/tooltip'; +import { WorkingGrid } from '@/ui/working-grid'; import { commands, formatKeyBinding, type ShortcutCommandId } from '@/lib/commands'; import { setCommandPaletteOpen } from '@/lib/commands/palette-state'; import { Menu } from '@/ui/menu'; @@ -60,7 +61,6 @@ import { } from 'lucide-react'; import { MynauiEditOne } from '@lody/ui'; import { CuidaSidebarExpandOutline } from './icons/cuida-sidebar-expand-outline'; -import { Spinner } from '@lody/ui/spinner'; import { SessionList, type SessionListProps, @@ -494,7 +494,7 @@ function ConnectionPill({ return ( : undefined} + icon={isLoading ? : undefined} aria-label={label} data-workspace-status={state} > From c06001003554654dbd52d1175da1f71b67c886f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E7=81=AF?= Date: Tue, 20 Oct 2026 02:55:01 +0800 Subject: [PATCH 2/3] docs: link sidebar status note to PR Model: gpt-6 --- .../bug-fix/2026-10-20-sidebar-connection-working-mark.md | 2 +- .../bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md index 60c3e50d8..473d129a5 100644 --- a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md +++ b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md @@ -31,4 +31,4 @@ not extend it to other surfaces. ## Pull request -- Pending. +- [PR #1738](https://github.com/LodyAI/Lody/pull/1738) (draft). diff --git a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md index 224d8006d..5efa21d6c 100644 --- a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md +++ b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md @@ -22,4 +22,4 @@ Translation: current ## Pull request -- 待创建。 +- [PR #1738](https://github.com/LodyAI/Lody/pull/1738)(草稿)。 From 7f78a240be67c0dabc447707692952fbc286d500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E7=81=AF?= Date: Tue, 20 Oct 2026 03:24:14 +0800 Subject: [PATCH 3/3] test: cover sidebar connection working mark Model: gpt-6 --- .../2026-10-20-sidebar-connection-working-mark.md | 10 ++++++---- .../2026-10-20-sidebar-connection-working-mark.zh.md | 7 +++++-- packages/components/tests/workspace-identity.test.tsx | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md index 473d129a5..894c2f11c 100644 --- a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md +++ b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.md @@ -23,11 +23,13 @@ not extend it to other surfaces. ## Verification +- `pnpm format` passed. `pnpm run docs check` passed with repository-wide + warnings about older notes without translations and `AGENTS.md` size. +- `pnpm check` passed typecheck, lint and Effect lint. Its `test:ci` phase failed + on unrelated five-second UI test timeouts and CLI tests. The focused + `workspace-identity.test.tsx` suite passed all 9 tests, including assertions + for the shared mark in syncing state and its absence offline. - `git diff --check` passed. -- `pnpm check`, `pnpm format` and `pnpm run docs check` could not complete because - this nested worktree has no `node_modules`; required tools such as `tsgo` and - `oxfmt` are unavailable. The documentation check also reported existing - repository-wide status and `AGENTS.md` size findings. ## Pull request diff --git a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md index 5efa21d6c..9f3bdc743 100644 --- a/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md +++ b/.agents/notes/implemented/bug-fix/2026-10-20-sidebar-connection-working-mark.zh.md @@ -16,9 +16,12 @@ Translation: current ## 验证 +- `pnpm format` 通过。`pnpm run docs check` 通过,但报告了仓库旧笔记缺少翻译和 + `AGENTS.md` 体积等全仓警告。 +- `pnpm check` 的类型检查、lint 和 Effect lint 均通过;`test:ci` 因无关的 UI + 测试五秒超时和 CLI 测试失败而未通过。针对性的 `workspace-identity.test.tsx` + 套件 9 项全通过,覆盖同步状态显示统一标记以及离线时不显示标记。 - `git diff --check` 通过。 -- `pnpm check`、`pnpm format` 和 `pnpm run docs check` 因嵌套 worktree 缺少 - `node_modules` 而无法完成;所需的 `tsgo`、`oxfmt` 等工具不可用。文档检查还报告了仓库已有的状态和 `AGENTS.md` 体积问题。 ## Pull request diff --git a/packages/components/tests/workspace-identity.test.tsx b/packages/components/tests/workspace-identity.test.tsx index 66dfa8aa4..8e7b8c68f 100644 --- a/packages/components/tests/workspace-identity.test.tsx +++ b/packages/components/tests/workspace-identity.test.tsx @@ -200,6 +200,7 @@ describe('workspace identity capability boundary', () => { const status = container?.querySelector('[data-workspace-status]'); expect(status?.getAttribute('data-workspace-status')).toBe('syncing'); expect(status?.textContent).toBe('Syncing target workspace…'); + expect(status?.querySelector('[data-working-grid]')).not.toBeNull(); }); it('keeps connection failures ahead of workspace synchronization', () => { @@ -215,6 +216,7 @@ describe('workspace identity capability boundary', () => { const status = container?.querySelector('[data-workspace-status]'); expect(status?.getAttribute('data-workspace-status')).toBe('offline'); expect(status?.textContent).toBe('No connection'); + expect(status?.querySelector('[data-working-grid]')).toBeNull(); }); it('supports a content-scoped loading placeholder without taking over the viewport', () => {