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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
.goal-team-result-check { margin-left: auto; visibility: hidden; }
.goal-team-result-list button[aria-pressed="true"] .goal-team-result-check { visibility: visible; }
.goal-team-result-reader { min-width: 0; border-left: 1px solid var(--pw-line); padding-left: 24px; }
.goal-team-result-reader > details:first-child summary { font-size: 14px; font-weight: 500; }
.goal-team-results .goal-team-report { padding: 24px 0; }
.goal-team-result-reader > label { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.goal-team-result-reader select { max-width: 100%; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string;
finally {if (current === generation.current) setBusy(false);}
}
const rows = page ? readableRows(page) : [];
const adoptions = selection?.result.adoptions ?? [];
const currentAdoptions = adoptions.filter(row => row.state === "current").length;
const unavailableAdoptions = adoptions.length - currentAdoptions;
const adoptionSummary = currentAdoptions && unavailableAdoptions
? (zh ? "部分采用可核验 · 查看后续结果与失效项" : "Some adoption is verifiable · inspect results and unavailable evidence")
: currentAdoptions
? (zh ? "已记录采用 · 查看后续结果" : "Adoption recorded · inspect downstream results")
: unavailableAdoptions
? (zh ? "采用证据无法核验 · 查看版本依据" : "Adoption evidence unavailable · inspect versions")
: selection?.result.dependencies?.length
? (zh ? "此结果关联来源版本 · 查看依据" : "This result references source versions · inspect evidence")
: (zh ? "尚无采用记录 · 查看验收与版本依据" : "No adoption recorded · inspect acceptance and versions");
return <section className="goal-team-results" aria-label={zh ? "团队成果" : "Team results"} aria-busy={busy}>
<header><h3>{zh ? "团队成果" : "Team results"}</h3>
<button type="button" disabled={busy} onClick={() => void list(cursor.current)}><RefreshCw size={14} aria-hidden="true"/>{zh ? "刷新成果" : "Refresh results"}</button></header>
Expand All @@ -91,6 +103,7 @@ export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string;
{page.has_more && page.next_cursor ? <button type="button" disabled={busy} onClick={() => void list(page.next_cursor!, true)}>{zh ? "下一页成果" : "Next results page"}</button> : null}
</nav> : null}
{selection ? <div ref={report} tabIndex={-1} className="goal-team-result-reader" aria-label={zh ? "当前报告" : "Current report"}>
<details><summary>{adoptionSummary}</summary><GoalTeamLineage result={selection.result} zh={zh} onInspect={operationId => void read(operationId)}/></details>
<TeamArtifactReport key={`${selection.result.operation_id}:${selection.artifact.sha256}`} artifact={selection.artifact} zh={zh} heading={zh ? "已通过当前验收" : "Currently accepted"}/>
{selection.result.artifacts && selection.result.artifacts.length > 1 ? <label>{zh ? "其他产物" : "Other artifacts"}<select value={selection.artifact.ref}
onChange={event => {const artifact = selection.result.artifacts!.find(row => row.ref === event.target.value); if (artifact) {
Expand All @@ -99,7 +112,6 @@ export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string;
}}}>
{selection.result.artifacts.map(row => <option value={row.ref} key={row.ref}>{row.ref}</option>)}
</select></label> : null}
<details><summary>{zh ? "验收与采用关系" : "Acceptance and adoption"}</summary><GoalTeamLineage result={selection.result} zh={zh} onInspect={operationId => void read(operationId)}/></details>
</div> : null}
</div>
</section>;
Expand Down
16 changes: 16 additions & 0 deletions examples/personal-workspace-browser/team-evidence.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const teamEvidenceScenario = {
const results = page.getByRole("region", {name: "团队成果", exact: true});
// Accepted report opens in the original conversation without an extra click.
await results.getByRole("table").waitFor();
await results.getByText("尚无采用记录 · 查看验收与版本依据", {exact: true}).waitFor();
assert.equal(await results.getByLabel("当前报告").evaluate(el => el === document.activeElement), false, "Automatic readback must not steal focus");
const reads = api.loopxModeRequests.filter(row => row.operation === "read").length;
await results.getByRole("button", {name: "刷新成果", exact: true}).click();
Expand Down Expand Up @@ -66,6 +67,21 @@ export const teamEvidenceScenario = {
assert.equal(await results.getByRole("table").count(), 0);
assert.equal(await results.getByText("newer unverified report").count(), 0);
await page.unroute("**/api/chat/sessions/*/loopx", changedReport);
mode.fixtureAdoptionState = "current";
await results.getByRole("button", {name: "刷新成果", exact: true}).click();
await results.getByText("已记录采用 · 查看后续结果", {exact: true}).waitFor();
await page.screenshot({path: resolve(outputDir, "team-adoption-source.png"), animations: "disabled"});
await results.getByText("已记录采用 · 查看后续结果", {exact: true}).click();
await results.getByRole("button", {name: "查看后续结果", exact: true}).click();
await results.getByText("Reviewed cash allocation").waitFor();
await results.getByText("此结果关联来源版本 · 查看依据", {exact: true}).waitFor();
await page.screenshot({path: resolve(outputDir, "team-adoption-return.png"), animations: "disabled"});
assert.equal(api.turnRequests.length, 0, "Following adopted results must not start a model");
await results.getByRole("button", {name: /local-analyst · report.md/}).click();
mode.fixtureAdoptionState = "unavailable";
await results.getByRole("button", {name: "刷新成果", exact: true}).click();
await results.getByText("采用证据无法核验 · 查看版本依据", {exact: true}).waitFor();
delete mode.fixtureAdoptionState;
await page.getByRole("button", {name: "团队执行情况", exact: true}).click();
const dialog = page.getByRole("dialog", {name: "团队执行情况"});
const openEvidence = dialog.getByRole("button", {name: "查看证据与反馈", exact: true});
Expand Down
6 changes: 3 additions & 3 deletions loopx/web/chat/asset-retention.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2",
"assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2",
"assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2",
"assets/index-BGlmetKk.js",
"assets/index-C_Imc7ZG.css"
"assets/index-Bm8PVjll.js",
"assets/index-DTJTDfC1.css"
],
[
"assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2",
Expand All @@ -28,7 +28,7 @@
"assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2",
"assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2",
"assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2",
"assets/index-CFEaAATG.js",
"assets/index-BGlmetKk.js",
"assets/index-C_Imc7ZG.css"
]
]
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions loopx/web/chat/assets/index-DTJTDfC1.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions loopx/web/chat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
content="LoopX 个人 Agent 工作区:在同一个频道里查看、纠偏并推进 Goal。"
/>
<title>LoopX 个人 Agent 工作区</title>
<script type="module" crossorigin src="/chat/assets/index-BGlmetKk.js"></script>
<link rel="stylesheet" crossorigin href="/chat/assets/index-C_Imc7ZG.css">
<script type="module" crossorigin src="/chat/assets/index-Bm8PVjll.js"></script>
<link rel="stylesheet" crossorigin href="/chat/assets/index-DTJTDfC1.css">
</head>
<body>
<div id="root">
Expand Down
Loading