T-K1A2-preview-pane-per-entity-and-target
State: planning/proposed · Impact: high · Complexity: medium
An author edits one canonical note and each of the eight canonical destinations receives something
different, but no screen shows what any of them receives. The publish preview names the files a
publish would write and their verdicts; it never shows their contents. This task turns the
secondary pane into a per-target reading of the rendered output, so the effect of a field, a
narrowing ap-targets or an ap-overrides block is visible where it is edited.
| Location | Role today |
|---|---|
solutions/determined/experiences/agent-pants/app/components/ApPublishPreviewPanel.vue | The dry run as a destination table: one row per target, a verdict badge, the file list behind a click; layout="compact" is the aux Publish section |
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillPublishPreview.ts | agentSkillGetPublishPreview(path), keyed by path, immediate: false |
solutions/determined/crates/determined-agent-skills/src/lib.rs#get_publish_preview | Runs a real DryRun publish per canonical_targets() against synthetic temp roots, through the core’s capturing overlay |
solutions/determined/crates/determined-core/src/wire/mod.rs#AgentSkillReportedFile | {path, status, reason} — the preview names each file and carries none of its bytes |
solutions/agent-pants/crates/agent-adapt-core/src/publish.rs#canonical_targets | KNOWN_TARGETS folded through canonical_target, deduplicated — the destination roster |
packages/rust/agent-adapt/src/runtimes/mod.rs#skill_renderer_for | Per-runtime renderer lookup, with command_renderer_for and agent_renderer_for beside it |
solutions/determined/experiences/agent-pants/app/components/ApBuildPanel.vue | The build report grouped by output root: one DCard of unit rows per root, no file tree |
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rs | The v1 surface build.rs generates the HTTP and IPC transports from |
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vue | aux “Details” carries the compact publish panel; the stage’s UTabs carries the full report |
Proposed
Section titled “Proposed”A new ApPreviewPane.vue is the aux region’s default on every entity page. Its header is a
target switcher — subtabs over canonical_targets(), narrowed to the note’s effective
ap-targets — and its body depends on the kind:
- skill, command and agent: the rendered file for that target, shown in the code viewer from
T-MVW5-code-editor-package, with every key an
ap-overridesblock supplied for that target marked; - plugin and marketplace: the output tree that target’s build produces, read-only;
- a target that refuses (no renderer, a field the harness rejects): the refusal in place of the body, naming the target.
The bytes come from a new read-only render call. AgentSkillReportedFile carries path, status
and reason and no content, so the existing publish preview cannot answer this — the call is new
work, not a re-read of what is already on the wire.
Approach
Section titled “Approach”- Add
render_preview(vault_dir, entry, target)todetermined-agent-skills, overagent_adapt::runtimes::{skill,command,agent}_renderer_for, returning per emitted file{path, text, overridden_keys}. Open decision in this step: what a binary resource returns. Return its size and no bytes — a preview pane has nothing to do with the contents of a PNG. - Add the wire types to
solutions/determined/crates/determined-core/src/wire/mod.rsand the v1 wrapper tocrates/determined-platform/src/api/v1/agent_skills.rs. The HTTP and IPC transports and the TypeScript client regenerate from there; the generated files are committed. useAgentSkillRenderPreview(path, target)beside the publish-preview composable, keyed by both so switching targets is a second fetch and switching back is a hit.- New
ApPreviewPane.vue: the target subtabs, the file list for a target that emits more than one file, and the selected file in the code viewer. - Mark the overridden keys: a key
ap-overridessupplied for this target renders with a badge and a tooltip naming the override, read fromoverridden_keys. - Container kinds render the output tree.
ApBuildPanel.vuegroups build units per root and renders no tree, so the tree component is new here; extract it so the build panel can adopt it later rather than growing a second one. - Mount
ApPreviewPane.vueas theauxdefault on the three entity pages, and follow the active document from T-RR9V-tabs-carry-entity-icons-and-views so the pane re-points when the tab changes. - Tests: a Rust test asserting the render call and a real publish emit identical bytes for a fixture skill, and a component test for the subtabs and the refusal case.
| Area | Note |
|---|---|
solutions/determined/crates/determined-agent-skills/src/lib.rs | Add render_preview over the per-runtime renderers |
solutions/determined/crates/determined-core/src/wire/mod.rs | Wire types for the render preview and its per-file entries |
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rs | v1 wrapper the transports generate from |
solutions/determined/packages/vault-platform-client/src/generated/transport.ts | Regenerated client for the new call |
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillRenderPreview.ts | Fetch keyed by path and target |
solutions/determined/experiences/agent-pants/app/components/ApPreviewPane.vue | Target subtabs, file list, code viewer, refusals in place |
solutions/determined/experiences/agent-pants/app/components/ApOutputTree.vue | Read-only output tree for a plugin or marketplace |
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vue | ApPreviewPane is the aux default |
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/plugins/[...path].vue | Same |
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/index.vue | Same |
solutions/determined/products/agent-pants/tests/e2e/capture.e2e.ts | Screenshot the preview pane per target |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: A Rust test renders a fixture skill through
render_previewand through aDryRunpublish for the same target, and the emitted bytes are identical. - AC-2: Selecting each of
claude,codex,opencodeandgemini-cliin the pane’s subtabs shows four differentSKILL.mdbodies for a fixture skill that exercises a translated field. - AC-3: A note whose
ap-targetsnames two destinations shows exactly two subtabs. - AC-4: A target with no renderer for the note’s kind shows its refusal text in the body, and the other subtabs still render.
- AC-5: A key supplied by an
ap-overridesblock for the selected target renders marked; the same key on a target with no override renders unmarked. - AC-6: A plugin note’s pane shows the output tree that plugin’s build produces, and no file in it is editable.
- AC-7: The pane re-points when the active document tab changes.
Out of scope
Section titled “Out of scope”- The harness gap table and the “override for this harness” action (T-0AF7-hook-editor-and-harness-gap-table).
- Publish status, dry run and install controls, which move in T-H3RG-publish-as-secondary-view.
- Editing a rendered file. The preview is read-only; the canonical note is the only editable copy.
- Retiring
ApPublishPreviewPanel.vue; it keeps answering “what would a publish do”. - Migrating
ApBuildPanel.vueonto the extracted output tree.
Dependencies
Section titled “Dependencies”- T-RR9V-tabs-carry-entity-icons-and-views gives the pane an active document to follow. Hard: without it the pane has no subject when the stage is a tab.
- T-MVW5-code-editor-package supplies the code surface the rendered source is shown in. Hard:
a
<pre>here would be built and then thrown away. - T-IIZO-per-target-overrides supplies the
ap-overridesblock whose keys the pane marks. Without it the mark never fires and nothing else changes. - T-8BUZ-marketplace-targets-and-support-warnings supplies the effective-target set the subtabs enumerate.
Discovery context
Section titled “Discovery context”The user’s planning request of 2026-09-07 asked for the secondary pane to preview what each harness
receives, per entity and per target. Member of milestone M-BMFD.
solutions/agent-pants/docs/vault/design/workflow-and-ux-assessment.md records that
get_publish_preview classifies against an always-empty temp directory, so every file reads as a
first write — which is why this pane is a render reading and not a status reading. The per-harness
divergence it makes visible is catalogued in
solutions/agent-pants/docs/vault/reference/harness-comparison.md.
Depends on
Section titled “Depends on”T-RR9V-tabs-carry-entity-icons-and-views, T-MVW5-code-editor-package