summaryrefslogtreecommitdiff
path: root/public/SomhairlesDream.Shared
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 01:18:53 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 01:18:53 +0800
commit0397c375acea763d3110163b045d259155ba2341 (patch)
tree3873b99b5829b12ffc49a5ba10ed5fbaeb48a53b /public/SomhairlesDream.Shared
parent7b29dbff7e43e87741476f47df17ad1582b16546 (diff)
downloadsomhairles-dream-fsharp-0397c375acea763d3110163b045d259155ba2341.tar.gz
feat(viewer): stream live pipeline GLBs into the browser viewport
Protocol: RunSnapshot gains CompletedSteps (accumulated from checkpoint artifact paths, reset on start) so the frontend can tell when real pipeline geometry exists. New coordinator method StepArtifact plus GET /api/artifacts/steps serves steps/*.glb while a run is active (any lifecycle status), traversal-guarded and .glb-only, so stages appear without waiting for run completion. Frontend: GLTFLoader loads the latest completed step into the viewport group as soon as its checkpoint lands over SSE; replay placeholder frames render only while no step artifacts exist. ?freeze=1 query param stops rotation for deterministic screenshot verification. Three.js r160 and GLTFLoader (with BufferGeometryUtils) are vendored under public/ vendor with an import map and a window.THREE shim, replacing the CDN UMD script; the ~1.4MB vendored three.js files are third-party dependencies (MIT), not project assets. Tests: store accumulation of completed artifact paths; steps endpoint serves GLB during an active run, rejects traversal, 404s missing files. Verified: dotnet build Debug+Release clean, 42/42 tests pass, Fable compile clean, release server smoke serves index/vendor/steps endpoint.
Diffstat (limited to 'public/SomhairlesDream.Shared')
-rw-r--r--public/SomhairlesDream.Shared/Artifact.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/public/SomhairlesDream.Shared/Artifact.js b/public/SomhairlesDream.Shared/Artifact.js
index 389d39c..6668abd 100644
--- a/public/SomhairlesDream.Shared/Artifact.js
+++ b/public/SomhairlesDream.Shared/Artifact.js
@@ -251,7 +251,7 @@ export function ArtifactManifest_$reflection() {
}
export class RunSnapshot extends Record {
- constructor(ProjectId, RunId, BaseId, TargetId, Status, CurrentStepId, CurrentStepIndex, TotalSteps, LastHeartbeatAt, UpdatedAt, Message, ManifestPath, ManifestUrl, Error$, IsStale) {
+ constructor(ProjectId, RunId, BaseId, TargetId, Status, CurrentStepId, CurrentStepIndex, TotalSteps, CompletedSteps, LastHeartbeatAt, UpdatedAt, Message, ManifestPath, ManifestUrl, Error$, IsStale) {
super();
this.ProjectId = ProjectId;
this.RunId = RunId;
@@ -261,6 +261,7 @@ export class RunSnapshot extends Record {
this.CurrentStepId = CurrentStepId;
this.CurrentStepIndex = (CurrentStepIndex | 0);
this.TotalSteps = (TotalSteps | 0);
+ this.CompletedSteps = CompletedSteps;
this.LastHeartbeatAt = LastHeartbeatAt;
this.UpdatedAt = UpdatedAt;
this.Message = Message;
@@ -272,6 +273,6 @@ export class RunSnapshot extends Record {
}
export function RunSnapshot_$reflection() {
- return record_type("SomhairlesDream.Shared.RunSnapshot", [], RunSnapshot, () => [["ProjectId", string_type], ["RunId", string_type], ["BaseId", string_type], ["TargetId", string_type], ["Status", string_type], ["CurrentStepId", option_type(string_type)], ["CurrentStepIndex", int32_type], ["TotalSteps", int32_type], ["LastHeartbeatAt", option_type(class_type("System.DateTimeOffset"))], ["UpdatedAt", class_type("System.DateTimeOffset")], ["Message", string_type], ["ManifestPath", option_type(string_type)], ["ManifestUrl", option_type(string_type)], ["Error", option_type(string_type)], ["IsStale", bool_type]]);
+ return record_type("SomhairlesDream.Shared.RunSnapshot", [], RunSnapshot, () => [["ProjectId", string_type], ["RunId", string_type], ["BaseId", string_type], ["TargetId", string_type], ["Status", string_type], ["CurrentStepId", option_type(string_type)], ["CurrentStepIndex", int32_type], ["TotalSteps", int32_type], ["CompletedSteps", array_type(string_type)], ["LastHeartbeatAt", option_type(class_type("System.DateTimeOffset"))], ["UpdatedAt", class_type("System.DateTimeOffset")], ["Message", string_type], ["ManifestPath", option_type(string_type)], ["ManifestUrl", option_type(string_type)], ["Error", option_type(string_type)], ["IsStale", bool_type]]);
}