Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
fb026f7
test: gate SQLite lifecycle cases on qualified runtime
huangruiteng Sep 23, 2026
9b64bfe
test: require SQLite qualification in the provider CI lane
huangruiteng Sep 23, 2026
83a43b1
fix: raise supported Node floor to WAL-fixed SQLite runtime
huangruiteng Sep 23, 2026
46b66c1
docs: explain the unified Node minimum and upgrade path
huangruiteng Sep 23, 2026
294e673
test: stop pinning retired README copy in showcase smoke
huangruiteng Sep 23, 2026
997225d
fix(workspace): find accepted team reports beyond the first page
huangruiteng Sep 23, 2026
3753166
fix(workspace): keep run observations out of delivered files
huangruiteng Sep 23, 2026
ad48975
docs(team): distinguish managed status from delivered results
huangruiteng Sep 23, 2026
ad99ddd
fix(bundle): normalize retained asset order
huangruiteng Sep 23, 2026
eb33dc5
Show accepted team reports in Goal Files
huangruiteng Sep 23, 2026
3d63d0c
Verify accepted report readback in Files
huangruiteng Sep 23, 2026
8fe2cf3
Merge latest main into Node floor repair
huangruiteng Sep 23, 2026
b895255
Merge Node floor prerequisite for accepted report discovery
huangruiteng Sep 24, 2026
4728c08
Merge verified report discovery into Goal Files result UX
huangruiteng Sep 24, 2026
3886e99
Merge pull request #4973 from loopx-project/codex/managed-result-trut…
huangruiteng Sep 24, 2026
d38b665
Merge remote-tracking branch 'origin/main' into codex/product-researc…
huangruiteng Sep 24, 2026
4e71c32
Merge remote-tracking branch 'origin/main' into codex/product-researc…
huangruiteng Sep 24, 2026
f33ccb9
Merge remote-tracking branch 'origin/main' into codex/product-researc…
huangruiteng Sep 24, 2026
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
@@ -1,7 +1,6 @@
import {
agentStatusSentence,
projectionSentence,
runEvidenceCopy,
} from "../src/features/personal-workspace/projection-localization.js";

type Values = Record<string, string | number>;
Expand All @@ -14,19 +13,11 @@ const english = {
"projection.agentStopped": "Stopped by you; history, Todos, and evidence are preserved",
"projection.agentWaitingExternal": "Waiting for an external condition",
"projection.confirmAgentDecision": "Confirm the permission or decision the Agent needs next",
"projection.events24h": "{count} events in the last 24 hours",
"projection.firstReadOnlyAdapterCheck": "Run the first read-only adapter check and save progress",
"projection.goalVerified": "Goal state, Todos, and registration information verified",
"projection.latestRun": "Latest run",
"projection.latestValidation": "Latest validation",
"projection.nextUpdatePending": "Waiting for LoopX to update the next step",
"projection.publicSafeProjection": "Public-safe status projection",
"projection.refreshState": "Refresh LoopX status and confirm the current progress is still valid",
"projection.runEvidenceAvailable": "Run evidence is available",
"projection.runRecorded": "The latest LoopX run is recorded",
"projection.statusRefreshNeeded": "LoopX status needs to be refreshed",
"projection.todoStatusUpdated": "Todo status updated; confirming the next step",
"projection.validationRecorded": "The latest validation is recorded",
} as const;

