@@ -1080,7 +1117,8 @@ export function ContextDrawer({ agents, attentionHistory = [], onSelectAttention
>
) : null}
- {selection.kind === "run" ? (
+ {sourceRunGoal ?
: null}
+ {selection.kind === "run" && !sourceRunGoal ? (
<>
@@ -1340,7 +1378,7 @@ export function ContextDrawer({ agents, attentionHistory = [], onSelectAttention
>
) : null}
- {selection.kind === "run" || selection.kind === "proposal" || selection.kind === "schedule" ? (
+ {((selection.kind === "run" && !sourceRunGoal) || selection.kind === "proposal" || selection.kind === "schedule") ? (
<>
+ {run.agent_vision ?
+ :
{t("drawer.sourceRunDecisionUnavailable")}
}
)}
> :
{t(total === 0 ? "drawer.noExecutionHistory" : "drawer.sourceRunUnavailable")}
}
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/goal-source-strategies.tsx b/apps/presentation/dashboard/src/features/personal-workspace/goal-source-strategies.tsx
index 9615a01a98..db4aafc574 100644
--- a/apps/presentation/dashboard/src/features/personal-workspace/goal-source-strategies.tsx
+++ b/apps/presentation/dashboard/src/features/personal-workspace/goal-source-strategies.tsx
@@ -55,7 +55,9 @@ export function GoalSourceStrategies({goalId, originalGoalId, sourceUrl, zh, sel
goalId: string; originalGoalId: string; sourceUrl?: string; zh: boolean; selection: string;
onSelect: (id: string, replace?: boolean) => void; onClose?: () => void; embedded?: boolean;
}) {
- const [snapshot, setSnapshot] = useState
(null);
+ const [loaded, setSnapshot] = useState<{scope: string; value: Snapshot} | null>(null);
+ const scope = `${goalId}:${originalGoalId}:${sourceUrl ?? ""}`;
+ const snapshot = loaded?.scope === scope ? loaded.value : null;
const [busy, setBusy] = useState(true), [failed, setFailed] = useState(false);
const [revision, setRevision] = useState(0);
const heading = useRef(null);
@@ -73,10 +75,10 @@ export function GoalSourceStrategies({goalId, originalGoalId, sourceUrl, zh, sel
if (result.goal_id !== originalGoalId || result.source.namespace !== namespace
|| result.total !== result.items.length || result.native_run_count < result.total
|| new Set(result.items.map(item => item.id)).size !== result.total) throw new Error("Inconsistent source history");
- if (current) setSnapshot(result);
+ if (current) setSnapshot({scope, value: result});
}).catch(() => {if (current) setFailed(true);}).finally(() => {if (current) setBusy(false);});
return () => {current = false; controller.abort();};
- }, [goalId, originalGoalId, sourceUrl, namespace, revision]);
+ }, [goalId, originalGoalId, sourceUrl, namespace, revision, scope]);
useEffect(() => {
const previous = previousSelection.current;
previousSelection.current = selection;
@@ -85,6 +87,9 @@ export function GoalSourceStrategies({goalId, originalGoalId, sourceUrl, zh, sel
entry?.focus({preventScroll: true}); entry?.scrollIntoView({block: "nearest"});
} else if (!embedded || selection !== "all") heading.current?.focus({preventScroll: true});
}, [selection, embedded]);
+ const time = (stamp: string) => Number.isFinite(Date.parse(stamp))
+ ? new Intl.DateTimeFormat(zh ? "zh-CN" : "en", {dateStyle: "medium", timeStyle: "medium"}).format(new Date(stamp))
+ : (zh ? "时间未记录" : "Time not recorded");
const items = snapshot?.items ?? [];
// Only recorded time orders this view. It establishes neither execution time
// nor causal relationships; records without a usable time remain readable.
@@ -96,19 +101,6 @@ export function GoalSourceStrategies({goalId, originalGoalId, sourceUrl, zh, sel
const dated = chronology.filter(item => Number.isFinite(Date.parse(item.recorded_at)));
const index = items.findIndex(item => item.id === selection);
const selected = items[index];
- const vision = record(selected?.agent_vision), patch = record(vision.vision_patch), path = record(vision.path_delta);
- const stride = record(vision.stride_decision), probe = record(stride.next_probe), review = record(stride.previous_review);
- const time = (stamp: string) => Number.isFinite(Date.parse(stamp))
- ? new Intl.DateTimeFormat(zh ? "zh-CN" : "en", {dateStyle: "medium", timeStyle: "medium"}).format(new Date(stamp))
- : (zh ? "时间未记录" : "Time not recorded");
- const prose = (label: string, value: unknown) => typeof value === "string" && value
- ? : null;
- const list = (label: string, value: unknown) => Array.isArray(value) && value.length
- ? {label}
{value.map((item, i) => -
- {typeof item === "string" ? :
{JSON.stringify(item, null, 2)}}
- )}
: null;
- const nextLabels = zh ? {scope: "范围", prediction: "预期", adoption_criterion: "采用条件", cost_bound: "成本边界", minimum_evidence: "所需依据"}
- : {scope: "Scope", prediction: "Prediction", adoption_criterion: "Adoption criterion", cost_bound: "Cost bound", minimum_evidence: "Required evidence"};
return
{selection !== "all" || onClose ? : null}
@@ -147,8 +139,34 @@ export function GoalSourceStrategies({goalId, originalGoalId, sourceUrl, zh, sel
: null}
{!items.length ?
{zh ? "原 Goal 没有保留策略记录。" : "The original Goal has no retained strategy records."}
: !selected && selection !== "all" ?
{zh ? "原来源中找不到所选版本。可选择其他记录。" : "The selected version is absent from this source. Other records remain readable."}
: null}
- {selected ?
- · {selected.agent_id}
+ {selected ? : null}
+ > : null}
+ ;
+}
+
+/** Read-only rendering shared by strategy history and native execution records. */
+export function GoalStrategyDocument({value, recordedAt, agentId, version, originalGoalId, namespace, zh, originalRecord, executionRecord = false}: {
+ originalRecord?: unknown; executionRecord?: boolean;
+ value: Record; recordedAt: string; agentId?: string; version: string;
+ originalGoalId: string; namespace: string; zh: boolean;
+}) {
+ const vision = record(value), patch = record(vision.vision_patch), path = record(vision.path_delta);
+ const stride = record(vision.stride_decision), probe = record(stride.next_probe), review = record(stride.previous_review);
+ const time = (stamp: string) => Number.isFinite(Date.parse(stamp))
+ ? new Intl.DateTimeFormat(zh ? "zh-CN" : "en", {dateStyle: "medium", timeStyle: "medium"}).format(new Date(stamp))
+ : (zh ? "时间未记录" : "Time not recorded");
+ const prose = (label: string, value: unknown) => typeof value === "string" && value
+ ? : null;
+ const list = (label: string, value: unknown) => Array.isArray(value) && value.length
+ ? {label}
{value.map((item, i) => -
+ {typeof item === "string" ? :
{JSON.stringify(item, null, 2)}}
+ )}
: null;
+ const nextLabels = zh ? {scope: "范围", prediction: "预期", adoption_criterion: "采用条件", cost_bound: "成本边界", minimum_evidence: "所需依据"}
+ : {scope: "Scope", prediction: "Prediction", adoption_criterion: "Adoption criterion", cost_bound: "Cost bound", minimum_evidence: "Required evidence"};
+ return
+ {agentId ? ` · ${agentId}` : ""}
{prose(zh ? "当时的目标" : "Goal at the time", patch.vision_summary)}
{prose(zh ? "验收条件" : "Acceptance", patch.acceptance_summary)}
{prose(zh ? "原先的判断" : "Prior assumption", path.prior_assumption)}
@@ -161,15 +179,25 @@ export function GoalSourceStrategies({goalId, originalGoalId, sourceUrl, zh, sel
{Object.keys(probe).length ? {zh ? "当时的后续计划" : "Recorded next plan"}
{Object.entries(nextLabels).map(([key, label]) => typeof probe[key] === "string" && probe[key]
? : null)}
: null}
{prose(zh ? "对上轮的记录性回顾" : "Recorded review of the previous decision", review.lesson)}
+ {zh ? "完整决策字段" : "All decision fields"}
+
+
{list(zh ? "依据引用" : "Evidence references", path.evidence_refs)}
{zh ? "完整原始记录与来源" : "Complete original record and source"}
-
-
- {JSON.stringify(selected, null, 2)}
+
+
+ {JSON.stringify(originalRecord ?? value, null, 2)}
- : null}
- > : null}
- ;
+ ;
+}
+
+// Unknown optional fields remain readable without treating them as executable markup.
+function NativeDecisionFields({value}: {value: unknown}) {
+ if (typeof value === "string") return
;
+ if (Array.isArray(value)) return {value.map((item, index) => )}
;
+ if (value !== null && typeof value === "object") return {Object.entries(value).map(([key, item]) =>
+ - {key}
)}
;
+ return {value === null ? "null" : String(value)};
}
function FragmentField({label, value}: {label: string; value: string}) {
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/i18n.tsx b/apps/presentation/dashboard/src/features/personal-workspace/i18n.tsx
index 4cbdeb16e6..382758adf0 100644
--- a/apps/presentation/dashboard/src/features/personal-workspace/i18n.tsx
+++ b/apps/presentation/dashboard/src/features/personal-workspace/i18n.tsx
@@ -381,6 +381,7 @@ const en = {
"drawer.validationRevisionActor": "Revised by",
"drawer.noExecutionHistory": "No execution history yet.",
"drawer.sourceRunHistory": "Historical executions",
+ "drawer.sourceRunDecisionUnavailable": "No complete decision was retained in this execution record.",
"drawer.sourceRunRecent": "{shown} recent records",
"drawer.sourceRunCount": "Showing {shown} recent records of {count}",
"drawer.sourceRunOriginalGoal": "Original Goal",
@@ -2017,6 +2018,7 @@ const zhCN: Record = {
"drawer.validationRevisionActor": "修订者",
"drawer.noExecutionHistory": "暂无执行记录。",
"drawer.sourceRunHistory": "历史执行",
+ "drawer.sourceRunDecisionUnavailable": "这条执行记录未保留完整决策正文。",
"drawer.sourceRunRecent": "最近 {shown} 条记录",
"drawer.sourceRunCount": "显示最近 {shown} 条,共 {count} 条",
"drawer.sourceRunOriginalGoal": "原 Goal",
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs b/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs
new file mode 100644
index 0000000000..502ac5414a
--- /dev/null
+++ b/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs
@@ -0,0 +1,24 @@
+import assert from "node:assert/strict";
+import React from "react";
+import {renderToStaticMarkup} from "react-dom/server";
+import {runRecordSchema} from "../../data/status";
+import {GoalStrategyDocument} from "./goal-source-strategies";
+const base = {goal_id:"archived", generated_at:"2026-01-01T00:00:00Z"};
+for (const agent_vision of [undefined, null, [], "invalid", 42]) {
+ assert.equal(runRecordSchema.parse({...base, agent_vision}).agent_vision ?? null, null);
+}
+const value = {vision_patch:{vision_summary:"Retain the independently verified baseline"},
+ path_delta:{observed_reality:"The new route failed", unresolved_questions:["Cost remains unknown"]},
+ stride_decision:{axes:{work_slice:{plan:"Compare before replacing",reason:"Preserve the counterexample"}}},
+ future_field:{unknown_key:"Keep future evidence readable"}};
+const parsed = runRecordSchema.parse({...base, agent_vision:value});
+assert.deepEqual(parsed.agent_vision,value);
+for (const zh of [true,false]) {
+ const html = renderToStaticMarkup(React.createElement(GoalStrategyDocument, {
+ value:parsed.agent_vision,recordedAt:base.generated_at,version:"retained-version",
+ originalGoalId:"original-goal",namespace:"source-a",zh,
+ }));
+ for (const text of ["Retain the independently verified baseline","The new route failed","Compare before replacing",
+ "Preserve the counterexample","Keep future evidence readable","original-goal","source-a","retained-version"]) assert.ok(html.includes(text),text);
+}
+console.log("Native decisions preserve optional compatibility, complete fields and provenance in both languages");
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-model.ts b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-model.ts
index 6bca73a6c7..efaa6ea569 100644
--- a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-model.ts
+++ b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-model.ts
@@ -168,7 +168,7 @@ export type WorkspaceGoal = {
sourceAccess?: {namespace: string; label: string; readOnly: true; original_goal_id?: string};
sourceRunHistory?: {
total: number | null;
- recent: Pick[];
+ recent: Pick[];
};
sourceStrategy?: {recordedAt: string; summary: string; observation?: string};
/** Registry organization in this status source; not Agent ownership or execution dependency. */
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css
index 50ee87e675..3c140a67be 100644
--- a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css
+++ b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css
@@ -1445,7 +1445,7 @@ button.personal-execution-chip:focus-visible { outline: 2px solid #0070f3; outli
.personal-report-detail li p { margin: 0; color: var(--pw-muted); font-size: var(--text-caption); line-height: var(--leading-caption); }
.personal-report-detail > footer { display: grid; gap: 4px; margin-top: 10px; color: var(--pw-faint); font: var(--text-caption)/var(--leading-caption) var(--font-mono); overflow-wrap: anywhere; }
.personal-source-run-history ol { list-style: none; margin: 10px 0 0; padding: 0; }
-.personal-source-run-history li { border-top: 1px solid var(--pw-line); padding: 8px 0; }
+.personal-source-run-history > ol > li { border-top: 1px solid var(--pw-line); padding: 8px 0; }
.personal-source-run-history summary { cursor: pointer; overflow-wrap: anywhere; }
.personal-source-run-history dd { min-width: 0; overflow-wrap: anywhere; }
.personal-execution-history { margin-top: 18px; }
@@ -2243,3 +2243,6 @@ button.personal-execution-chip:focus-visible { outline: 2px solid #0070f3; outli
.personal-document-attachment > a { display: block; font-size: 12px; color: inherit; }
.personal-document-attachment > pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 240px; margin: 8px 0 0; }
.personal-composer-images figure:has(.personal-document-attachment) { flex: 0 1 360px; min-width: 0; height: auto; padding-right: 24px; }
+
+.personal-source-run-history .source-strategy-document .personal-md { font-size: var(--text-lead); line-height: var(--leading-prose); }
+.personal-source-run-history .source-strategy-document dl dl > div { display: block; }
From a87ad0d92fedde181584d2f9da31dfefdd4a866d Mon Sep 17 00:00:00 2001
From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Date: Fri, 20 Nov 2026 13:45:57 +0800
Subject: [PATCH 3/4] Keep native decision paragraphs readable in the source
drawer
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
---
.../src/features/personal-workspace/personal-workspace.css | 3 +++
1 file changed, 3 insertions(+)
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css
index 3c140a67be..3dd3e675b9 100644
--- a/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css
+++ b/apps/presentation/dashboard/src/features/personal-workspace/personal-workspace.css
@@ -2246,3 +2246,6 @@ button.personal-execution-chip:focus-visible { outline: 2px solid #0070f3; outli
.personal-source-run-history .source-strategy-document .personal-md { font-size: var(--text-lead); line-height: var(--leading-prose); }
.personal-source-run-history .source-strategy-document dl dl > div { display: block; }
+
+.personal-source-run-history .source-strategy-document .personal-md p,
+.personal-source-run-history .source-strategy-document .personal-md li { font-size: inherit; line-height: inherit; color: var(--pw-text); }
From 71a232523bd20275580344fa6a181097aa7d4914 Mon Sep 17 00:00:00 2001
From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Date: Fri, 20 Nov 2026 17:42:53 +0800
Subject: [PATCH 4/4] fix(research): preserve native decisions under workspace
aliases
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
---
.../native-decision-read.test.mjs | 28 +++++++++++++++++++
.../presentation/goal_source_links.ts | 3 ++
2 files changed, 31 insertions(+)
diff --git a/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs b/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs
index 502ac5414a..e1c353335b 100644
--- a/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs
+++ b/apps/presentation/dashboard/src/features/personal-workspace/native-decision-read.test.mjs
@@ -3,6 +3,7 @@ import React from "react";
import {renderToStaticMarkup} from "react-dom/server";
import {runRecordSchema} from "../../data/status";
import {GoalStrategyDocument} from "./goal-source-strategies";
+import {projectGoalSourceStatus} from "../../../../../../loopx/control_plane/presentation/goal_source_links.ts";
const base = {goal_id:"archived", generated_at:"2026-01-01T00:00:00Z"};
for (const agent_vision of [undefined, null, [], "invalid", 42]) {
assert.equal(runRecordSchema.parse({...base, agent_vision}).agent_vision ?? null, null);
@@ -22,3 +23,30 @@ for (const zh of [true,false]) {
"Preserve the counterexample","Keep future evidence readable","original-goal","source-a","retained-version"]) assert.ok(html.includes(text),text);
}
console.log("Native decisions preserve optional compatibility, complete fields and provenance in both languages");
+
+// The original document must survive the real source routing and schema path.
+for (const workspaceId of ["original-solver", "case-a"]) {
+ const decision = {goal_id:"original-solver",
+ vision_patch:{vision_summary:"Keep the native record"},
+ future_field:{goal_id:"original-solver", nested:[{goal_id:"original-solver"}]}};
+ const native = {...base, goal_id:"original-solver", agent_vision:decision};
+ const snapshot = structuredClone(native);
+ const projected = projectGoalSourceStatus({
+ status:{goal_filter:"original-solver",run_history:{goals:[{id:"original-solver",latest_runs:[native]}]}},
+ row:{id:workspaceId,parent_goal_id:"parent",source_access:{original_goal_id:"original-solver"}},
+ });
+ const run = runRecordSchema.parse(projected.run_history.goals[0].latest_runs[0]);
+ assert.equal(run.goal_id, workspaceId, "workspace routing still uses the local alias");
+ assert.deepEqual(run.agent_vision, decision, "native decision identities stay original");
+ assert.deepEqual(native, snapshot, "native record remains unchanged");
+ for (const zh of [true,false]) {
+ const html = renderToStaticMarkup(React.createElement(GoalStrategyDocument, {
+ value:run.agent_vision,recordedAt:base.generated_at,version:"native-version",
+ originalGoalId:"original-solver",namespace:"source-a",zh,
+ }));
+ assert.ok(html.includes("original-solver"));
+ assert.ok(html.includes("future_field"));
+ assert.ok(!html.includes("case-a"), "workspace alias cannot enter the original document");
+ }
+}
+console.log("Native source decisions preserve original identities through alias and non-alias projection, schema and renderer");
diff --git a/loopx/control_plane/presentation/goal_source_links.ts b/loopx/control_plane/presentation/goal_source_links.ts
index 44f8c21099..2216ec47b1 100644
--- a/loopx/control_plane/presentation/goal_source_links.ts
+++ b/loopx/control_plane/presentation/goal_source_links.ts
@@ -102,6 +102,9 @@ export function projectGoalSourceStatus(input: JsonObject): JsonObject {
// These are status projection routing fields, not source document contents.
// All children of this status were read from the same qualified namespace.
const route = (value: unknown, key = ""): unknown => {
+ // Agent decisions are opaque native documents, including future fields.
+ // Only the enclosing run participates in workspace routing.
+ if (key === "agent_vision") return value;
if ((key === "goal_id" || key === "goal_filter") && value === originalId) return workspaceId;
if (Array.isArray(value)) return value.map(item => key === "goal_ids" && item === originalId
? workspaceId : route(item));