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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ Advances the first PersonaBot workflow with Assignment delivery, shared motion c

### Changed

- Many active Avatars now animate smoothly together: all transitions share one animation-frame loop, pixel-family tool transitions step at a pixel-art frame rate with merged color runs (`@botharness/pixel-morph` 0.2.0), and Avatars scrolled out of view skip transition work after updates, keeping 32 to 128 active mixed-family Avatars at full frame rate in measured runs ([#757](https://github.com/BotHarness/BotHarness/issues/757)).

- Made the packaged IM Provider qualification independent of developer selections and advanced its own artifact version for the accepted Slack capabilities ([IM installation](docs/product-im-installation.md), [#868](https://github.com/BotHarness/BotHarness/issues/868)).

- Bot Inbox sidebar rows now put readable content first, separate source/report metadata from lifecycle status, and highlight items needing repair using the native error color ([#851](https://github.com/BotHarness/BotHarness/issues/851)).
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@

### Changed

- 大量头像同时活动时更流畅:所有过渡共用一个动画帧循环,像素风格的工具切换按像素画帧率步进并合并同色像素(`@botharness/pixel-morph` 0.2.0),滚出视野的头像在状态更新后不再做过渡计算;实测 32 到 128 个混合风格的活动头像仍保持满帧([#757](https://github.com/BotHarness/BotHarness/issues/757))。

- 产品 IM Provider 采用独立固定的资格验证输入,并为已验收的 Slack 能力递增自身版本,避免开发版选择隐式改变产品产物([IM 安装指南](docs/product-im-installation.md)、[#868](https://github.com/BotHarness/BotHarness/issues/868))。

- Bot Inbox 侧栏以内容为先,分行展示来源、Report 信息与处理状态,并用原生错误色突出需要修复的项 ([#851](https://github.com/BotHarness/BotHarness/issues/851))。
Expand Down
Binary file added docs/evidence/issue-757/00-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/01-draft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/02-saved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/04-approval-pending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/05-working.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/06-reloaded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/07-disconnected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/08-restarted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/09-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/10-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/issue-757/11-mixed-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 139 additions & 0 deletions docs/evidence/issue-757/README.md

Large diffs are not rendered by default.

175 changes: 175 additions & 0 deletions docs/evidence/issue-757/harness/entry.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
import { createElement, useEffect, useState } from 'react';
import { createRoot, type Root } from 'react-dom/client';
import { PersonaBotAvatar } from '../../../../packages/client/src/client/avatar.js';
import {
AVATAR_PRESETS,
DEFAULT_ILLUSTRATED_RECIPE,
detailedAvatarRecipe,
} from '../../../../packages/core/src/bots/avatar-appearance.js';
import { LINE_PRESETS } from '../../../../packages/core/src/bots/avatar-line.js';
import { CSS } from '../../../../packages/client/src/client/styles.js';

const TOOLS = [
'read',
'grep',
'edit',
'bash',
'web_search',
'todo_write',
'ask_user_question',
'subagent',
];
const extreme = detailedAvatarRecipe({
...DEFAULT_ILLUSTRATED_RECIPE,
hair: 'twintails',
pose: 'right',
accessory: AVATAR_PRESETS[3]!.accessory,
});
const RECIPES = [
...AVATAR_PRESETS,
...LINE_PRESETS,
{ ...extreme, spacing: 1, height: -1, hairLength: 2 },
{ ...extreme, spacing: -1, height: 1, hairLength: -2, pose: 'left' as const },
];

interface Config {
count: number;
size: number;
sameBot: boolean;
intervalMs: number;
indicator?: boolean;
family?: 'line' | 'illustrated';
column?: boolean;
}

function Grid({ config }: { config: Config }) {
const [tick, setTick] = useState(0);
useEffect(() => {
if (!config.intervalMs) return;
const id = setInterval(() => setTick((t) => t + 1), config.intervalMs);
return () => clearInterval(id);
}, [config.intervalMs]);
return createElement(
'div',
config.column
? {
style: {
display: 'flex',
flexDirection: 'column',
gap: '6px',
padding: '6px',
width: '260px',
},
}
: { style: { display: 'flex', flexWrap: 'wrap', gap: '6px', padding: '6px' } },
Array.from({ length: config.count }, (_, i) => {
const pool = config.family ? RECIPES.filter((r) => r.family === config.family) : RECIPES;
const recipe = config.sameBot ? pool[0]! : pool[i % pool.length]!;
const phase = (tick + i) % (TOOLS.length + 2);
const state =
phase === TOOLS.length ? 'thinking' : phase === TOOLS.length + 1 ? 'idle' : 'working';
return createElement(PersonaBotAvatar, {
key: i,
personaBotId: config.sameBot ? 'same' : `bot-${i}`,
name: `Bot ${i}`,
appearance: { recipe, revision: 'a'.repeat(64) },
size: config.size,
indicator: config.indicator ?? false,
state,
...(state === 'working'
? {
activity: {
effect: 'generic-working' as const,
toolKind: 'other' as const,
toolName: TOOLS[phase]!,
startedAt: 0,
activeToolCount: 1,
},
}
: {}),
...(i % 5 === 0 ? { attention: { approvalCount: 1 } } : {}),
});
}),
);
}

const style = document.createElement('style');
style.textContent = CSS;
document.head.append(style);
let root: Root | undefined;
Object.assign(window, {
mountGrid(config: Config) {
root?.unmount();
const host = document.getElementById('app')!;
root = createRoot(host);
root.render(createElement(Grid, { config }));
},
unmountGrid() {
root?.unmount();
root = undefined;
},
});

function Sheet({ dark }: { dark: boolean }) {
const sizes = [18, 24, 40, 96];
const fg = dark ? '#e8e8e8' : '#222';
return createElement(
'div',
{
style: {
background: dark ? '#1b1b1f' : '#ffffff',
color: fg,
padding: '12px',
font: '12px system-ui',
},
},
createElement('div', { style: { marginBottom: '8px' } }, dark ? 'Dark' : 'Light'),
...sizes.map((size) =>
createElement(
'div',
{
key: size,
style: { display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '8px' },
},
createElement('span', { style: { width: '36px' } }, `${size}px`),
...RECIPES.map((recipe, i) =>
createElement(PersonaBotAvatar, {
key: i,
personaBotId: `s-${i}`,
name: `Bot ${i}`,
appearance: { recipe, revision: 'a'.repeat(64) },
size,
state: i % 3 === 1 ? 'working' : 'idle',
indicator: false,
...(i % 3 === 1
? {
activity: {
effect: 'generic-working' as const,
toolKind: 'other' as const,
toolName: TOOLS[i % TOOLS.length]!,
startedAt: 0,
activeToolCount: 1,
},
}
: {}),
}),
),
),
),
);
}
Object.assign(window, {
mountSheet() {
root?.unmount();
document.documentElement.dataset.botharnessMotion = 'reduce';
root = createRoot(document.getElementById('app')!);
root.render(
createElement(
'div',
null,
createElement(Sheet, { dark: false }),
createElement(Sheet, { dark: true }),
),
);
},
});
16 changes: 16 additions & 0 deletions docs/evidence/issue-757/harness/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>
body {
margin: 0;
background: #fff;
}
</style>
</head>
<body>
<div id="app"></div>
<script src="bundle.js"></script>
</body>
</html>
Loading
Loading