Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(acceptance): bucket verifier-flagged checks as pending, not needs-fix + shadow & empty state (#17327)

Arvin Xu77f29de7ffc7
diff --git a/locales/en-US/verify.json b/locales/en-US/verify.json
index 71e634d6ce8..3948c0a70d1 100644
--- a/locales/en-US/verify.json
+++ b/locales/en-US/verify.json
@@ -31,6 +31,10 @@
"acceptance.bar.rerunSent": "Sent to the origin conversation — the repair round is starting.",
"acceptance.checks.copied": "Copied",
"acceptance.checks.copySeq": "Copy the check label",
+ "acceptance.checks.empty": "No acceptance checks recorded yet",
+ "acceptance.checks.emptyFilter.accepted": "No checks accepted yet",
+ "acceptance.checks.emptyFilter.needsFix": "No checks marked for fixing",
+ "acceptance.checks.emptyFilter.pending": "No checks left to review",
"acceptance.checks.finalRoundHint": "The final result and evidence come from this round — click to locate it.",
"acceptance.checks.introduced": "Added in round {{round}}",
"acceptance.checks.introducedHint": "This check first appeared in that round — click to locate it.",
diff --git a/locales/zh-CN/verify.json b/locales/zh-CN/verify.json
index f4b7907884d..ac2e98362d6 100644
--- a/locales/zh-CN/verify.json
+++ b/locales/zh-CN/verify.json
@@ -31,6 +31,10 @@
"acceptance.bar.rerunSent": "已发送到源会话,修复轮次启动中。",
"acceptance.checks.copied": "已复制",
"acceptance.checks.copySeq": "复制检查项序号",
+ "acceptance.checks.empty": "尚未记录验收检查项",
+ "acceptance.checks.emptyFilter.accepted": "还没有已验收的检查项",
+ "acceptance.checks.emptyFilter.needsFix": "没有待修复的检查项",
+ "acceptance.checks.emptyFilter.pending": "没有待验收的检查项",
"acceptance.checks.finalRoundHint": "最终结果与证据来自该轮,点击查看",
"acceptance.checks.introduced": "第 {{round}} 轮引入",
"acceptance.checks.introducedHint": "该检查在此轮首次出现,点击查看",
diff --git a/packages/locales/src/default/verify.ts b/packages/locales/src/default/verify.ts
index 7ea1d69087a..7fcbd830228 100644
--- a/packages/locales/src/default/verify.ts
+++ b/packages/locales/src/default/verify.ts
@@ -39,6 +39,10 @@ export default {
'acceptance.bar.rerunSent': 'Sent to the origin conversation — the repair round is starting.',
'acceptance.checks.copied': 'Copied',
'acceptance.checks.copySeq': 'Copy the check label',
+ 'acceptance.checks.empty': 'No acceptance checks recorded yet',
+ 'acceptance.checks.emptyFilter.accepted': 'No checks accepted yet',
+ 'acceptance.checks.emptyFilter.needsFix': 'No checks marked for fixing',
+ 'acceptance.checks.emptyFilter.pending': 'No checks left to review',
'acceptance.checks.finalRoundHint':
'The final result and evidence come from this round — click to locate it.',
'acceptance.checks.introduced': 'Added in round {{round}}',
diff --git a/src/features/Verify/Acceptance/CheckList.test.ts b/src/features/Verify/Acceptance/CheckList.test.ts
index 398b78b989c..3301a88f793 100644
--- a/src/features/Verify/Acceptance/CheckList.test.ts
+++ b/src/features/Verify/Acceptance/CheckList.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
-import { type AcceptanceCheck, groupChecks, userReviewState } from './CheckList';
+import { type AcceptanceCheck, checkFilterState, groupChecks, userReviewState } from './CheckList';
const check = (id: string, category: string | null, surface: AcceptanceCheck['surface']) =>
({ category, id, surface }) as AcceptanceCheck;
@@ -73,3 +73,54 @@ describe('userReviewState', () => {
expect(userReviewState(withReview({ ...reject, stale: true }))).toBe('pending');
});
});
+
+describe('checkFilterState', () => {
+ const reject = (stale: boolean): AcceptanceCheck['userReview'] => ({
+ action: 'reject',
+ comment: 'x',
+ createdAt: '2026-07-16T00:00:00.000Z',
+ roundIndex: 2,
+ stale,
+ });
+ const make = (state: AcceptanceCheck['state'], userReview?: AcceptanceCheck['userReview']) =>
+ ({ state, userReview }) as AcceptanceCheck;
+
+ // The bucket tracks the USER's decision, never the verifier's verdict alone.
+ it('a verifier-uncertain check you have not reviewed is pending, not needsFix', () => {
+ expect(checkFilterState(make('uncertain'))).toBe('pending');
+ });
+
+ it('a verifier-failed check you have not reviewed is pending (awaiting your review)', () => {
+ expect(checkFilterState(make('failed'))).toBe('pending');
+ });
+
+ it('a never-executed check you have not reviewed is pending', () => {
+ expect(checkFilterState(make('not_executed'))).toBe('pending');
+ });
+
+ it('a passed-but-unconfirmed check is pending', () => {
+ expect(checkFilterState(make('passed'))).toBe('pending');
+ });
+
+ it('needsFix only when you rejected it — even if the verifier passed it', () => {
+ expect(checkFilterState(make('passed', reject(false)))).toBe('needsFix');
+ expect(checkFilterState(make('uncertain', reject(false)))).toBe('needsFix');
+ });
+
+ it('a stale reject reverts to pending, not needsFix (its feedback was consumed)', () => {
+ expect(checkFilterState(make('uncertain', reject(true)))).toBe('pending');
+ });
+
+ it('accepted when you signed it off', () => {
+ expect(
+ checkFilterState(
+ make('passed', {
+ action: 'accept',
+ createdAt: '2026-07-16T00:00:00.000Z',
+ roundIndex: 1,
+ stale: false,
+ }),
+ ),
+ ).toBe('accepted');
+ });
+});
diff --git a/src/features/Verify/Acceptance/CheckList.tsx b/src/features/Verify/Acceptance/CheckList.tsx
index 9a6f7a57acb..246a8d8fb99 100644
--- a/src/features/Verify/Acceptance/CheckList.tsx
+++ b/src/features/Verify/Acceptance/CheckList.tsx
@@ -1,7 +1,17 @@
'use client';
import type { AcceptanceGroupFeedback, AcceptanceReviewAnnotation } from '@lobechat/types';
-import { ActionIcon, copyToClipboard, Flexbox, Icon, Image, Tag, Text, Tooltip } from '@lobehub/ui';
+import {
+ ActionIcon,
+ copyToClipboard,
+ Empty,
+ Flexbox,
+ Icon,
+ Image,
+ Tag,
+ Text,
+ Tooltip,
+} from '@lobehub/ui';
import { Button } from '@lobehub/ui/base-ui';
import { createStaticStyles, cssVar, cx } from 'antd-style';
import dayjs from 'dayjs';
@@ -151,6 +161,14 @@ const styles = createStaticStyles(({ css }) => ({
background: ${cssVar.colorFillQuaternary};
`,
+ emptyCard: css`
+ padding-block: 48px;
+ padding-inline: 16px;
+ border: 1px solid ${cssVar.colorBorderSecondary};
+ border-radius: ${cssVar.borderRadiusLG};
+
+ background: ${cssVar.colorBgContainer};
+ `,
groupCard: css`
overflow: hidden;
border: 1px solid ${cssVar.colorBorderSecondary};
@@ -973,18 +991,27 @@ const CheckRow = memo<{
});
/**
- * The filter maps the reviewer's workflow, not verifier taxonomy:
- * - pending: the verifier passed it, your confirmation is what's missing;
- * - needsFix: broken, uncertain, never executed, or rejected by you — the
- * next round's work items;
- * - accepted: signed off, out of the way.
+ * The filter maps the reviewer's WORKFLOW, not the verifier's taxonomy — each
+ * tab is the user's own disposition on a check, so the verifier's verdict alone
+ * never moves a check between tabs:
+ * - pending (未验收): awaiting your review — whatever the verifier returned
+ * (passed-but-unconfirmed, uncertain ❓, failed, or never executed). The row
+ * icon still carries the verifier verdict; the tab is about YOUR call.
+ * - needsFix (待修复): you rejected it. The only bucket that is a decision you
+ * made — so every 待修复 item carries your feedback (待修复 stays in step with
+ * 反馈, instead of inflating with checks you never sent back).
+ * - accepted (已验收): you signed it off.
+ *
+ * An uncertain/failed check the verifier flagged but you have NOT rejected is
+ * still 未验收: the verifier is unsure or the run is red, so it needs your eyes
+ * — not an automatic "needs fix" label you never asked for.
*/
export type CheckFilter = 'all' | 'pending' | 'needsFix' | 'accepted';
export const checkFilterState = (check: AcceptanceCheck): Exclude<CheckFilter, 'all'> => {
const review = userReviewState(check);
if (review === 'accepted') return 'accepted';
- if (review === 'rejected' || check.state !== 'passed') return 'needsFix';
+ if (review === 'rejected') return 'needsFix';
return 'pending';
};
@@ -1078,6 +1105,22 @@ const CheckList = memo<CheckListProps>(
}))
.filter((group) => group.rows.length > 0);
+ // A filter that matches nothing must read as "this bucket is empty", not as
+ // a blank bordered card — each filter gets its own reassuring line.
+ if (groups.length === 0)
+ return (
+ <Flexbox align={'center'} className={styles.emptyCard} justify={'center'}>
+ <Empty
+ icon={CircleDashed}
+ description={t(
+ filter === 'all'
+ ? 'acceptance.checks.empty'
+ : `acceptance.checks.emptyFilter.${filter}`,
+ )}
+ />
+ </Flexbox>
+ );
+
return (
<Flexbox className={styles.groupCard}>
{groups.map(({ checks: groupChecks_, key, label, rows }, groupIndex) => {
diff --git a/src/features/Verify/Acceptance/DecisionBar.tsx b/src/features/Verify/Acceptance/DecisionBar.tsx
index e12a20f739e..37b8177c3c6 100644
--- a/src/features/Verify/Acceptance/DecisionBar.tsx
+++ b/src/features/Verify/Acceptance/DecisionBar.tsx
@@ -25,7 +25,7 @@ const styles = createStaticStyles(({ css }) => ({
border-radius: 14px;
background: ${cssVar.colorBgElevated};
- box-shadow: ${cssVar.boxShadowSecondary};
+ box-shadow: ${cssVar.boxShadowTertiary};
`,
}));