* feat(archied): read-only run-scoped sandbox view over the harness contract Serve RunTarget: the daemon resolves a running task and attempt to its Kit container and follows its output, refusing a finished or unknown task with a stated reason. The dashboard adds a Sandbox tab behind the task log's read authority. Takeover stays out of scope until the sod1 authority is wired. * fix(archied): scope and close sandbox views correctly Forward harness activity into container output, bind containers and dashboard views to their attempt, enforce the asserted org, and report unavailable dependencies and interrupted streams accurately. Refs: archie-core-qi91, archie-core-252tj
83 lines
2.3 KiB
Vue
83 lines
2.3 KiB
Vue
<script setup lang="ts">
|
|
import { TabsContent } from "@/components/ui/tabs";
|
|
import { Empty, EmptyHeader, EmptyTitle } from "@/components/ui/empty";
|
|
|
|
import AttemptConfig from "./AttemptConfig.vue";
|
|
import ChangedFiles from "./ChangedFiles.vue";
|
|
import DebugView from "./DebugView.vue";
|
|
import PanelError from "./PanelError.vue";
|
|
import PanelLoading from "./PanelLoading.vue";
|
|
import SandboxView from "./SandboxView.vue";
|
|
import TaskLogs from "./TaskLogs.vue";
|
|
import { RUN_TABS } from "./task-run";
|
|
import { useTaskRun } from "./use-task-run";
|
|
|
|
/**
|
|
* The run page's inspector panels: one panel per tab, each reading the attempt
|
|
* the page has selected. The stage rail lives in the page's master pane and is
|
|
* not one of these tabs.
|
|
*
|
|
* Every panel is scoped to one attempt, and "no attempt" is a claim only a
|
|
* successful read of the run history can make -- a read still in flight is not
|
|
* a verdict either, and a failed read is reported as a failed read.
|
|
*/
|
|
const props = defineProps<{ id: string }>();
|
|
|
|
const run = useTaskRun();
|
|
</script>
|
|
|
|
<template>
|
|
<TabsContent v-for="tab in RUN_TABS" :key="tab.id" :value="tab.id">
|
|
<PanelLoading
|
|
v-if="run.attempts === undefined"
|
|
label="Loading this task's attempts…"
|
|
/>
|
|
|
|
<PanelError
|
|
v-else-if="run.attempts === null"
|
|
title="Could not load this task's attempts"
|
|
detail="The task's run history could not be read."
|
|
/>
|
|
|
|
<Empty v-else-if="run.attemptNumber == null">
|
|
<EmptyHeader>
|
|
<EmptyTitle>No attempt recorded</EmptyTitle>
|
|
</EmptyHeader>
|
|
</Empty>
|
|
<TaskLogs
|
|
v-else-if="tab.id === 'log'"
|
|
:state="run.logState"
|
|
:attempt="run.attemptNumber"
|
|
:stages="run.stageNames"
|
|
:filters="run.filters"
|
|
:task-id="props.id"
|
|
@filter="run.setFilters"
|
|
/>
|
|
|
|
<ChangedFiles
|
|
v-else-if="tab.id === 'changes'"
|
|
:state="run.changesState"
|
|
:task="run.task"
|
|
/>
|
|
|
|
<AttemptConfig
|
|
v-else-if="tab.id === 'config'"
|
|
:events="run.events"
|
|
:attempt="run.attemptNumber"
|
|
/>
|
|
|
|
<DebugView
|
|
v-else-if="tab.id === 'debug'"
|
|
:state="run.debugState"
|
|
:attempt="run.attemptNumber"
|
|
/>
|
|
|
|
<SandboxView
|
|
v-else-if="tab.id === 'sandbox'"
|
|
:key="`${props.id}:${run.attemptNumber}`"
|
|
:task-id="props.id"
|
|
:attempt="run.attemptNumber"
|
|
/>
|
|
</TabsContent>
|
|
</template>
|