Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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

- `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.

## Pull request

- [PR #1738](https://github.com/LodyAI/Lody/pull/1738) (draft).
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 侧栏连接加载状态沿用工作标记

Status: implemented
Translation: current

[English](2026-10-20-sidebar-connection-working-mark.md)

## 摘要

侧栏连接状态胶囊使用旋转圆环,会话行却使用侧栏统一的 3×3 工作标记,导致两种进行中的状态看起来不一致。现在 `ConnectionPill` 改用相同的 `WorkingGrid`,尺寸仍为 12px,并保留原有运行色调和无障碍标签。该方格动画已用于侧栏且支持合成器播放;本次不把它扩展到其他界面。

## 决策

- 侧栏连接胶囊的加载、重连和同步状态使用 `WorkingGrid`,与正在工作的会话标记一致。
- 保留现有 12px 尺寸、徽标色调和 `aria-label`;离线状态仍显示无图标的静态危险样式。

## 验证

- `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` 通过。

## Pull request

- [PR #1738](https://github.com/LodyAI/Lody/pull/1738)(草稿)。
4 changes: 2 additions & 2 deletions packages/components/src/components/loro-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand Down Expand Up @@ -494,7 +494,7 @@ function ConnectionPill({
return (
<Badge
tone={isLoading ? 'running' : 'danger'}
icon={isLoading ? <Spinner className="h-3 w-3" label={null} /> : undefined}
icon={isLoading ? <WorkingGrid className="h-3 w-3" /> : undefined}
aria-label={label}
data-workspace-status={state}
>
Expand Down
2 changes: 2 additions & 0 deletions packages/components/tests/workspace-identity.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand Down
Loading