const chinese = {
Expand Down Expand Up @@ -97,16 +88,4 @@ equal(
"English stopped status",
);

const latestRun = runEvidenceCopy({ eventCount: 0, hasArtifact: true, hasLatestValidation: false }, en);
equal(latestRun.label, "Latest run", "English latest-run label");
equal(latestRun.metadata, "Run evidence is available", "English run-evidence metadata");

const latestValidation = runEvidenceCopy({ eventCount: 3, hasArtifact: false, hasLatestValidation: true }, en);
equal(latestValidation.label, "Latest validation", "English latest-validation label");
equal(latestValidation.metadata, "3 events in the last 24 hours", "English event-count metadata");

const chineseRun = runEvidenceCopy({ eventCount: 0, hasArtifact: false, hasLatestValidation: false }, zhCN);
equal(chineseRun.label, "最近运行", "Chinese latest-run label");
equal(chineseRun.metadata, "公开安全状态投影", "Chinese public-safe metadata");

console.log("projection localization smoke passed");
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ import {GoalTeamLineage} from "./goal-team-lineage";
type Selection = {operationId: string; ref?: string; sha256?: string};
const readableRows = (page: DelegationInventory) => page.items.filter(row =>
row.operation_id && row.status === "accepted" && !row.recovery_required && row.artifacts?.length);
const AUTO_DISCOVERY_PAGES = 3;
const MAX_INSPECTED_PAGES = 10;

/** Read-only entry in the original conversation, using the same scoped delegation API. */
export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string; zh: boolean; refreshKey: string}) {
const [page, setPage] = useState<DelegationInventory | null>(null);
const [pages, setPages] = useState<DelegationInventory[]>([]);
const [selection, setSelection] = useState<{result: DelegationReadback; artifact: TeamArtifact} | null>(null);
const [busy, setBusy] = useState(false);
const [error, setError] = useState("");
const generation = useRef(0);
const chosen = useRef<Selection | null>(null);
const cursor = useRef<string | undefined>(undefined);
const inspectedPages = useRef(1);
const focusReport = useRef(false);
const report = useRef<HTMLDivElement>(null);
useEffect(() => {chosen.current = null; cursor.current = undefined;}, [sessionId]);
useEffect(() => {void list(cursor.current); return () => {generation.current++;};}, [sessionId, refreshKey]);
useEffect(() => {chosen.current = null; inspectedPages.current = 1;}, [sessionId]);
useEffect(() => {void list(); return () => {generation.current++;};}, [sessionId, refreshKey]);
useEffect(() => {
if (selection && focusReport.current) {report.current?.focus(); focusReport.current = false;}
}, [selection]);
Expand All @@ -39,21 +41,33 @@ export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string;
setSelection({result: value, artifact});
}
}
async function list(nextCursor?: string, nextPage = false) {
async function list(nextPage = false) {
const current = ++generation.current;
if (nextPage) chosen.current = null;
cursor.current = nextCursor;
const minimumPages = Math.min(MAX_INSPECTED_PAGES, inspectedPages.current + (nextPage ? 1 : 0));
focusReport.current = false;
setBusy(true); setError(""); setPage(null); setSelection(null);
setBusy(true); setError(""); setPages([]); setSelection(null);
try {
const value = await fetchLoopXTeamWork(sessionId, nextCursor);
if (current !== generation.current) return;
setPage(value);
const observed: DelegationInventory[] = [];
let nextCursor: string | undefined;
while (observed.length < minimumPages ||
(!chosen.current && !observed.some(page => readableRows(page).length) && observed.length < AUTO_DISCOVERY_PAGES)) {
const value = await fetchLoopXTeamWork(sessionId, nextCursor);
if (current !== generation.current) return;
observed.push(value);
if (!value.has_more) break;
if (!value.next_cursor || (nextCursor && value.next_cursor <= nextCursor)) {
throw new Error(zh ? "执行分页无法继续核验;请重新读取。" : "Execution paging cannot be verified; refresh the list.");
}
nextCursor = value.next_cursor;
}
inspectedPages.current = observed.length;
setPages(observed);
// Keep the reader's exact version. A refresh must never silently replace
// it with a newer artifact or move to a different member's result.
let target = chosen.current;
if (!target) {
const first = readableRows(value)[0];
const first = observed.flatMap(readableRows)[0];
const artifact = first?.artifacts?.find(row => isMarkdownArtifact(row.ref)) ?? first?.artifacts?.[0];
if (first?.operation_id && artifact) target = {operationId: first.operation_id, ...artifact};
}
Expand All @@ -74,7 +88,8 @@ export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string;
catch (failure) {if (current === generation.current) setError(`${zh ? "无法核验,已清除上次报告。" : "Cannot verify; previous report cleared."} ${String(failure)}`);}
finally {if (current === generation.current) setBusy(false);}
}
const rows = page ? readableRows(page) : [];
const rows = pages.flatMap(readableRows);
const lastPage = pages.at(-1);
const adoptions = selection?.result.adoptions ?? [];
const currentAdoptions = adoptions.filter(row => row.state === "current").length;
const unavailableAdoptions = adoptions.length - currentAdoptions;
Expand All @@ -89,18 +104,21 @@ export function GoalTeamResults({sessionId, zh, refreshKey}: {sessionId: string;
: (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>
<button type="button" disabled={busy} onClick={() => void list()}><RefreshCw size={14} aria-hidden="true"/>{zh ? "刷新成果" : "Refresh results"}</button></header>
{busy ? <p role="status">{zh ? "正在核验产物…" : "Verifying artifacts…"}</p> : null}
{error ? <p role="alert">{error}</p> : null}
{page && !page.page_readback_complete ? <p role="status">{zh ? "部分工作无法核验,请在团队执行中检查。" : "Some work cannot be verified; inspect Team execution."}</p> : null}
{pages.some(page => !page.page_readback_complete) ? <p role="status">{zh ? "已检查的工作中有无法核验的记录;当前报告只代表它自己的验收,不代表整个团队。" : "Some inspected work cannot be verified. This report reflects only its own acceptance, not the whole team."}</p> : null}
<div className="goal-team-results-layout">
{page ? <nav className="goal-team-result-list" aria-label={zh ? "选择团队产物" : "Choose a team artifact"}>{rows.map(row => {
{pages.length ? <nav className="goal-team-result-list" aria-label={zh ? "选择团队产物" : "Choose a team artifact"}>{rows.map(row => {
const artifact = row.artifacts!.find(item => isMarkdownArtifact(item.ref)) ?? row.artifacts![0];
return <button type="button" key={row.record_id} disabled={busy} aria-label={`${row.agent_id} · ${artifact.ref}`} aria-pressed={selection?.result.operation_id === row.operation_id}
onClick={() => void read(row.operation_id!, artifact)}><FileText size={16} aria-hidden="true"/><span><strong>{row.agent_id}</strong><small>{artifact.ref}</small></span><Check className="goal-team-result-check" size={14} aria-hidden="true"/></button>;
})}
{!rows.length ? <p>{zh ? "本页没有可读取的已验收产物。" : "No accepted artifact is available on this page."}</p> : null}
{page.has_more && page.next_cursor ? <button type="button" disabled={busy} onClick={() => void list(page.next_cursor!, true)}>{zh ? "下一页成果" : "Next results page"}</button> : null}
{!rows.length ? <p>{zh ? "已检查的页面没有可读取的已验收产物。" : "No accepted artifact is available in the inspected pages."}</p> : null}
{lastPage?.has_more && lastPage.next_cursor && pages.length < MAX_INSPECTED_PAGES ? <button type="button" disabled={busy} onClick={() => void list(true)}>{zh ? "继续查找成果" : "Find more results"}</button> : null}
{lastPage?.has_more ? <p>{pages.length >= MAX_INSPECTED_PAGES
? (zh ? "已达到有界查找上限;更多工作请在团队执行中按操作检查。" : "Bounded search limit reached; inspect further work by operation in Team execution.")
: (zh ? `已检查 ${pages.length} 页;还有未检查的工作。` : `${pages.length} pages inspected; more work remains unseen.`)}</p> : 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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ const en = {
"drawer.unconfigured": "Not configured",
"drawer.workspaceCandidates": "Available workspaces",
"files.emptySummary": "Public-safe output",
"files.empty": "No files, outputs, or verified reports yet.",
"files.empty": "No delivered files or verified reports yet. Run and validation status remain in Tasks.",
"files.checkingTeam": "Checking this Goal conversation for verified team results…",
"files.teamLoadFailed": "Could not check team results from this Goal conversation.",
"files.loadingReports": "Loading verified milestone reports…",
"files.reportDelta": "+{added} added · {changed} changed",
"files.reportAdded": "added",
Expand Down Expand Up @@ -763,19 +765,11 @@ const en = {
"projection.agentStopped": "Stopped by you; history, Todos, and evidence are preserved",
"projection.agentWaitingExternal": "Waiting for an external condition",
"projection.confirmAgentDecision": "Confirm the permission or decision the Agent needs next",
"projection.events24h": "{count} events in the last 24 hours",
"projection.firstReadOnlyAdapterCheck": "Run the first read-only adapter check and save progress",
"projection.goalVerified": "Goal state, Todos, and registration information verified",
"projection.latestRun": "Latest run",
"projection.latestValidation": "Latest validation",
"projection.nextUpdatePending": "Waiting for LoopX to update the next step",
"projection.publicSafeProjection": "Public-safe status projection",
"projection.refreshState": "Refresh LoopX status and confirm the current progress is still valid",
"projection.runEvidenceAvailable": "Run evidence is available",
"projection.runRecorded": "The latest LoopX run is recorded",
"projection.statusRefreshNeeded": "LoopX status needs to be refreshed",
"projection.todoStatusUpdated": "Todo status updated; confirming the next step",
"projection.validationRecorded": "The latest validation is recorded",
"runs.completed": "Completed",
"runs.failed": "Needs review",
"runs.interrupted": "Interrupted",
Expand Down Expand Up @@ -1506,7 +1500,9 @@ const zhCN: Record<WorkspaceMessageKey, string> = {
"drawer.unconfigured": "未配置",
"drawer.workspaceCandidates": "可选择的工作区",
"files.emptySummary": "公开安全产出",
"files.empty": "还没有文件、产出或已验证的阶段周报。",
"files.empty": "还没有已交付文件或已验证报告。运行和验证状态请在任务中查看。",
"files.checkingTeam": "正在检查当前 Goal 会话的已验证团队成果…",
"files.teamLoadFailed": "无法核验当前 Goal 会话的团队成果。",
"files.loadingReports": "正在加载已验证的阶段周报…",
"files.reportDelta": "+{added} 新增 · {changed} 变化",
"files.reportAdded": "新增",
Expand Down Expand Up @@ -1880,19 +1876,11 @@ const zhCN: Record<WorkspaceMessageKey, string> = {
"projection.agentStopped": "已由你停止;历史、Todo 和证据仍保留",
"projection.agentWaitingExternal": "正在等待外部条件",
"projection.confirmAgentDecision": "请确认 Agent 下一步需要的权限或决策",
"projection.events24h": "24 小时内 {count} 个事件",
"projection.firstReadOnlyAdapterCheck": "执行首次只读适配检查并保存进度",
"projection.goalVerified": "Goal 状态、Todo 与注册信息已验证",
"projection.latestRun": "最近运行",
"projection.latestValidation": "最近验证",
"projection.nextUpdatePending": "等待 LoopX 更新下一步",
"projection.publicSafeProjection": "公开安全状态投影",
"projection.refreshState": "刷新 LoopX 状态,确认当前进度仍然有效",
"projection.runEvidenceAvailable": "存在可查看的运行证据",
"projection.runRecorded": "最近一次 LoopX 运行已经记录",
"projection.statusRefreshNeeded": "LoopX 状态需要刷新",
"projection.todoStatusUpdated": "Todo 状态已经更新,正在确认下一步",
"projection.validationRecorded": "最近验证已经记录",
"runs.completed": "已完成",
"runs.failed": "需检查",
"runs.interrupted": "已中断",
Expand Down
Loading
Loading