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.

✨ feat(verify): editable acceptance goal, round snapshot deep-link & markdown evidence (#17445)

Arvin Xu4141822ba9eb
diff --git a/.agents/acceptance/probe-mock-patterns.md b/.agents/acceptance/probe-mock-patterns.md
index ce14ad26d42..bf63268af78 100644
--- a/.agents/acceptance/probe-mock-patterns.md
+++ b/.agents/acceptance/probe-mock-patterns.md
@@ -837,6 +837,19 @@ nodeintegration, plugins, disablewebsecurity, allowpopups, preload, …`). The h
---
+- **E5. s3rver CORS allowed-origins must match the dev server port you actually use — a mismatch renders as "文档加载失败" in the evidence viewer while s3rver logs the GET as 200.**
+ Situation: `init-dev-env.sh s3` configures the bucket's CORS from the resolved ports (persisted ports file, e.g. 26938/9876). If you then run the dev server on override ports (`SERVER_PORT=3010 SPA_PORT=9877`), the browser's cross-origin fetch of a file evidence (presigned `127.0.0.1:29000` URL) is CORS-blocked; `useTextFileLoader` shows the failed state even though `curl` and the s3rver log both say 200.
+ Doesn't work: retrying in the same page after fixing CORS — SWR caches the rejected fetch for the same presigned URL; the drawer stays on the error/loading state.
+ Works: restart s3 with the same overrides (`SERVER_PORT=3010 SPA_PORT=9877 init-dev-env.sh s3` — it logs `replaced cors config for bucket`), then do a full page reload before reopening the evidence drawer.
+
+- **E6. The persisted ports file may belong to ANOTHER worktree's live dev server.**
+ Situation: `.records/env/agent-testing-ports.env` said 26938 and a server answered there — but it was `.claude/worktrees/<other>/`'s instance serving that worktree's code (check `ps` for the listener's `next dev` path). Testing main-repo changes against it silently tests the wrong code, and `init-dev-env.sh dev` reusing the file dies with EADDRINUSE.
+ Works: trace the listener's cwd first (`lsof -nP -iTCP:<port>`, then `ps -o command -p <pid>`); if it is another worktree's, leave it alone and start your own instance with `SERVER_PORT`/`SPA_PORT` env overrides (they do not rewrite the ports file). Remember `seed-user` rewrites `agent-testing-cli.env`'s `LOBEHUB_SERVER` — restore it in teardown if another session may still source it.
+
+- **E7. The managed local Postgres kept its container but LOST all app data between two dev-server sessions in one day (cause not established).**
+ Situation: round-1 fixtures (tasks, acceptances, verify runs/evidence) were verified present via psql; after `pnpm install` (which bumped workspace deps) and a dev-server restart, the same container answered with empty `tasks`/`acceptances` tables while `verify_runs` held only the new round's row. No `setup-db`/`clean-db` ran in between.
+ Works: treat local fixture data as disposable — recreate the subject task and re-ingest instead of debugging; assert presence with psql right before UI steps, not from memory of an earlier round.
+
## F. Fixture-seeding by raw SQL
### F1. Seeding a shared topic by raw SQL: messages MUST carry `agent_id`, or the share page renders skeletons forever
diff --git a/.agents/skills/agent-testing/SKILL.md b/.agents/skills/agent-testing/SKILL.md
index a01e292db03..763e0ef4430 100644
--- a/.agents/skills/agent-testing/SKILL.md
+++ b/.agents/skills/agent-testing/SKILL.md
@@ -373,11 +373,15 @@ Hard rules worth front-loading:
- **Visual evidence lives in `result.json`, NOT in `report.md`.** Attach each
screenshot/GIF to its case via `cases[].evidence`; the page renders it next to
the check. Do NOT embed images/GIFs in `report.md`.
-- **Final replies lead with the published `/acceptance/<id>` link; the round's
- `/verify/<id>` link may follow as the immutable record. Put no images or local
- file links in the chat reply.** The acceptance page is the stable cross-round
- decision surface; the verify page renders that round's evidence inline. You
- may mention the local report directory as plain text.
+- **Final replies link ONLY the published `/acceptance/<id>` page — never a
+ `/verify/<id>` URL. Put no images or local file links in the chat reply.**
+ The acceptance page is the stable cross-round decision surface and renders
+ each round's evidence inline. For a fixed this-round snapshot, append
+ `?r=<roundIndex>` to the same acceptance URL (the ingest CLI prints it as
+ `round snapshot`) — that deep-links this round's full report. You may mention
+ the local report directory as plain text. Always leave whitespace between a
+ URL and any following text — CJK punctuation glued right after it (`…4c74(本轮`)
+ gets swallowed into the href by chat autolinkers and breaks the link.
- **Time-based behavior needs a GIF, not a screenshot.** Streaming output, a
ticking timer, loading states, animations — record with `scripts/record-gif.sh`
and attach the GIF as that case's evidence; a static screenshot cannot prove it.
@@ -427,10 +431,12 @@ verification run, attaches it to the subject acceptance, and uploads everything:
- each case's `evidence` file(s) → uploaded and attached to that result;
- `report.md` → the report body, plus the `summary` stats.
-It prints the `verifyRunId`, `acceptanceId`, and their in-app paths. The final
-reply leads with `https://app.lobehub.com/acceptance/<acceptanceId>` as the
-latest cross-round state; the round-specific
-`https://app.lobehub.com/verify/<verifyRunId>` may follow as supporting detail.
+It prints the `verifyRunId`, `acceptanceId`, `roundIndex`, and the acceptance
+paths. The final reply leads with
+`https://app.lobehub.com/acceptance/<acceptanceId>` as the latest cross-round
+state; for a fixed per-round snapshot use the same URL with `?r=<roundIndex>`
+(printed as `round snapshot`). Never link `/verify/<id>` in the reply — the
+verify run stays the internal immutable record behind the acceptance page.
#### Every run belongs to a subject acceptance (mandatory)
diff --git a/.agents/skills/agent-testing/references/common-mistakes.md b/.agents/skills/agent-testing/references/common-mistakes.md
index 273edc8340a..2dcc9981d90 100644
--- a/.agents/skills/agent-testing/references/common-mistakes.md
+++ b/.agents/skills/agent-testing/references/common-mistakes.md
@@ -157,12 +157,14 @@ path is an un-openable dead link. Local report paths only resolve on the machine
never inside the message.
**What it breaks**: the reply looks like it has evidence but shows nothing — the user
-gets a broken box and has to go find the verify link anyway.
+gets a broken box and has to go find the acceptance link anyway.
**Correct approach**: put NO images and NO local-file links in the chat reply. The
-published `/verify/<id>` page already renders every screenshot inline — that URL is
-the only visual deliverable. Describe key visual outcomes in prose; mention the local
-report dir as a plain string (not a markdown link) if a reference is useful.
+published `/acceptance/<id>` page already renders every screenshot inline (append
+`?r=<roundIndex>` for this round's fixed snapshot) — that URL is the only visual
+deliverable; never link the raw `/verify/<id>` page. Describe key visual outcomes in
+prose; mention the local report dir as a plain string (not a markdown link) if a
+reference is useful.
---
diff --git a/.agents/skills/agent-testing/references/report.md b/.agents/skills/agent-testing/references/report.md
index 78a732549d5..b2f6ddb910d 100644
--- a/.agents/skills/agent-testing/references/report.md
+++ b/.agents/skills/agent-testing/references/report.md
@@ -135,8 +135,8 @@ table — those double up on the page. It carries only the non-duplicate narrati
don't hand-build a table. `report.md` holds only the narrative tail.
5. **Set the verdict** in both `report.md` and `result.json`. Describe key visual
- outcomes in prose; the published verify URL is the only visual pointer in the
- final chat reply.
+ outcomes in prose; the published acceptance URL is the only visual pointer in
+ the final chat reply.
6. **Publish** (SKILL.md Step 6) — upload the finished session so it's viewable on
the verify platform, not just on disk. **Publish to PRODUCTION defaults with the
@@ -150,8 +150,10 @@ table — those double up on the page. It carries only the non-duplicate narrati
This creates a new immutable verification run, attaches it to the required
subject acceptance, uploads the cases, evidence, and report body, then prints
- both `/verify/<verifyRunId>` and `/acceptance/<acceptanceId>`. Include that full
- production link in the final reply alongside the local report dir. See SKILL.md →
+ `/acceptance/<acceptanceId>` plus its `?r=<roundIndex>` round-snapshot form.
+ Include the full production acceptance link (never a `/verify/<id>` one) in the
+ final reply alongside the local report dir — with whitespace after the URL, so
+ an autolinker can't swallow adjacent CJK punctuation into the href. See SKILL.md →
Step 6 for why production defaults (a localhost URL isn't shareable and a local
stub storage fails file-evidence uploads), the production login check, and the
atomic commands (`acceptance run …` (plus `… result`, `… evidence`, `… report`)).
diff --git a/apps/cli/src/commands/acceptanceRun.ts b/apps/cli/src/commands/acceptanceRun.ts
index 9ff547fae51..ea4109b0835 100644
--- a/apps/cli/src/commands/acceptanceRun.ts
+++ b/apps/cli/src/commands/acceptanceRun.ts
@@ -599,7 +599,10 @@ async function ingestReportAction(reportDir: string, options: IngestReportOption
subjectType: subject.ref.subjectType,
});
const acceptanceId = acceptance.id;
- await client.acceptance.attachRun.mutate({ acceptanceId, verifyRunId: runId });
+ const attached = await client.acceptance.attachRun.mutate({ acceptanceId, verifyRunId: runId });
+ // The chained round's index — `?r=<roundIndex>` on the acceptance URL
+ // deep-links this round's report as the fixed snapshot view.
+ const roundIndex = attached?.roundIndex ?? null;
// 2. Ingest each case as a check result + its evidence. `checkItemId` is
// the stable key within this immutable run.
@@ -705,6 +708,7 @@ async function ingestReportAction(reportDir: string, options: IngestReportOption
origin,
planItems: plan?.length ?? 0,
pullRequest,
+ roundIndex,
scenario,
subject: subject.ref,
unplanned,
@@ -734,8 +738,12 @@ async function ingestReportAction(reportDir: string, options: IngestReportOption
`${pc.bold('acceptance')}: ${acceptanceId} ${pc.dim(`(${subject.ref.subjectType}:${subject.ref.subjectId})`)}`,
);
if (options.open) {
- console.log(`${pc.bold('open')}: /verify/${runId}`);
+ // The acceptance page is the only link surfaced to users — the raw /verify
+ // page stays internal. `?r=<roundIndex>` is this round's fixed snapshot.
console.log(`${pc.bold('open acceptance')}: /acceptance/${acceptanceId}`);
+ if (roundIndex !== null) {
+ console.log(`${pc.bold('round snapshot')}: /acceptance/${acceptanceId}?r=${roundIndex}`);
+ }
}
}
diff --git a/apps/cli/src/commands/verify.test.ts b/apps/cli/src/commands/verify.test.ts
index 93857701955..dff2ce36bb5 100644
--- a/apps/cli/src/commands/verify.test.ts
+++ b/apps/cli/src/commands/verify.test.ts
@@ -7,7 +7,9 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import {
deriveReportVerdict,
+ evidenceTypeForFile,
genericContextFromResult,
+ inlineTextEvidenceForFile,
originFromEnv,
parseSubjectRef,
planFromResult,
@@ -309,6 +311,28 @@ describe('reportEvidence — comparison normalization', () => {
});
});
+describe('evidenceTypeForFile — markdown evidence', () => {
+ it('maps .md / .markdown to the markdown medium, keeping .txt as text', () => {
+ expect(evidenceTypeForFile('assets/root-cause.md')).toBe('markdown');
+ expect(evidenceTypeForFile('assets/root-cause.markdown')).toBe('markdown');
+ expect(evidenceTypeForFile('assets/root-cause.txt')).toBe('text');
+ });
+
+ it('inlines a small markdown file as content instead of uploading it', () => {
+ const dir = mkdtempSync(path.join(tmpdir(), 'lh-evidence-'));
+ const file = path.join(dir, 'root-cause.md');
+ writeFileSync(file, '### 根因证据\n\n- `heteroSessionId` 未透传');
+
+ try {
+ expect(inlineTextEvidenceForFile(file, evidenceTypeForFile(file))).toBe(
+ '### 根因证据\n\n- `heteroSessionId` 未透传',
+ );
+ } finally {
+ rmSync(dir, { force: true, recursive: true });
+ }
+ });
+});
+
describe('surfacesFromResult — surface normalization', () => {
let exitSpy: ReturnType<typeof vi.spyOn>;
@@ -582,6 +606,19 @@ describe('verify ingest-report — every run is an immutable acceptance round',
verifyRunId: 'run-second',
});
});
+
+ it('with --open prints only acceptance links, the round snapshot via ?r=', async () => {
+ // The acceptance page is the sole user-facing link; the round's fixed
+ // snapshot is the same URL with `?r=<roundIndex>` — never a /verify link.
+ mockTrpcClient.acceptance.attachRun.mutate = vi.fn().mockResolvedValue({ roundIndex: 3 });
+
+ await run(['ingest-report', dir, '--open']);
+
+ const lines = consoleSpy.mock.calls.map((call) => String(call[0]));
+ expect(lines.some((line) => line.includes('/acceptance/acceptance-1'))).toBe(true);
+ expect(lines.some((line) => line.includes('/acceptance/acceptance-1?r=3'))).toBe(true);
+ expect(lines.some((line) => line.includes('/verify/'))).toBe(false);
+ });
});
describe('scenarioFromResult / genericContextFromResult — non-coding scenarios', () => {
diff --git a/apps/cli/src/commands/verifyHelpers.ts b/apps/cli/src/commands/verifyHelpers.ts
index 817a919fd0b..c97d2736315 100644
--- a/apps/cli/src/commands/verifyHelpers.ts
+++ b/apps/cli/src/commands/verifyHelpers.ts
@@ -52,11 +52,13 @@ export function assertEnum<T extends string>(
}
export type Verdict = 'failed' | 'passed' | 'uncertain';
-export type EvidenceType = 'dom_snapshot' | 'gif' | 'screenshot' | 'text' | 'transcript' | 'video';
+export type EvidenceType =
+ 'dom_snapshot' | 'gif' | 'markdown' | 'screenshot' | 'text' | 'transcript' | 'video';
export const INLINE_TEXT_EVIDENCE_LIMIT = 5000;
export const INLINE_TEXT_EVIDENCE_TYPES = new Set<EvidenceType>([
'dom_snapshot',
+ 'markdown',
'text',
'transcript',
]);
@@ -89,6 +91,7 @@ export function evidenceTypeForFile(file: string): EvidenceType {
if (['png', 'jpg', 'jpeg', 'webp', 'svg', 'bmp'].includes(ext)) return 'screenshot';
if (['mp4', 'webm', 'mov', 'm4v'].includes(ext)) return 'video';
if (['html', 'htm'].includes(ext)) return 'dom_snapshot';
+ if (['md', 'markdown'].includes(ext)) return 'markdown';
return 'text';
}
diff --git a/apps/server/src/routers/lambda/__tests__/verify.test.ts b/apps/server/src/routers/lambda/__tests__/verify.test.ts
index 2e4208940ff..de1aac4e6bd 100644
--- a/apps/server/src/routers/lambda/__tests__/verify.test.ts
+++ b/apps/server/src/routers/lambda/__tests__/verify.test.ts
@@ -458,10 +458,28 @@ describe('verifyRouter', () => {
});
describe('getReportBundle', () => {
+ // The real column is uuid-typed and the router guards malformed ids before
+ // querying, so the fixture id must be a well-formed uuid.
+ const RUN_UUID = '61a3475e-52b5-4a58-8ccc-e3ba43062c7a';
+
+ it('reads a malformed run id as absent without ever querying', async () => {
+ // Chat autolinkers glue trailing CJK punctuation onto shared links —
+ // before the guard this aborted in Postgres (22P02) and surfaced as 500.
+ const findFirst = vi.fn();
+ modelMocks.getServerDB.mockResolvedValue({
+ query: { verifyRuns: { findFirst } },
+ });
+
+ expect(
+ await createPublicCaller().getReportBundle({ verifyRunId: `${RUN_UUID}(本轮` }),
+ ).toBeNull();
+ expect(findFirst).not.toHaveBeenCalled();
+ });
+
it('hides a private run from visitors but not its owner', async () => {
const run = {
goal: 'Ship a working page',
- id: 'run-1',
+ id: RUN_UUID,
title: 'Run report',
userId: 'owner-user',
visibility: 'private',
@@ -477,19 +495,19 @@ describe('verifyRouter', () => {
// A visitor's denied read is indistinguishable from a missing run.
modelMocks.getServerDB.mockResolvedValue(makeServerDB());
- expect(await createPublicCaller().getReportBundle({ verifyRunId: 'run-1' })).toBeNull();
+ expect(await createPublicCaller().getReportBundle({ verifyRunId: RUN_UUID })).toBeNull();
// The owner still reads their own private report.
modelMocks.getServerDB.mockResolvedValue(makeServerDB());
const ownerCaller = verifyRouter.createCaller({ userId: 'owner-user' } as any);
- const bundle = await ownerCaller.getReportBundle({ verifyRunId: 'run-1' });
- expect(bundle).toMatchObject({ isOwner: true, run: { id: 'run-1' } });
+ const bundle = await ownerCaller.getReportBundle({ verifyRunId: RUN_UUID });
+ expect(bundle).toMatchObject({ isOwner: true, run: { id: RUN_UUID } });
});
it('reads a standalone report without a logged-in user', async () => {
const run = {
goal: 'Ship a working page',
- id: 'run-1',
+ id: RUN_UUID,
title: 'Run report',
userId: 'owner-user',
visibility: 'public',
@@ -499,7 +517,7 @@ describe('verifyRouter', () => {
id: 'report-1',
totalChecks: 1,
verdict: 'passed',
- verifyRunId: 'run-1',
+ verifyRunId: RUN_UUID,
};
const result = {
checkItemId: 'check-1',
@@ -509,7 +527,7 @@ describe('verifyRouter', () => {
required: true,
status: 'passed',
verdict: 'passed',
- verifyRunId: 'run-1',
+ verifyRunId: RUN_UUID,
};
const evidence = {
checkResultId: 'result-1',
@@ -543,7 +561,7 @@ describe('verifyRouter', () => {
modelMocks.getServerDB.mockResolvedValue(serverDB);
modelMocks.getFullFileUrl.mockResolvedValue('https://cdn.example.com/verify/evidence.png');
- const bundle = await createPublicCaller().getReportBundle({ verifyRunId: 'run-1' });
+ const bundle = await createPublicCaller().getReportBundle({ verifyRunId: RUN_UUID });
expect(bundle).toMatchObject({
report,
@@ -572,7 +590,7 @@ describe('verifyRouter', () => {
const run = {
goal: 'Ship a working page',
- id: 'run-1',
+ id: RUN_UUID,
title: 'Run report',
userId: 'owner-user',
visibility: 'public',
@@ -586,7 +604,7 @@ describe('verifyRouter', () => {
required: true,
status: 'passed',
verdict: 'passed',
- verifyRunId: 'run-1',
+ verifyRunId: RUN_UUID,
};
const evidence = {
checkResultId: 'result-1',
@@ -619,7 +637,7 @@ describe('verifyRouter', () => {
};
modelMocks.getServerDB.mockResolvedValue(serverDB);
- const bundle = await createPublicCaller().getReportBundle({ verifyRunId: 'run-1' });
+ const bundle = await createPublicCaller().getReportBundle({ verifyRunId: RUN_UUID });
expect(bundle).toMatchObject({
results: [
diff --git a/apps/server/src/routers/lambda/acceptance.ts b/apps/server/src/routers/lambda/acceptance.ts
index f2cd59150a2..cce6f77b3cd 100644
--- a/apps/server/src/routers/lambda/acceptance.ts
+++ b/apps/server/src/routers/lambda/acceptance.ts
@@ -16,6 +16,7 @@ import { VerifyRunModel } from '@/database/models/verifyRun';
import { WorkspaceMemberModel } from '@/database/models/workspaceMember';
import type { AcceptanceItem } from '@/database/schemas/verify';
import { acceptances } from '@/database/schemas/verify';
+import { isUuid } from '@/database/utils/uuid';
import { publicProcedure, router } from '@/libs/trpc/lambda';
import { serverDatabase } from '@/libs/trpc/lambda/middleware';
import {
@@ -229,9 +230,14 @@ export const acceptanceRouter = router({
getBundle: publicAcceptanceProcedure
.input(z.object({ id: z.string() }))
.query(async ({ ctx, input }) => {
- const acceptance = await ctx.serverDB.query.acceptances.findFirst({
- where: eq(acceptances.id, input.id),
- });
+ // Public entry fed by shared links: a chat autolinker can glue trailing
+ // CJK punctuation onto the URL, so a malformed uuid must read as
+ // NOT_FOUND instead of aborting in Postgres (22P02 → 500).
+ const acceptance = isUuid(input.id)
+ ? await ctx.serverDB.query.acceptances.findFirst({
+ where: eq(acceptances.id, input.id),
+ })
+ : undefined;
if (!acceptance) {
throw new TRPCError({ code: 'NOT_FOUND', message: 'Acceptance not found' });
}
diff --git a/apps/server/src/routers/lambda/verify.ts b/apps/server/src/routers/lambda/verify.ts
index 190e4e2ef1b..84a6bff4e05 100644
--- a/apps/server/src/routers/lambda/verify.ts
+++ b/apps/server/src/routers/lambda/verify.ts
@@ -29,6 +29,7 @@ import {
verifyReports,
verifyRuns,
} from '@/database/schemas/verify';
+import { isUuid } from '@/database/utils/uuid';
import { publicProcedure, router } from '@/libs/trpc/lambda';
import { serverDatabase } from '@/libs/trpc/lambda/middleware';
import {
@@ -78,6 +79,7 @@ const evidenceTypeSchema = z.enum([
'gif',
'video',
'text',
+ 'markdown',
'dom_snapshot',
'transcript',
]);
@@ -1055,6 +1057,10 @@ export const verifyRouter = router({
getReportBundle: publicVerifyReportProcedure
.input(verifyRunIdInputSchema)
.query(async ({ ctx, input }) => {
+ // Public entry fed by shared links: a chat autolinker can glue trailing
+ // CJK punctuation onto the URL, so a malformed uuid must read as absent
+ // instead of aborting in Postgres (22P02 → 500).
+ if (!isUuid(input.verifyRunId)) return null;
const found = await ctx.serverDB.query.verifyRuns.findFirst({
where: eq(verifyRuns.id, input.verifyRunId),
});
diff --git a/locales/ar/verify.json b/locales/ar/verify.json
index a1e7dcac492..169a8d582a2 100644
--- a/locales/ar/verify.json
+++ b/locales/ar/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "بحاجة إلى إصلاح {{count}}",
"acceptance.filter.pending": "للمراجعة {{count}}",
"acceptance.filter.roundAll": "جميع الجولات",
+ "acceptance.goalEdit": "تعديل هدف القبول",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} تم قبولها",
"acceptance.group.allVerified": "{{passed}}/{{total}} تم التحقق منها وقبولها",
"acceptance.group.collapse": "طي {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "صف ما يجب تغييره قبل أن يتم قبول هذا التسليم.",
"acceptance.reportDrawer.close": "إغلاق تقرير الجولة",
"acceptance.requirementEmpty": "لم يتم تسجيل أي هدف قبول لهذا الموضوع حتى الآن.",
+ "acceptance.requirementEmptyEditable": "لا يوجد هدف قبول حتى الآن — انقر لإضافة واحد.",
"acceptance.requirementLabel": "شريط القبول",
"acceptance.review.accept": "قبول",
"acceptance.review.acceptAll": "قبول الكل",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "ملف",
"report.evidence.category.image": "صورة",
"report.evidence.category.video": "فيديو",
+ "report.evidence.collapse": "طي",
"report.evidence.comparison.after": "بعد",
"report.evidence.comparison.before": "قبل",
"report.evidence.count": "{{count}} دليل",
+ "report.evidence.expand": "توسيع",
"report.evidence.inlineFallback": "دليل مضمّن {{index}}",
"report.evidence.medium.dom_snapshot": "لقطة DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "ماركداون",
"report.evidence.medium.screenshot": "لقطة شاشة",
"report.evidence.medium.text": "نص",
"report.evidence.medium.transcript": "نص المحادثة",
diff --git a/locales/bg-BG/verify.json b/locales/bg-BG/verify.json
index 171c6d58393..92ab7cc33fe 100644
--- a/locales/bg-BG/verify.json
+++ b/locales/bg-BG/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Нуждае се от корекция {{count}}",
"acceptance.filter.pending": "За преглед {{count}}",
"acceptance.filter.roundAll": "Всички кръгове",
+ "acceptance.goalEdit": "Редактиране на целта за приемане",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} приети",
"acceptance.group.allVerified": "{{passed}}/{{total}} всички проверени и приети",
"acceptance.group.collapse": "Сгънете {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Опишете какво трябва да се промени, преди тази доставка да бъде приета.",
"acceptance.reportDrawer.close": "Затворете доклада за кръга",
"acceptance.requirementEmpty": "Все още няма записана цел за приемане за този обект.",
+ "acceptance.requirementEmptyEditable": "Все още няма цел за приемане — щракнете, за да добавите.",
"acceptance.requirementLabel": "Лента за приемане",
"acceptance.review.accept": "Приемете",
"acceptance.review.acceptAll": "Приемете всички",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Файл",
"report.evidence.category.image": "Изображение",
"report.evidence.category.video": "Видео",
+ "report.evidence.collapse": "Скрий",
"report.evidence.comparison.after": "След",
"report.evidence.comparison.before": "Преди",
"report.evidence.count": "{{count}} доказателства",
+ "report.evidence.expand": "Разшири",
"report.evidence.inlineFallback": "Вградени доказателства {{index}}",
"report.evidence.medium.dom_snapshot": "Снимка на DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Екранна снимка",
"report.evidence.medium.text": "Текст",
"report.evidence.medium.transcript": "Транскрипция",
diff --git a/locales/de-DE/verify.json b/locales/de-DE/verify.json
index 6818395011c..6c8134fed29 100644
--- a/locales/de-DE/verify.json
+++ b/locales/de-DE/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Behebung erforderlich {{count}}",
"acceptance.filter.pending": "Zu überprüfen {{count}}",
"acceptance.filter.roundAll": "Alle Runden",
+ "acceptance.goalEdit": "Akzeptanzziel bearbeiten",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} akzeptiert",
"acceptance.group.allVerified": "{{passed}}/{{total}} alle überprüft & akzeptiert",
"acceptance.group.collapse": "{{label}} einklappen",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Beschreiben Sie, was sich ändern muss, bevor diese Lieferung akzeptiert werden kann.",
"acceptance.reportDrawer.close": "Rundenbericht schließen",
"acceptance.requirementEmpty": "Noch kein Akzeptanzziel für dieses Thema aufgezeichnet.",
+ "acceptance.requirementEmptyEditable": "Noch kein Akzeptanzziel — klicken Sie, um eines hinzuzufügen.",
"acceptance.requirementLabel": "Akzeptanzleiste",
"acceptance.review.accept": "Akzeptieren",
"acceptance.review.acceptAll": "Alle akzeptieren",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Datei",
"report.evidence.category.image": "Bild",
"report.evidence.category.video": "Video",
+ "report.evidence.collapse": "Einklappen",
"report.evidence.comparison.after": "Nachher",
"report.evidence.comparison.before": "Vorher",
"report.evidence.count": "{{count}} Beweise",
+ "report.evidence.expand": "Ausklappen",
"report.evidence.inlineFallback": "Inline-Beweis {{index}}",
"report.evidence.medium.dom_snapshot": "DOM-Snapshot",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Screenshot",
"report.evidence.medium.text": "Text",
"report.evidence.medium.transcript": "Transkript",
diff --git a/locales/en-US/verify.json b/locales/en-US/verify.json
index e28616889bf..7aa56f71d91 100644
--- a/locales/en-US/verify.json
+++ b/locales/en-US/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Needs fix {{count}}",
"acceptance.filter.pending": "To review {{count}}",
"acceptance.filter.roundAll": "All rounds",
+ "acceptance.goalEdit": "Edit the acceptance goal",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} accepted",
"acceptance.group.allVerified": "{{passed}}/{{total}} all verified & accepted",
"acceptance.group.collapse": "Collapse {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Describe what must change before this delivery can be accepted.",
"acceptance.reportDrawer.close": "Close the round report",
"acceptance.requirementEmpty": "No acceptance goal recorded for this subject yet.",
+ "acceptance.requirementEmptyEditable": "No acceptance goal yet — click to add one.",
"acceptance.requirementLabel": "Acceptance goal",
"acceptance.review.accept": "Accept",
"acceptance.review.acceptAll": "Accept all",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "File",
"report.evidence.category.image": "Image",
"report.evidence.category.video": "Video",
+ "report.evidence.collapse": "Collapse",
"report.evidence.comparison.after": "After",
"report.evidence.comparison.before": "Before",
"report.evidence.count": "{{count}} evidence",
+ "report.evidence.expand": "Expand",
"report.evidence.inlineFallback": "Inline evidence {{index}}",
"report.evidence.medium.dom_snapshot": "DOM snapshot",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Screenshot",
"report.evidence.medium.text": "Text",
"report.evidence.medium.transcript": "Transcript",
diff --git a/locales/es-ES/verify.json b/locales/es-ES/verify.json
index b2d450e6f5a..6840967280d 100644
--- a/locales/es-ES/verify.json
+++ b/locales/es-ES/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Necesita corrección {{count}}",
"acceptance.filter.pending": "Por revisar {{count}}",
"acceptance.filter.roundAll": "Todas las rondas",
+ "acceptance.goalEdit": "Editar el objetivo de aceptación",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} aceptados",
"acceptance.group.allVerified": "{{passed}}/{{total}} todos verificados y aceptados",
"acceptance.group.collapse": "Colapsar {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Describe qué debe cambiar antes de que esta entrega pueda ser aceptada.",
"acceptance.reportDrawer.close": "Cerrar el informe de la ronda",
"acceptance.requirementEmpty": "Aún no se ha registrado un objetivo de aceptación para este tema.",
+ "acceptance.requirementEmptyEditable": "Aún no hay un objetivo de aceptación — haz clic para añadir uno.",
"acceptance.requirementLabel": "Barra de aceptación",
"acceptance.review.accept": "Aceptar",
"acceptance.review.acceptAll": "Aceptar todo",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Archivo",
"report.evidence.category.image": "Imagen",
"report.evidence.category.video": "Vídeo",
+ "report.evidence.collapse": "Colapsar",
"report.evidence.comparison.after": "Después",
"report.evidence.comparison.before": "Antes",
"report.evidence.count": "{{count}} evidencias",
+ "report.evidence.expand": "Expandir",
"report.evidence.inlineFallback": "Evidencia en línea {{index}}",
"report.evidence.medium.dom_snapshot": "Instantánea del DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Captura de pantalla",
"report.evidence.medium.text": "Texto",
"report.evidence.medium.transcript": "Transcripción",
diff --git a/locales/fa-IR/verify.json b/locales/fa-IR/verify.json
index 2ee0933ed92..926536716b5 100644
--- a/locales/fa-IR/verify.json
+++ b/locales/fa-IR/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "نیاز به اصلاح {{count}}",
"acceptance.filter.pending": "برای بازبینی {{count}}",
"acceptance.filter.roundAll": "همه دورها",
+ "acceptance.goalEdit": "ویرایش هدف پذیرش",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} پذیرفته‌شده",
"acceptance.group.allVerified": "{{passed}}/{{total}} همه تأیید و پذیرفته‌شده",
"acceptance.group.collapse": "جمع کردن {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "توضیح دهید چه چیزی باید تغییر کند تا این تحویل پذیرفته شود.",
"acceptance.reportDrawer.close": "بستن گزارش دور",
"acceptance.requirementEmpty": "هنوز هیچ هدف پذیرشی برای این موضوع ثبت نشده است.",
+ "acceptance.requirementEmptyEditable": "هنوز هدف پذیرشی وجود ندارد — برای افزودن کلیک کنید.",
"acceptance.requirementLabel": "نوار پذیرش",
"acceptance.review.accept": "قبول",
"acceptance.review.acceptAll": "قبول همه",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "فایل",
"report.evidence.category.image": "تصویر",
"report.evidence.category.video": "ویدیو",
+ "report.evidence.collapse": "بستن",
"report.evidence.comparison.after": "بعد",
"report.evidence.comparison.before": "قبل",
"report.evidence.count": "{{count}} مدرک",
+ "report.evidence.expand": "باز کردن",
"report.evidence.inlineFallback": "مدرک داخلی {{index}}",
"report.evidence.medium.dom_snapshot": "عکس فوری DOM",
"report.evidence.medium.gif": "گیف",
+ "report.evidence.medium.markdown": "مارک‌داون",
"report.evidence.medium.screenshot": "تصویر صفحه",
"report.evidence.medium.text": "متن",
"report.evidence.medium.transcript": "رونوشت",
diff --git a/locales/fr-FR/verify.json b/locales/fr-FR/verify.json
index d0cf0195df5..3079699c70a 100644
--- a/locales/fr-FR/verify.json
+++ b/locales/fr-FR/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "À corriger {{count}}",
"acceptance.filter.pending": "À examiner {{count}}",
"acceptance.filter.roundAll": "Tous les cycles",
+ "acceptance.goalEdit": "Modifier l'objectif d'acceptation",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} acceptés",
"acceptance.group.allVerified": "{{passed}}/{{total}} tous vérifiés & acceptés",
"acceptance.group.collapse": "Réduire {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Décrivez ce qui doit changer avant que cette livraison puisse être acceptée.",
"acceptance.reportDrawer.close": "Fermer le rapport du cycle",
"acceptance.requirementEmpty": "Aucun objectif d'acceptation enregistré pour ce sujet pour le moment.",
+ "acceptance.requirementEmptyEditable": "Aucun objectif d'acceptation pour le moment — cliquez pour en ajouter un.",
"acceptance.requirementLabel": "Barre d'acceptation",
"acceptance.review.accept": "Accepter",
"acceptance.review.acceptAll": "Tout accepter",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Fichier",
"report.evidence.category.image": "Image",
"report.evidence.category.video": "Vidéo",
+ "report.evidence.collapse": "Réduire",
"report.evidence.comparison.after": "Après",
"report.evidence.comparison.before": "Avant",
"report.evidence.count": "{{count}} preuve(s)",
+ "report.evidence.expand": "Développer",
"report.evidence.inlineFallback": "Preuve en ligne {{index}}",
"report.evidence.medium.dom_snapshot": "Capture DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Capture d'écran",
"report.evidence.medium.text": "Texte",
"report.evidence.medium.transcript": "Transcription",
diff --git a/locales/it-IT/verify.json b/locales/it-IT/verify.json
index 42ec66b6982..def38082c44 100644
--- a/locales/it-IT/verify.json
+++ b/locales/it-IT/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Da correggere {{count}}",
"acceptance.filter.pending": "Da revisionare {{count}}",
"acceptance.filter.roundAll": "Tutti i cicli",
+ "acceptance.goalEdit": "Modifica l'obiettivo di accettazione",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} accettati",
"acceptance.group.allVerified": "{{passed}}/{{total}} tutti verificati e accettati",
"acceptance.group.collapse": "Comprimi {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Descrivi cosa deve cambiare prima che questa consegna possa essere accettata.",
"acceptance.reportDrawer.close": "Chiudi il rapporto del ciclo",
"acceptance.requirementEmpty": "Nessun obiettivo di accettazione registrato per questo argomento finora.",
+ "acceptance.requirementEmptyEditable": "Nessun obiettivo di accettazione ancora — clicca per aggiungerne uno.",
"acceptance.requirementLabel": "Soglia di accettazione",
"acceptance.review.accept": "Accetta",
"acceptance.review.acceptAll": "Accetta tutto",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "File",
"report.evidence.category.image": "Immagine",
"report.evidence.category.video": "Video",
+ "report.evidence.collapse": "Comprimi",
"report.evidence.comparison.after": "Dopo",
"report.evidence.comparison.before": "Prima",
"report.evidence.count": "{{count}} prove",
+ "report.evidence.expand": "Espandi",
"report.evidence.inlineFallback": "Prova in linea {{index}}",
"report.evidence.medium.dom_snapshot": "Snapshot DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Screenshot",
"report.evidence.medium.text": "Testo",
"report.evidence.medium.transcript": "Trascrizione",
diff --git a/locales/ja-JP/verify.json b/locales/ja-JP/verify.json
index 4678b733ee8..57b724d9578 100644
--- a/locales/ja-JP/verify.json
+++ b/locales/ja-JP/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "修正が必要 {{count}}",
"acceptance.filter.pending": "レビュー待ち {{count}}",
"acceptance.filter.roundAll": "すべてのラウンド",
+ "acceptance.goalEdit": "受け入れ目標を編集",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 承認済み",
"acceptance.group.allVerified": "{{passed}}/{{total}} すべて検証済み & 承認済み",
"acceptance.group.collapse": "{{label}} を折りたたむ",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "この納品が受け入れられる前に変更すべき点を記述してください。",
"acceptance.reportDrawer.close": "ラウンドレポートを閉じる",
"acceptance.requirementEmpty": "この対象に対する承認目標はまだ記録されていません。",
+ "acceptance.requirementEmptyEditable": "まだ受け入れ目標がありません — クリックして追加してください。",
"acceptance.requirementLabel": "受け入れ基準",
"acceptance.review.accept": "受け入れる",
"acceptance.review.acceptAll": "すべて受け入れる",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "ファイル",
"report.evidence.category.image": "画像",
"report.evidence.category.video": "動画",
+ "report.evidence.collapse": "折りたたむ",
"report.evidence.comparison.after": "後",
"report.evidence.comparison.before": "前",
"report.evidence.count": "{{count}} 件の証拠",
+ "report.evidence.expand": "展開する",
"report.evidence.inlineFallback": "インライン証拠 {{index}}",
"report.evidence.medium.dom_snapshot": "DOMスナップショット",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "マークダウン",
"report.evidence.medium.screenshot": "スクリーンショット",
"report.evidence.medium.text": "テキスト",
"report.evidence.medium.transcript": "トランスクリプト",
diff --git a/locales/ko-KR/verify.json b/locales/ko-KR/verify.json
index f6663f68491..7f8e93b69b9 100644
--- a/locales/ko-KR/verify.json
+++ b/locales/ko-KR/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "수정 필요 {{count}}",
"acceptance.filter.pending": "검토 대기 중 {{count}}",
"acceptance.filter.roundAll": "모든 라운드",
+ "acceptance.goalEdit": "수락 목표 편집",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 승인됨",
"acceptance.group.allVerified": "{{passed}}/{{total}} 모두 검증 및 승인됨",
"acceptance.group.collapse": "{{label}} 축소",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "이 배송이 수락되기 전에 변경되어야 할 사항을 설명하세요.",
"acceptance.reportDrawer.close": "라운드 보고서 닫기",
"acceptance.requirementEmpty": "이 주제에 대한 승인 목표가 아직 기록되지 않았습니다.",
+ "acceptance.requirementEmptyEditable": "아직 수락 목표가 없습니다 — 클릭하여 추가하세요.",
"acceptance.requirementLabel": "수락 기준",
"acceptance.review.accept": "수락",
"acceptance.review.acceptAll": "모두 수락",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "파일",
"report.evidence.category.image": "이미지",
"report.evidence.category.video": "비디오",
+ "report.evidence.collapse": "접기",
"report.evidence.comparison.after": "후",
"report.evidence.comparison.before": "전",
"report.evidence.count": "{{count}}개의 증거",
+ "report.evidence.expand": "펼치기",
"report.evidence.inlineFallback": "인라인 증거 {{index}}",
"report.evidence.medium.dom_snapshot": "DOM 스냅샷",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "마크다운",
"report.evidence.medium.screenshot": "스크린샷",
"report.evidence.medium.text": "텍스트",
"report.evidence.medium.transcript": "기록",
diff --git a/locales/nl-NL/verify.json b/locales/nl-NL/verify.json
index 44e3d82408d..bb5d8f01da6 100644
--- a/locales/nl-NL/verify.json
+++ b/locales/nl-NL/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Reparatie nodig {{count}}",
"acceptance.filter.pending": "Te beoordelen {{count}}",
"acceptance.filter.roundAll": "Alle rondes",
+ "acceptance.goalEdit": "Bewerk het acceptatiedoel",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} geaccepteerd",
"acceptance.group.allVerified": "{{passed}}/{{total}} alles geverifieerd & geaccepteerd",
"acceptance.group.collapse": "Samenvouwen {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Beschrijf wat er moet veranderen voordat deze levering kan worden geaccepteerd.",
"acceptance.reportDrawer.close": "Sluit het ronderapport",
"acceptance.requirementEmpty": "Nog geen acceptatiedoel geregistreerd voor dit onderwerp.",
+ "acceptance.requirementEmptyEditable": "Nog geen acceptatiedoel — klik om er een toe te voegen.",
"acceptance.requirementLabel": "Acceptatiebalk",
"acceptance.review.accept": "Accepteren",
"acceptance.review.acceptAll": "Alles accepteren",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Bestand",
"report.evidence.category.image": "Afbeelding",
"report.evidence.category.video": "Video",
+ "report.evidence.collapse": "Inklappen",
"report.evidence.comparison.after": "Na",
"report.evidence.comparison.before": "Voor",
"report.evidence.count": "{{count}} bewijsstuk(ken)",
+ "report.evidence.expand": "Uitklappen",
"report.evidence.inlineFallback": "Inline bewijs {{index}}",
"report.evidence.medium.dom_snapshot": "DOM-snapshot",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Screenshot",
"report.evidence.medium.text": "Tekst",
"report.evidence.medium.transcript": "Transcript",
diff --git a/locales/pl-PL/verify.json b/locales/pl-PL/verify.json
index 5fd023d4d06..6b374760e07 100644
--- a/locales/pl-PL/verify.json
+++ b/locales/pl-PL/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Wymaga poprawy {{count}}",
"acceptance.filter.pending": "Do recenzji {{count}}",
"acceptance.filter.roundAll": "Wszystkie rundy",
+ "acceptance.goalEdit": "Edytuj cel akceptacji",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} zaakceptowane",
"acceptance.group.allVerified": "{{passed}}/{{total}} wszystkie zweryfikowane i zaakceptowane",
"acceptance.group.collapse": "Zwiń {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Opisz, co musi się zmienić, aby ta dostawa mogła zostać zaakceptowana.",
"acceptance.reportDrawer.close": "Zamknij raport rundy",
"acceptance.requirementEmpty": "Nie zarejestrowano jeszcze celu akceptacji dla tego tematu.",
+ "acceptance.requirementEmptyEditable": "Brak celu akceptacji — kliknij, aby dodać.",
"acceptance.requirementLabel": "Próg akceptacji",
"acceptance.review.accept": "Zaakceptuj",
"acceptance.review.acceptAll": "Zaakceptuj wszystko",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Plik",
"report.evidence.category.image": "Obraz",
"report.evidence.category.video": "Wideo",
+ "report.evidence.collapse": "Zwiń",
"report.evidence.comparison.after": "Po",
"report.evidence.comparison.before": "Przed",
"report.evidence.count": "{{count}} dowodów",
+ "report.evidence.expand": "Rozwiń",
"report.evidence.inlineFallback": "Dowód w linii {{index}}",
"report.evidence.medium.dom_snapshot": "Migawka DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Zrzut ekranu",
"report.evidence.medium.text": "Tekst",
"report.evidence.medium.transcript": "Transkrypt",
diff --git a/locales/pt-BR/verify.json b/locales/pt-BR/verify.json
index 4f2a3e779f3..4987fe08dbe 100644
--- a/locales/pt-BR/verify.json
+++ b/locales/pt-BR/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Precisa de correção {{count}}",
"acceptance.filter.pending": "Para revisar {{count}}",
"acceptance.filter.roundAll": "Todas as rodadas",
+ "acceptance.goalEdit": "Editar a meta de aceitação",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} aceitos",
"acceptance.group.allVerified": "{{passed}}/{{total}} todos verificados e aceitos",
"acceptance.group.collapse": "Recolher {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Descreva o que deve mudar antes que esta entrega possa ser aceita.",
"acceptance.reportDrawer.close": "Fechar o relatório da rodada",
"acceptance.requirementEmpty": "Nenhuma meta de aceitação registrada para este assunto ainda.",
+ "acceptance.requirementEmptyEditable": "Ainda não há meta de aceitação — clique para adicionar uma.",
"acceptance.requirementLabel": "Barra de aceitação",
"acceptance.review.accept": "Aceitar",
"acceptance.review.acceptAll": "Aceitar tudo",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Arquivo",
"report.evidence.category.image": "Imagem",
"report.evidence.category.video": "Vídeo",
+ "report.evidence.collapse": "Recolher",
"report.evidence.comparison.after": "Depois",
"report.evidence.comparison.before": "Antes",
"report.evidence.count": "{{count}} evidências",
+ "report.evidence.expand": "Expandir",
"report.evidence.inlineFallback": "Evidência inline {{index}}",
"report.evidence.medium.dom_snapshot": "Captura de DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Captura de tela",
"report.evidence.medium.text": "Texto",
"report.evidence.medium.transcript": "Transcrição",
diff --git a/locales/ru-RU/verify.json b/locales/ru-RU/verify.json
index c76b36eb103..6c53be2eea3 100644
--- a/locales/ru-RU/verify.json
+++ b/locales/ru-RU/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Требует исправления {{count}}",
"acceptance.filter.pending": "Для обзора {{count}}",
"acceptance.filter.roundAll": "Все раунды",
+ "acceptance.goalEdit": "Редактировать цель принятия",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} принято",
"acceptance.group.allVerified": "{{passed}}/{{total}} полностью проверено и принято",
"acceptance.group.collapse": "Свернуть {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Опишите, что должно измениться, чтобы эта доставка могла быть принята.",
"acceptance.reportDrawer.close": "Закрыть отчет раунда",
"acceptance.requirementEmpty": "Цель принятия для этого объекта пока не записана.",
+ "acceptance.requirementEmptyEditable": "Цель принятия пока отсутствует — нажмите, чтобы добавить.",
"acceptance.requirementLabel": "Планка принятия",
"acceptance.review.accept": "Принять",
"acceptance.review.acceptAll": "Принять все",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Файл",
"report.evidence.category.image": "Изображение",
"report.evidence.category.video": "Видео",
+ "report.evidence.collapse": "Свернуть",
"report.evidence.comparison.after": "После",
"report.evidence.comparison.before": "До",
"report.evidence.count": "{{count}} доказательств",
+ "report.evidence.expand": "Развернуть",
"report.evidence.inlineFallback": "Встроенное доказательство {{index}}",
"report.evidence.medium.dom_snapshot": "Снимок DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Скриншот",
"report.evidence.medium.text": "Текст",
"report.evidence.medium.transcript": "Транскрипт",
diff --git a/locales/tr-TR/verify.json b/locales/tr-TR/verify.json
index 9b95fb49309..2eb9c66644d 100644
--- a/locales/tr-TR/verify.json
+++ b/locales/tr-TR/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Düzeltme gerekiyor {{count}}",
"acceptance.filter.pending": "İncelenecek {{count}}",
"acceptance.filter.roundAll": "Tüm turlar",
+ "acceptance.goalEdit": "Kabul hedefini düzenle",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} kabul edildi",
"acceptance.group.allVerified": "{{passed}}/{{total}} tümü doğrulandı ve kabul edildi",
"acceptance.group.collapse": "{{label}} öğesini daralt",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Bu teslimatın kabul edilebilmesi için neyin değişmesi gerektiğini açıklayın.",
"acceptance.reportDrawer.close": "Tur raporunu kapat",
"acceptance.requirementEmpty": "Bu konu için henüz bir kabul hedefi kaydedilmedi.",
+ "acceptance.requirementEmptyEditable": "Henüz bir kabul hedefi yok — eklemek için tıklayın.",
"acceptance.requirementLabel": "Kabul barı",
"acceptance.review.accept": "Kabul et",
"acceptance.review.acceptAll": "Hepsini kabul et",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Dosya",
"report.evidence.category.image": "Görüntü",
"report.evidence.category.video": "Video",
+ "report.evidence.collapse": "Daralt",
"report.evidence.comparison.after": "Sonra",
"report.evidence.comparison.before": "Önce",
"report.evidence.count": "{{count}} kanıt",
+ "report.evidence.expand": "Genişlet",
"report.evidence.inlineFallback": "Satır içi kanıt {{index}}",
"report.evidence.medium.dom_snapshot": "DOM anlık görüntüsü",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Ekran görüntüsü",
"report.evidence.medium.text": "Metin",
"report.evidence.medium.transcript": "Transkript",
diff --git a/locales/vi-VN/verify.json b/locales/vi-VN/verify.json
index c9d0efc3c17..ae0f7b78f36 100644
--- a/locales/vi-VN/verify.json
+++ b/locales/vi-VN/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "Cần sửa {{count}}",
"acceptance.filter.pending": "Cần đánh giá {{count}}",
"acceptance.filter.roundAll": "Tất cả các vòng",
+ "acceptance.goalEdit": "Chỉnh sửa mục tiêu chấp nhận",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} đã chấp nhận",
"acceptance.group.allVerified": "{{passed}}/{{total}} tất cả đã được xác minh & chấp nhận",
"acceptance.group.collapse": "Thu gọn {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "Mô tả những gì cần thay đổi trước khi giao hàng này có thể được chấp nhận.",
"acceptance.reportDrawer.close": "Đóng báo cáo vòng",
"acceptance.requirementEmpty": "Chưa có mục tiêu chấp nhận nào được ghi nhận cho chủ đề này.",
+ "acceptance.requirementEmptyEditable": "Chưa có mục tiêu chấp nhận — nhấp để thêm một mục.",
"acceptance.requirementLabel": "Tiêu chuẩn chấp nhận",
"acceptance.review.accept": "Chấp nhận",
"acceptance.review.acceptAll": "Chấp nhận tất cả",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "Tệp",
"report.evidence.category.image": "Hình ảnh",
"report.evidence.category.video": "Video",
+ "report.evidence.collapse": "Thu gọn",
"report.evidence.comparison.after": "Sau",
"report.evidence.comparison.before": "Trước",
"report.evidence.count": "{{count}} bằng chứng",
+ "report.evidence.expand": "Mở rộng",
"report.evidence.inlineFallback": "Bằng chứng nội tuyến {{index}}",
"report.evidence.medium.dom_snapshot": "Ảnh chụp DOM",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "Ảnh chụp màn hình",
"report.evidence.medium.text": "Văn bản",
"report.evidence.medium.transcript": "Bản ghi",
diff --git a/locales/zh-CN/verify.json b/locales/zh-CN/verify.json
index e9cf3095678..73190f152a3 100644
--- a/locales/zh-CN/verify.json
+++ b/locales/zh-CN/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "待修复 {{count}}",
"acceptance.filter.pending": "未验收 {{count}}",
"acceptance.filter.roundAll": "全部轮次",
+ "acceptance.goalEdit": "编辑验收目标",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 已验收",
"acceptance.group.allVerified": "{{passed}}/{{total}} 已全部验证通过",
"acceptance.group.collapse": "收起{{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "说明打回原因,例如:深色模式需补截图证据……",
"acceptance.reportDrawer.close": "关闭该轮报告",
"acceptance.requirementEmpty": "尚未记录该对象的验收目标。",
+ "acceptance.requirementEmptyEditable": "尚未记录验收目标,点击填写。",
"acceptance.requirementLabel": "验收目标",
"acceptance.review.accept": "验收通过",
"acceptance.review.acceptAll": "全部验收",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "文件",
"report.evidence.category.image": "图片",
"report.evidence.category.video": "视频",
+ "report.evidence.collapse": "收起",
"report.evidence.comparison.after": "优化后",
"report.evidence.comparison.before": "优化前",
"report.evidence.count": "{{count}} 条证据",
+ "report.evidence.expand": "展开全部",
"report.evidence.inlineFallback": "内联证据 {{index}}",
"report.evidence.medium.dom_snapshot": "DOM 快照",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "截图",
"report.evidence.medium.text": "文本",
"report.evidence.medium.transcript": "会话记录",
diff --git a/locales/zh-TW/verify.json b/locales/zh-TW/verify.json
index 829b94ad737..756c7750524 100644
--- a/locales/zh-TW/verify.json
+++ b/locales/zh-TW/verify.json
@@ -68,6 +68,7 @@
"acceptance.filter.needsFix": "需要修復 {{count}}",
"acceptance.filter.pending": "待審查 {{count}}",
"acceptance.filter.roundAll": "所有回合",
+ "acceptance.goalEdit": "編輯接受目標",
"acceptance.group.acceptedRatio": "{{accepted}}/{{total}} 已接受",
"acceptance.group.allVerified": "{{passed}}/{{total}} 全部驗證並接受",
"acceptance.group.collapse": "摺疊 {{label}}",
@@ -102,6 +103,7 @@
"acceptance.reject.placeholder": "描述在此交付被接受之前必須更改的內容。",
"acceptance.reportDrawer.close": "關閉回合報告",
"acceptance.requirementEmpty": "尚未記錄此主題的接受目標。",
+ "acceptance.requirementEmptyEditable": "尚無接受目標 — 點擊以新增。",
"acceptance.requirementLabel": "接受標準",
"acceptance.review.accept": "接受",
"acceptance.review.acceptAll": "全部接受",
@@ -263,12 +265,15 @@
"report.evidence.category.file": "檔案",
"report.evidence.category.image": "圖片",
"report.evidence.category.video": "影片",
+ "report.evidence.collapse": "收起",
"report.evidence.comparison.after": "之後",
"report.evidence.comparison.before": "之前",
"report.evidence.count": "{{count}} 項證據",
+ "report.evidence.expand": "展開",
"report.evidence.inlineFallback": "內嵌證據 {{index}}",
"report.evidence.medium.dom_snapshot": "DOM快照",
"report.evidence.medium.gif": "GIF",
+ "report.evidence.medium.markdown": "Markdown",
"report.evidence.medium.screenshot": "截圖",
"report.evidence.medium.text": "文字",
"report.evidence.medium.transcript": "文字記錄",
diff --git a/packages/const/src/verify.ts b/packages/const/src/verify.ts
index 7d940605b32..91a6a44589f 100644
--- a/packages/const/src/verify.ts
+++ b/packages/const/src/verify.ts
@@ -178,6 +178,9 @@ export const verifyEvidenceTypes = [
'gif',
'video',
'text',
+ // Prose evidence (root-cause write-ups, structured findings) — rendered as
+ // body markdown instead of the monospace raw-text box `text` gets.
+ 'markdown',
'dom_snapshot',
'transcript',
] as const;
diff --git a/packages/database/src/models/__tests__/acceptance.test.ts b/packages/database/src/models/__tests__/acceptance.test.ts
index 35aec416c14..ccfb379d778 100644
--- a/packages/database/src/models/__tests__/acceptance.test.ts
+++ b/packages/database/src/models/__tests__/acceptance.test.ts
@@ -107,6 +107,19 @@ describe('AcceptanceModel', () => {
await model.updateStatus(row.id, 'verifying');
expect((await model.findById(row.id))?.completedAt).toBeNull();
});
+
+ it('findById reads a malformed uuid as not-found instead of aborting in Postgres', async () => {
+ // Chat autolinkers glue trailing CJK punctuation onto shared links, so the
+ // route param can arrive as `<uuid>(本轮` — 22P02 (→ 500) before the guard.
+ const model = new AcceptanceModel(serverDB, userId);
+ const row = await model.ensureForSubject('topic', topicId);
+
+ await expect(model.findById(`${row.id}(本轮`)).resolves.toBeUndefined();
+ await expect(model.findById('not-a-uuid')).resolves.toBeUndefined();
+
+ const runModel = new VerifyRunModel(serverDB, userId);
+ await expect(runModel.findById(`${row.id}(本轮`)).resolves.toBeUndefined();
+ });
});
describe('VerifyRunModel acceptance chain', () => {
diff --git a/packages/database/src/models/acceptance.ts b/packages/database/src/models/acceptance.ts
index 26ed7ebcf88..ad8989158eb 100644
--- a/packages/database/src/models/acceptance.ts
+++ b/packages/database/src/models/acceptance.ts
@@ -4,6 +4,7 @@ import { and, desc, eq } from 'drizzle-orm';
import type { AcceptanceItem, NewAcceptance } from '../schemas/verify';
import { acceptances } from '../schemas/verify';
import type { LobeChatDatabase } from '../type';
+import { isUuid } from '../utils/uuid';
import { buildWorkspacePayload, buildWorkspaceWhere } from '../utils/workspace';
/** Statuses a user's decision produced — sticky until a new round re-opens the loop. */
@@ -53,6 +54,9 @@ export class AcceptanceModel {
};
findById = async (id: string) => {
+ // A malformed id (e.g. an autolinker glued trailing punctuation onto a
+ // shared link) would abort the query with 22P02 — read it as "not found".
+ if (!isUuid(id)) return undefined;
return this.db.query.acceptances.findFirst({
where: and(eq(acceptances.id, id), this.ownership()),
});
diff --git a/packages/database/src/models/verifyRun.ts b/packages/database/src/models/verifyRun.ts
index 839a41d78d7..9bff892a7ce 100644
--- a/packages/database/src/models/verifyRun.ts
+++ b/packages/database/src/models/verifyRun.ts
@@ -12,6 +12,7 @@ import { agentOperations } from '../schemas/agentOperations';
import type { NewVerifyRun, VerifyRunItem } from '../schemas/verify';
import { verifyRuns } from '../schemas/verify';
import type { LobeChatDatabase } from '../type';
+import { isUuid } from '../utils/uuid';
import { buildWorkspacePayload, buildWorkspaceWhere } from '../utils/workspace';
/**
@@ -144,6 +145,9 @@ export class VerifyRunModel {
};
findById = async (id: string) => {
+ // A malformed id (e.g. an autolinker glued trailing punctuation onto a
+ // shared link) would abort the query with 22P02 — read it as "not found".
+ if (!isUuid(id)) return undefined;
return this.db.query.verifyRuns.findFirst({
where: and(eq(verifyRuns.id, id), this.ownership()),
});
diff --git a/packages/database/src/utils/uuid.ts b/packages/database/src/utils/uuid.ts
new file mode 100644
index 00000000000..2cef909863a
--- /dev/null
+++ b/packages/database/src/utils/uuid.ts
@@ -0,0 +1,10 @@
+const UUID_RE = /^[\dA-F]{8}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{12}$/i;
+
+/**
+ * Whether a string is a well-formed UUID. External ids (URL params, chat
+ * links) reach uuid-typed columns as-is, and Postgres aborts the whole query
+ * with 22P02 on a malformed value — surfacing as a 500 instead of "not found".
+ * Autolinkers gluing trailing CJK punctuation onto a shared link is the common
+ * real-world producer of such ids.
+ */
+export const isUuid = (value: string): boolean => UUID_RE.test(value);
diff --git a/packages/locales/src/default/verify.ts b/packages/locales/src/default/verify.ts
index 19525381009..abe9b0f54a9 100644
--- a/packages/locales/src/default/verify.ts
+++ b/packages/locales/src/default/verify.ts
@@ -80,6 +80,7 @@ export default {
'acceptance.filter.needsFix': 'Needs fix {{count}}',
'acceptance.filter.pending': 'To review {{count}}',
'acceptance.filter.roundAll': 'All rounds',
+ 'acceptance.goalEdit': 'Edit the acceptance goal',
'acceptance.group.acceptedRatio': '{{accepted}}/{{total}} accepted',
'acceptance.group.allVerified': '{{passed}}/{{total}} all verified & accepted',
'acceptance.group.collapse': 'Collapse {{label}}',
@@ -146,6 +147,7 @@ export default {
'acceptance.review.revertToReject': 'Change to reject with comment',
'acceptance.review.supplement': 'Additional notes (optional)',
'acceptance.requirementEmpty': 'No acceptance goal recorded for this subject yet.',
+ 'acceptance.requirementEmptyEditable': 'No acceptance goal yet — click to add one.',
'acceptance.requirementLabel': 'Acceptance goal',
'acceptance.review.zoomIn': 'Zoom in',
'acceptance.review.zoomOut': 'Zoom out',
@@ -300,8 +302,10 @@ export default {
'report.evidence.category.video': 'Video',
'report.evidence.count': '{{count}} evidence',
'report.evidence.inlineFallback': 'Inline evidence {{index}}',
+ 'report.evidence.collapse': 'Collapse',
'report.evidence.comparison.after': 'After',
'report.evidence.comparison.before': 'Before',
+ 'report.evidence.expand': 'Expand',
'report.evidence.openDetail': 'Open {{name}}',
'report.evidence.view': 'View evidence ({{count}})',
'report.filter.all': 'All',
@@ -338,6 +342,7 @@ export default {
'report.overview.uncertain': 'Uncertain',
'report.evidence.medium.dom_snapshot': 'DOM snapshot',
'report.evidence.medium.gif': 'GIF',
+ 'report.evidence.medium.markdown': 'Markdown',
'report.evidence.medium.screenshot': 'Screenshot',
'report.evidence.medium.text': 'Text',
'report.evidence.medium.transcript': 'Transcript',
diff --git a/packages/types/src/verify.ts b/packages/types/src/verify.ts
index 3297650dec8..8c3b88c60c4 100644
--- a/packages/types/src/verify.ts
+++ b/packages/types/src/verify.ts
@@ -260,7 +260,7 @@ export type VerifySurface = 'web' | 'desktop' | 'cli' | 'mobile' | 'bot';
/** The medium of a captured evidence artifact. */
export type VerifyEvidenceType =
- 'screenshot' | 'gif' | 'video' | 'text' | 'dom_snapshot' | 'transcript';
+ 'screenshot' | 'gif' | 'video' | 'text' | 'markdown' | 'dom_snapshot' | 'transcript';
/** Who / what captured an evidence artifact (provenance). */
export type VerifyEvidenceCapturedBy = 'agent-browser' | 'cdp' | 'cli' | 'program' | 'llm_judge';
diff --git a/src/features/Verify/Acceptance/CheckList.tsx b/src/features/Verify/Acceptance/CheckList.tsx
index 726077457df..b2512bcd1c0 100644
--- a/src/features/Verify/Acceptance/CheckList.tsx
+++ b/src/features/Verify/Acceptance/CheckList.tsx
@@ -42,6 +42,11 @@ import {
EvidenceComparisonCard,
readEvidenceComparison,
} from '../components/EvidenceComparisonCard';
+import {
+ CollapsibleMarkdownEvidence,
+ EvidenceFileCard,
+ markdownTextEvidenceTypes,
+} from '../components/MarkdownEvidence';
import { AnnotatedImage } from './Annotation';
import { AttachmentThumbs } from './attachments';
import { openCheckRejectModal } from './CheckRejectModal';
@@ -314,7 +319,8 @@ const EVIDENCE_BADGES = [
/** A filename is not a caption — only descriptive text renders under the artifact. */
const isFilename = (value: string | null | undefined) =>
- !value || /^[\w.-]+\.(?:gif|jpe?g|mp4|png|webm|webp)$/i.test(value);
+ !value ||
+ /^[\w.-]+\.(?:gif|html?|jpe?g|json|log|markdown|md|mp4|png|txt|webm|webp)$/i.test(value);
/**
* Reserve the image's box before it loads — with the stored intrinsic size the
@@ -431,6 +437,13 @@ const EvidenceList = memo<{ evidence: AcceptanceEvidence[] }>(({ evidence }) =>
{caption}
</Flexbox>
);
+ if (item.content && markdownTextEvidenceTypes.has(item.type))
+ return (
+ <Flexbox gap={4} key={item.id}>
+ <CollapsibleMarkdownEvidence>{item.content}</CollapsibleMarkdownEvidence>
+ {caption}
+ </Flexbox>
+ );
if (item.content)
return (
<Flexbox gap={4} key={item.id}>
@@ -438,6 +451,16 @@ const EvidenceList = memo<{ evidence: AcceptanceEvidence[] }>(({ evidence }) =>
{caption}
</Flexbox>
);
+ if (item.fileUrl && markdownTextEvidenceTypes.has(item.type))
+ return (
+ <EvidenceFileCard
+ markdown
+ description={item.description}
+ fileName={item.fileName}
+ key={item.id}
+ url={item.fileUrl}
+ />
+ );
return null;
})}
</Flexbox>
diff --git a/src/features/Verify/Acceptance/index.tsx b/src/features/Verify/Acceptance/index.tsx
index 146a04a2c01..8d51bb60c08 100644
--- a/src/features/Verify/Acceptance/index.tsx
+++ b/src/features/Verify/Acceptance/index.tsx
@@ -29,6 +29,7 @@ import {
Loader2,
MessagesSquare,
PanelRightOpen,
+ PencilLine,
RefreshCw,
RotateCcw,
SquareArrowOutUpRight,
@@ -39,6 +40,7 @@ import { useParams, useSearchParams } from 'react-router';
import NeuralNetworkLoading from '@/components/NeuralNetworkLoading';
import AgentProfilePopup from '@/features/AgentProfileCard/AgentProfilePopup';
+import { openGoalModal } from '@/features/Conversation/ChatInput/VerifyTray/GoalModal';
// The workspace-scoped mutate — a bare `import { mutate } from 'swr'` misses
// every `useClientDataSWR` subscriber (augmented keys + custom cache provider).
import { mutate as globalMutate } from '@/libs/swr';
@@ -47,6 +49,7 @@ import { verifyService } from '@/services/verify';
import { useAcceptanceBundle } from '../hooks';
import ReportViewer from '../ReportViewer';
+import { extractUuid, resolveRoundParam } from '../utils';
import CheckList, {
type CheckFilter,
checkFilterState,
@@ -195,7 +198,9 @@ interface AcceptancePageProps {
const AcceptancePage = memo<AcceptancePageProps>(
({ acceptanceId: explicitAcceptanceId, onDraftToComposer }) => {
const params = useParams<{ acceptanceId: string }>();
- const acceptanceId = explicitAcceptanceId ?? params.acceptanceId;
+ // Route params come from shared links whose autolinker may have glued
+ // trailing punctuation onto the id — salvage the leading UUID.
+ const acceptanceId = explicitAcceptanceId ?? extractUuid(params.acceptanceId);
const isEmbedded = Boolean(explicitAcceptanceId);
const { t } = useTranslation('verify');
const { data, error, isLoading, mutate } = useAcceptanceBundle(acceptanceId ?? null);
@@ -268,6 +273,19 @@ const AcceptancePage = memo<AcceptancePageProps>(
if (isNarrowViewport) setLedgerExpand(false);
}, [isNarrowViewport]);
const [reportRound, setReportRound] = useState<AcceptanceRound | null>(null);
+ // `?r=<roundIndex>` deep-links one round's full report — a durable
+ // per-round snapshot URL (standalone page only; the portal embed rides the
+ // chat URL). The URL is the source of truth in BOTH directions: a resolved
+ // round opens the drawer, and a removed/unresolvable param closes it (a
+ // same-route navigation to the bare URL must not leave a stale drawer up).
+ // In-page opens/closes don't fight this sync — `openReport` writes state
+ // and param together, so by the time the param change lands here they
+ // already agree.
+ const urlRoundRaw = searchParams.get('r');
+ useEffect(() => {
+ if (isEmbedded || !data) return;
+ setReportRound(resolveRoundParam(data.rounds, urlRoundRaw));
+ }, [isEmbedded, data, urlRoundRaw]);
const [pending, setPending] = useState(false);
const [rerunPending, setRerunPending] = useState(false);
const [actionError, setActionError] = useState<string>();
@@ -487,11 +505,46 @@ const AcceptancePage = memo<AcceptancePageProps>(
setLedgerExpand(true);
};
+ // Open/close the round report drawer AND mirror it to `?r=` (standalone
+ // page only) so the address bar is always a copyable snapshot link for the
+ // round being viewed.
+ const openReport = (round: AcceptanceRound | null) => {
+ setReportRound(round);
+ if (isEmbedded) return;
+ setSearchParams(
+ (prev) => {
+ const params = new URLSearchParams(prev);
+ if (round?.run.roundIndex == null) params.delete('r');
+ else params.set('r', String(round.run.roundIndex));
+ return params;
+ },
+ { replace: true },
+ );
+ };
+
// Per-check user review — accept settles a check for good; reject records
// the feedback the next verify round reads.
const handleReview = (input: CheckReviewInput) =>
runAction(() => verifyService.reviewChecks({ id: acceptance.id, ...input }));
+ // The acceptance goal is a user-editable field — reuse the tray's goal
+ // modal so both entry points write the same subject-level requirement. A
+ // failed save is toasted here and rethrown so the modal stays open with
+ // the draft intact.
+ const handleEditGoal = () =>
+ openGoalModal({
+ initialGoal: acceptance.requirement ?? undefined,
+ onSubmit: async (goal) => {
+ try {
+ await verifyService.saveAcceptanceGoal(subject.type, subject.id, goal);
+ } catch (cause) {
+ toast.error(cause instanceof Error ? cause.message : t('acceptance.actionError'));
+ throw cause;
+ }
+ await mutate();
+ },
+ });
+
// Group-scoped feedback — for concerns that belong to no single check (the
// checks themselves may be accepted) yet must reach the next round.
const handleGroupFeedback = (category: string, comment: string, fileIds: string[]) =>
@@ -827,10 +880,36 @@ const AcceptancePage = memo<AcceptancePageProps>(
it, never the headline. */}
<Flexbox className={styles.card} gap={12} padding={16}>
<Flexbox gap={4}>
- <Text className={styles.requirementLabel}>{t('acceptance.requirementLabel')}</Text>
- <Text style={{ fontSize: 15, lineHeight: 1.7 }}>
- {acceptance.requirement ?? t('acceptance.requirementEmpty')}
- </Text>
+ <Flexbox horizontal align={'center'} gap={4}>
+ <Text className={styles.requirementLabel}>
+ {t('acceptance.requirementLabel')}
+ </Text>
+ {isOwner && (
+ <ActionIcon
+ icon={PencilLine}
+ size={'small'}
+ title={t('acceptance.goalEdit')}
+ onClick={handleEditGoal}
+ />
+ )}
+ </Flexbox>
+ {acceptance.requirement ? (
+ <Text style={{ fontSize: 15, lineHeight: 1.7 }}>{acceptance.requirement}</Text>
+ ) : isOwner ? (
+ // The empty state is itself the entry: the whole line invites
+ // the owner to record the goal, not just the pencil above.
+ <Text
+ className={styles.scopeLink}
+ style={{ fontSize: 15, lineHeight: 1.7 }}
+ onClick={handleEditGoal}
+ >
+ {t('acceptance.requirementEmptyEditable')}
+ </Text>
+ ) : (
+ <Text style={{ fontSize: 15, lineHeight: 1.7 }}>
+ {t('acceptance.requirementEmpty')}
+ </Text>
+ )}
</Flexbox>
{(latestReport?.summary || scope) && (
<Flexbox
@@ -852,7 +931,7 @@ const AcceptancePage = memo<AcceptancePageProps>(
<span
className={styles.viewReportLink}
onClick={() =>
- setReportRound([...rounds].reverse().find((r) => r.report) ?? null)
+ openReport([...rounds].reverse().find((r) => r.report) ?? null)
}
>
{t('acceptance.viewFullReport')}
@@ -1086,7 +1165,7 @@ const AcceptancePage = memo<AcceptancePageProps>(
reviewByRound={reviewByRound}
rounds={rounds}
onCollapse={() => setLedgerExpand(false)}
- onOpenReport={setReportRound}
+ onOpenReport={openReport}
/>
</Drawer>
) : (
@@ -1104,7 +1183,7 @@ const AcceptancePage = memo<AcceptancePageProps>(
reviewByRound={reviewByRound}
rounds={rounds}
onCollapse={() => setLedgerExpand(false)}
- onOpenReport={setReportRound}
+ onOpenReport={openReport}
/>
</Flexbox>
</DraggablePanel>
@@ -1126,7 +1205,7 @@ const AcceptancePage = memo<AcceptancePageProps>(
body: { height: '100%', padding: 0 },
bodyContent: { height: '100%', minHeight: 0, overflow: 'hidden' },
}}
- onClose={() => setReportRound(null)}
+ onClose={() => openReport(null)}
>
{reportRound && (
<Flexbox style={{ height: '100%', position: 'relative' }}>
diff --git a/src/features/Verify/ReportViewer.tsx b/src/features/Verify/ReportViewer.tsx
index 54cfb26c00e..60dd53ba525 100644
--- a/src/features/Verify/ReportViewer.tsx
+++ b/src/features/Verify/ReportViewer.tsx
@@ -13,18 +13,7 @@ import type {
VerifyVerdict,
} from '@lobechat/types';
import { toRecord } from '@lobechat/utils/object';
-import {
- Block,
- Center,
- Drawer,
- Empty,
- Flexbox,
- Highlighter,
- Icon,
- Image,
- Markdown,
- Text,
-} from '@lobehub/ui';
+import { Block, Center, Drawer, Empty, Flexbox, Icon, Image, Markdown, Text } from '@lobehub/ui';
import { Button } from '@lobehub/ui/base-ui';
import { createStaticStyles, cssVar, cx } from 'antd-style';
import type { TFunction } from 'i18next';
@@ -57,9 +46,7 @@ import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router';
import Loading from '@/components/Loading/BrandTextLoading';
-import { useTextFileLoader } from '@/features/FileViewer/hooks/useTextFileLoader';
import type { VerifyEvidenceWithUrl } from '@/services/verify';
-import { getLanguageFromFilename } from '@/utils/fileLanguage';
import {
EvidenceComparisonCard,
@@ -67,20 +54,23 @@ import {
isFilenameLike,
readEvidenceComparison,
} from './components/EvidenceComparisonCard';
+import {
+ CollapsibleMarkdownEvidence,
+ DocumentViewer,
+ filenameFromUrl,
+ markdownTextEvidenceTypes,
+} from './components/MarkdownEvidence';
import { useVerifyReportBundle } from './hooks';
-import { buildCheckRows, type CheckRowData, type CheckState, renderableSurfaces } from './utils';
+import {
+ buildCheckRows,
+ type CheckRowData,
+ type CheckState,
+ extractUuid,
+ renderableSurfaces,
+} from './utils';
type Filter = 'all' | CheckState;
-/** Best-effort filename from a (possibly signed) file URL, for syntax highlighting. */
-const filenameFromUrl = (url: string): string => {
- try {
- return new URL(url).pathname.split('/').pop() || 'document';
- } catch {
- return 'document';
- }
-};
-
const styles = createStaticStyles(({ css }) => ({
scroll: css`
overflow: auto;
@@ -882,12 +872,6 @@ const styles = createStaticStyles(({ css }) => ({
border: 1px solid ${cssVar.colorBorderSecondary};
border-radius: ${cssVar.borderRadius};
`,
- docViewer: css`
- overflow: auto;
- height: 100%;
- padding-block: 12px;
- padding-inline: 16px;
- `,
}));
const VERDICT_META: Record<
@@ -938,7 +922,12 @@ const imageEvidenceTypes = new Set(['gif', 'screenshot']);
const isInlineVisualEvidence = (evidence: VerifyEvidenceWithUrl) =>
Boolean(evidence.fileUrl && (imageEvidenceTypes.has(evidence.type) || evidence.type === 'video'));
-/** Evidence with a directly renderable payload in the check body, no click-to-open. */
+/**
+ * Evidence with a directly renderable payload in the check body, no
+ * click-to-open. File-backed documents stay behind the file card on purpose —
+ * an uploaded artifact is long by definition, and rendering it inline drowns
+ * the check list.
+ */
const isInlineEvidence = (evidence: VerifyEvidenceWithUrl) =>
Boolean(evidence.content) || isInlineVisualEvidence(evidence);
@@ -1111,42 +1100,6 @@ const evidenceComparison = (evidence: VerifyEvidenceWithUrl): EvidenceComparison
return readEvidenceComparison(evidence.metadata);
};
-/** A file-backed text evidence, decoded + syntax highlighted (avoids mojibake). */
-const DocumentViewer = memo<{ fileName?: string | null; url: string }>(({ fileName, url }) => {
- const { t } = useTranslation('verify');
- const { fileData, loading, error } = useTextFileLoader(url);
-
- if (loading)
- return (
- <Center flex={1} height={'100%'}>
- <Loading debugId="verify-document-viewer" />
- </Center>
- );
-
- if (error || fileData === null)
- return (
- <Center flex={1} gap={8} height={'100%'}>
- <Text type="secondary">{t('report.document.failed')}</Text>
- <a href={url} rel="noreferrer" target="_blank">
- {t('report.document.openOriginal')}
- </a>
- </Center>
- );
-
- return (
- <Flexbox className={styles.docViewer}>
- <Highlighter
- wrap
- language={getLanguageFromFilename(fileName || filenameFromUrl(url))}
- showLanguage={false}
- variant={'borderless'}
- >
- {fileData}
- </Highlighter>
- </Flexbox>
- );
-});
-
const InteractionCostPanel = memo<{ cost: VerifyInteractionCost }>(({ cost }) => {
const { t } = useTranslation('verify');
const phases = cost.phases ?? [];
@@ -1262,11 +1215,14 @@ const EvidenceItem = memo<{
const description = e.description && e.description !== label ? e.description : null;
// Inline media (image/gif/video) speaks for itself — the raw filename header
// is visual noise, so only keep a meaningful caption (description) for it.
+ // Prose evidence gets the same treatment: a "root-cause.txt" header above a
+ // rendered markdown body would re-introduce the attachment look.
const isMedia = isInlineVisualEvidence(e);
+ const hideLabel = isMedia || (markdownTextEvidenceTypes.has(e.type) && isFilenameLike(label));
return (
<Flexbox gap={6}>
- {!isMedia && (
+ {!hideLabel && (
<Text strong fontSize={13}>
{label}
</Text>
@@ -1292,8 +1248,14 @@ const EvidenceItem = memo<{
<video controls className={styles.evidenceVideo} src={e.fileUrl} />
) : e.fileUrl ? (
<div className={styles.evidenceDoc}>
- <DocumentViewer fileName={e.fileName} url={e.fileUrl} />
+ <DocumentViewer
+ fileName={e.fileName}
+ markdown={markdownTextEvidenceTypes.has(e.type)}
+ url={e.fileUrl}
+ />
</div>
+ ) : e.content && markdownTextEvidenceTypes.has(e.type) ? (
+ <CollapsibleMarkdownEvidence>{e.content}</CollapsibleMarkdownEvidence>
) : e.content ? (
<div className={styles.evidenceText}>{e.content}</div>
) : (
@@ -1747,7 +1709,9 @@ interface ReportViewerProps {
const ReportViewer = memo<ReportViewerProps>(({ runId: explicitRunId }) => {
const { t } = useTranslation('verify');
const { runId: routeRunId } = useParams<{ runId: string }>();
- const verifyRunId = explicitRunId ?? routeRunId ?? null;
+ // Route params come from shared links whose autolinker may have glued
+ // trailing punctuation onto the id — salvage the leading UUID.
+ const verifyRunId = explicitRunId ?? extractUuid(routeRunId) ?? null;
const { data, error, isLoading, mutate } = useVerifyReportBundle(verifyRunId);
const [filter, setFilter] = useState<Filter>('all');
diff --git a/src/features/Verify/components/EvidenceComparisonCard.tsx b/src/features/Verify/components/EvidenceComparisonCard.tsx
index e774d98614d..5a76f089949 100644
--- a/src/features/Verify/components/EvidenceComparisonCard.tsx
+++ b/src/features/Verify/components/EvidenceComparisonCard.tsx
@@ -27,7 +27,8 @@ const toRecord = (value: unknown): Record<string, unknown> | null =>
/** A bare filename is not a caption — only descriptive prose reads on the band. */
export const isFilenameLike = (value?: string | null) =>
- !value || /^[\w.-]+\.(?:gif|jpe?g|mp4|png|webm|webp)$/i.test(value);
+ !value ||
+ /^[\w.-]+\.(?:gif|html?|jpe?g|json|log|markdown|md|mp4|png|txt|webm|webp)$/i.test(value);
/** Parse an evidence row's `metadata.comparison`, or null when it carries none. */
export const readEvidenceComparison = (metadata: unknown): EvidenceComparisonMeta | null => {
diff --git a/src/features/Verify/components/MarkdownEvidence.tsx b/src/features/Verify/components/MarkdownEvidence.tsx
new file mode 100644
index 00000000000..fc30c2c476f
--- /dev/null
+++ b/src/features/Verify/components/MarkdownEvidence.tsx
@@ -0,0 +1,258 @@
+'use client';
+
+import {
+ Center,
+ Drawer,
+ Flexbox,
+ Highlighter,
+ Icon,
+ Markdown,
+ MaskShadow,
+ Text,
+} from '@lobehub/ui';
+import { Button } from '@lobehub/ui/base-ui';
+import { useSize } from 'ahooks';
+import { createStaticStyles, cssVar } from 'antd-style';
+import { ChevronsDownUpIcon, ChevronsUpDownIcon, FileText } from 'lucide-react';
+import { memo, useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import Loading from '@/components/Loading/BrandTextLoading';
+import { useTextFileLoader } from '@/features/FileViewer/hooks/useTextFileLoader';
+import { getLanguageFromFilename } from '@/utils/fileLanguage';
+
+/**
+ * Prose evidence (root-cause write-ups, findings) renders as body markdown, not
+ * a monospace raw box — shared by the verify report and the acceptance union so
+ * the two surfaces can't drift apart.
+ */
+export const markdownTextEvidenceTypes = new Set(['markdown', 'text']);
+
+export const filenameFromUrl = (url: string): string => {
+ try {
+ return new URL(url).pathname.split('/').pop() || 'document';
+ } catch {
+ return 'document';
+ }
+};
+
+/** Same fold threshold as the task brief summary — the style this mirrors. */
+const COLLAPSED_MAX_HEIGHT = 180;
+
+const styles = createStaticStyles(({ css }) => ({
+ expandLink: css`
+ border: 1px solid ${cssVar.colorFillTertiary} !important;
+ font-size: 12px;
+ color: ${cssVar.colorTextDescription};
+ `,
+ docViewer: css`
+ overflow: auto;
+ height: 100%;
+ padding-block: 12px;
+ padding-inline: 16px;
+ `,
+ fileCard: css`
+ cursor: pointer;
+
+ display: grid;
+ grid-template-columns: 18px minmax(0, 1fr);
+ gap: 8px;
+ align-items: center;
+
+ width: min(100%, 520px);
+ padding-block: 7px;
+ padding-inline: 10px;
+ border: 1px solid ${cssVar.colorBorderSecondary};
+ border-radius: ${cssVar.borderRadius};
+
+ text-align: start;
+
+ background: ${cssVar.colorFillQuaternary};
+
+ &:hover {
+ border-color: ${cssVar.colorLink};
+ color: ${cssVar.colorLink};
+ }
+ `,
+ fileCardBody: css`
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ `,
+ fileCardDesc: css`
+ overflow: hidden;
+
+ margin-block-start: 2px;
+
+ font-size: 12px;
+ line-height: 1.35;
+ color: ${cssVar.colorTextTertiary};
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ `,
+ fileCardIcon: css`
+ display: flex;
+ color: ${cssVar.colorTextTertiary};
+ `,
+ fileCardName: css`
+ overflow: hidden;
+
+ font-size: 13px;
+ line-height: 1.35;
+ color: ${cssVar.colorText};
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ `,
+}));
+
+/**
+ * Inline prose evidence in the task-brief style: bare body markdown (no tinted
+ * box), folded behind a mask + expand button once it outgrows the threshold.
+ */
+export const CollapsibleMarkdownEvidence = memo<{ children: string }>(({ children }) => {
+ const { t } = useTranslation('verify');
+ const [expanded, setExpanded] = useState(false);
+ const [isOverflow, setIsOverflow] = useState(false);
+ const ref = useRef<any>(null);
+ const size = useSize(ref);
+
+ useEffect(() => {
+ if (!size) return;
+ setIsOverflow(size.height > COLLAPSED_MAX_HEIGHT);
+ }, [size]);
+
+ const content = (
+ <Markdown fontSize={13} ref={ref} style={{ overflow: 'unset' }} variant={'chat'}>
+ {children}
+ </Markdown>
+ );
+
+ return (
+ <Flexbox gap={4}>
+ {isOverflow && !expanded ? (
+ <MaskShadow size={32} style={{ maxHeight: COLLAPSED_MAX_HEIGHT }}>
+ {content}
+ </MaskShadow>
+ ) : (
+ content
+ )}
+
+ {isOverflow && (
+ <Button
+ block
+ className={styles.expandLink}
+ icon={expanded ? ChevronsDownUpIcon : ChevronsUpDownIcon}
+ iconPosition={'end'}
+ size={'small'}
+ type={'text'}
+ onClick={() => setExpanded(!expanded)}
+ >
+ {expanded ? t('report.evidence.collapse') : t('report.evidence.expand')}
+ </Button>
+ )}
+ </Flexbox>
+ );
+});
+
+CollapsibleMarkdownEvidence.displayName = 'CollapsibleMarkdownEvidence';
+
+/** A file-backed text evidence, decoded then body-rendered (markdown) or syntax highlighted. */
+export const DocumentViewer = memo<{ fileName?: string | null; markdown?: boolean; url: string }>(
+ ({ fileName, markdown, url }) => {
+ const { t } = useTranslation('verify');
+ const { fileData, loading, error } = useTextFileLoader(url);
+
+ if (loading)
+ return (
+ <Center flex={1} height={'100%'}>
+ <Loading debugId="verify-document-viewer" />
+ </Center>
+ );
+
+ if (error || fileData === null)
+ return (
+ <Center flex={1} gap={8} height={'100%'}>
+ <Text type="secondary">{t('report.document.failed')}</Text>
+ <a href={url} rel="noreferrer" target="_blank">
+ {t('report.document.openOriginal')}
+ </a>
+ </Center>
+ );
+
+ return (
+ <Flexbox className={styles.docViewer}>
+ {markdown ? (
+ <Markdown fontSize={13} variant={'chat'}>
+ {fileData}
+ </Markdown>
+ ) : (
+ <Highlighter
+ wrap
+ language={getLanguageFromFilename(fileName || filenameFromUrl(url))}
+ showLanguage={false}
+ variant={'borderless'}
+ >
+ {fileData}
+ </Highlighter>
+ )}
+ </Flexbox>
+ );
+ },
+);
+
+DocumentViewer.displayName = 'DocumentViewer';
+
+/**
+ * A long file-backed prose evidence stays behind a click — rendering thousands
+ * of lines inline drowns the check list. The card opens a drawer that renders
+ * the document as body markdown.
+ */
+export const EvidenceFileCard = memo<{
+ description?: string | null;
+ fileName?: string | null;
+ markdown?: boolean;
+ url: string;
+}>(({ description, fileName, markdown, url }) => {
+ const { t } = useTranslation('verify');
+ const [open, setOpen] = useState(false);
+ const name = fileName || filenameFromUrl(url);
+ const desc = description && description !== name ? description : null;
+
+ return (
+ <>
+ <button
+ className={styles.fileCard}
+ title={t('report.evidence.openDetail', { name })}
+ type={'button'}
+ onClick={() => setOpen(true)}
+ >
+ <span className={styles.fileCardIcon}>
+ <Icon icon={FileText} size={13} />
+ </span>
+ <span className={styles.fileCardBody}>
+ <span className={styles.fileCardName}>{name}</span>
+ {desc && <span className={styles.fileCardDesc}>{desc}</span>}
+ </span>
+ </button>
+ {open && (
+ <Drawer
+ destroyOnHidden
+ containerMaxWidth={'100%'}
+ open={open}
+ placement={'right'}
+ title={name}
+ width={'min(1120px, calc(100vw - 48px))'}
+ styles={{
+ body: { height: '100%', padding: 0 },
+ bodyContent: { height: '100%', minHeight: 0, overflow: 'hidden' },
+ }}
+ onClose={() => setOpen(false)}
+ >
+ <DocumentViewer fileName={name} markdown={markdown} url={url} />
+ </Drawer>
+ )}
+ </>
+ );
+});
+
+EvidenceFileCard.displayName = 'EvidenceFileCard';
diff --git a/src/features/Verify/utils.test.ts b/src/features/Verify/utils.test.ts
index 27d8025c11e..01e2c522fc1 100644
--- a/src/features/Verify/utils.test.ts
+++ b/src/features/Verify/utils.test.ts
@@ -6,10 +6,12 @@ import type { VerifyResultWithEvidence } from '@/services/verify';
import {
buildCheckRows,
countResults,
+ extractUuid,
isDraftUnconfirmed,
itemBehavior,
phaseFromStatus,
renderableSurfaces,
+ resolveRoundParam,
} from './utils';
const planItem = (id: string, overrides: Partial<VerifyCheckItem> = {}): VerifyCheckItem => ({
@@ -142,3 +144,46 @@ describe('renderableSurfaces', () => {
expect(renderableSurfaces(undefined)).toEqual([]);
});
});
+
+describe('resolveRoundParam', () => {
+ const rounds = [
+ { run: { roundIndex: 1 } },
+ { run: { roundIndex: 2 } },
+ { run: { roundIndex: 3 } },
+ ];
+
+ it('resolves ?r= to the round with that index', () => {
+ expect(resolveRoundParam(rounds, '2')).toBe(rounds[1]);
+ });
+
+ it('ignores an absent or non-integer param', () => {
+ expect(resolveRoundParam(rounds, null)).toBeNull();
+ expect(resolveRoundParam(rounds, '')).toBeNull();
+ expect(resolveRoundParam(rounds, 'abc')).toBeNull();
+ expect(resolveRoundParam(rounds, '2.5')).toBeNull();
+ expect(resolveRoundParam(rounds, '-1')).toBeNull();
+ });
+
+ it('ignores an index the chain never reached', () => {
+ expect(resolveRoundParam(rounds, '7')).toBeNull();
+ });
+
+ it('skips legacy rounds whose index was never stamped', () => {
+ expect(resolveRoundParam([{ run: { roundIndex: null } }], '0')).toBeNull();
+ });
+});
+
+describe('extractUuid', () => {
+ const id = 'e7545637-0e1a-4d7b-8922-efc9f13e4c74';
+
+ it('salvages the leading uuid when an autolinker glued trailing punctuation on', () => {
+ expect(extractUuid(`${id}(本轮`)).toBe(id);
+ expect(extractUuid(`${id})`)).toBe(id);
+ });
+
+ it('passes a clean uuid and non-uuid params through unchanged', () => {
+ expect(extractUuid(id)).toBe(id);
+ expect(extractUuid('definitely-not-a-uuid')).toBe('definitely-not-a-uuid');
+ expect(extractUuid(undefined)).toBeUndefined();
+ });
+});
diff --git a/src/features/Verify/utils.ts b/src/features/Verify/utils.ts
index fe02c48e0cd..1c821669c86 100644
--- a/src/features/Verify/utils.ts
+++ b/src/features/Verify/utils.ts
@@ -145,6 +145,35 @@ export const renderableSurfaces = (surfaces: VerifyCodingScope['surfaces']): Ver
return seen;
};
+const LEADING_UUID_RE = /^[\dA-F]{8}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{4}-[\dA-F]{12}/i;
+
+/**
+ * Salvage the leading UUID from a route param. Chat autolinkers glue trailing
+ * CJK punctuation onto shared links (`/acceptance/<uuid>(本轮…`), so the raw
+ * param would 404 (and used to 500) even though the link plainly names a real
+ * aggregate — extract the id and let the visit succeed. A param with no
+ * leading UUID passes through unchanged so genuine not-found stays visible.
+ */
+export const extractUuid = (raw: string | undefined): string | undefined => {
+ if (!raw) return raw;
+ return LEADING_UUID_RE.exec(raw)?.[0] ?? raw;
+};
+
+/**
+ * Resolve the acceptance page's `?r=` deep-link to the round it names. Only a
+ * plain non-negative integer that matches an existing round counts — anything
+ * else (absent, garbage, an index the chain never reached) resolves to null and
+ * the page just shows its default state.
+ */
+export const resolveRoundParam = <T extends { run: { roundIndex: number | null } }>(
+ rounds: T[],
+ raw: string | null | undefined,
+): T | null => {
+ if (!raw || !/^\d+$/.test(raw)) return null;
+ const index = Number(raw);
+ return rounds.find((round) => round.run.roundIndex === index) ?? null;
+};
+
export interface CheckCounts {
failed: number;
passed: number;