fix(web): remove private message history help text

This commit is contained in:
2026-10-07 11:17:53 +08:00
parent fb155319b0
commit 579ca1d609
2 changed files with 1 additions and 4 deletions
-2
View File
@@ -17,7 +17,6 @@ type SendValues = { account_id: string; peer_uid: string; text: string };
type SendAttempt = { request_id: string; text: string; state: string; error: string; pending: boolean; version: number; messageId?: string };
const PAGE_SIZE = 25;
const MESSAGE_PAGE_SIZE = 50;
const HISTORY_HINT = '仅展示聊天客户端已加载会话的最近 50 条消息,不代表完整历史;已发送不代表对方已收到或已读。';
const accountName = (name?: string) => name?.trim() || '未命名账号';
const STATE_ICONS: Record<string, typeof CheckCircleOutlined> = {
succeeded: CheckCircleOutlined, sending: LoadingOutlined,
@@ -313,7 +312,6 @@ export default function PrivateMessagesPage() {
<Typography.Text type="secondary">{contactTotal} 个私信会话</Typography.Text>
<Button type="primary" icon={<PlusOutlined />} disabled={!enabledAccounts.length} onClick={() => { setNewChatError(''); setSendOpen(true); }}>新建私信</Button>
</Flex>
<Typography.Text type="secondary">{HISTORY_HINT} 仅手动发送文字,不自动回复或群发。</Typography.Text>
{contactError && <Alert type="error" showIcon title="私信会话加载失败" description={contactError} />}
{statuses.filter((status) => status.error).map((status) => <Alert key={status.account_id} type="warning" showIcon title={`${accountName(status.account_name)}:私信同步异常`} description={status.error} />)}
<Splitter style={{ height: 600 }}>
+1 -2
View File
@@ -184,9 +184,8 @@ test('native X chat replaces both tables and reply/login modals; account filter
const filter = all(tree, (n) => n.type === h.antd.Select && n.props['aria-label'] === '所属账号')[0];
assert.equal(filter.props.value, undefined);
assert.deepEqual(filter.props.options.map((o) => o.value), ['a', 'b']);
assert.match(text(tree), /最近 50 条/);
assert.doesNotMatch(text(tree), /最近 50 条|不代表完整历史|已发送不代表对方已收到|仅手动发送文字|不自动回复或群发/);
assert.equal(alerts(h, tree), '');
assert.match(text(tree), /已发送不代表对方已收到/);
assert.equal(sender(h, tree).props.submitType, 'enter');
const source = readFileSync(resolve(__dirname, '../src/pages/creator/messages/index.tsx'), 'utf8');
assert.doesNotMatch(source, /AccountLoginModal|LoginOutlined|qr_value|login-qr|useXAgent|useXChat|useXStream|allowSpeech|onPasteFile|from ['"]@\/utils\/table/);