Skip to content

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.

LocationRole today
solutions/determined/experiences/agent-pants/app/components/ApPublishPreviewPanel.vueThe 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.tsagentSkillGetPublishPreview(path), keyed by path, immediate: false
solutions/determined/crates/determined-agent-skills/src/lib.rs#get_publish_previewRuns 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_targetsKNOWN_TARGETS folded through canonical_target, deduplicated — the destination roster
packages/rust/agent-adapt/src/runtimes/mod.rs#skill_renderer_forPer-runtime renderer lookup, with command_renderer_for and agent_renderer_for beside it
solutions/determined/experiences/agent-pants/app/components/ApBuildPanel.vueThe 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.rsThe v1 surface build.rs generates the HTTP and IPC transports from
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vueaux “Details” carries the compact publish panel; the stage’s UTabs carries the full report

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-overrides block 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.

  1. Add render_preview(vault_dir, entry, target) to determined-agent-skills, over agent_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.
  2. Add the wire types to solutions/determined/crates/determined-core/src/wire/mod.rs and the v1 wrapper to crates/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.
  3. useAgentSkillRenderPreview(path, target) beside the publish-preview composable, keyed by both so switching targets is a second fetch and switching back is a hit.
  4. 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.
  5. Mark the overridden keys: a key ap-overrides supplied for this target renders with a badge and a tooltip naming the override, read from overridden_keys.
  6. Container kinds render the output tree. ApBuildPanel.vue groups 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.
  7. Mount ApPreviewPane.vue as the aux default 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.
  8. 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.
AreaNote
solutions/determined/crates/determined-agent-skills/src/lib.rsAdd render_preview over the per-runtime renderers
solutions/determined/crates/determined-core/src/wire/mod.rsWire types for the render preview and its per-file entries
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rsv1 wrapper the transports generate from
solutions/determined/packages/vault-platform-client/src/generated/transport.tsRegenerated client for the new call
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillRenderPreview.tsFetch keyed by path and target
solutions/determined/experiences/agent-pants/app/components/ApPreviewPane.vueTarget subtabs, file list, code viewer, refusals in place
solutions/determined/experiences/agent-pants/app/components/ApOutputTree.vueRead-only output tree for a plugin or marketplace
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vueApPreviewPane is the aux default
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/plugins/[...path].vueSame
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/index.vueSame
solutions/determined/products/agent-pants/tests/e2e/capture.e2e.tsScreenshot the preview pane per target
  • AC-1: A Rust test renders a fixture skill through render_preview and through a DryRun publish for the same target, and the emitted bytes are identical.
  • AC-2: Selecting each of claude, codex, opencode and gemini-cli in the pane’s subtabs shows four different SKILL.md bodies for a fixture skill that exercises a translated field.
  • AC-3: A note whose ap-targets names 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-overrides block 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.
  • 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.vue onto the extracted output tree.

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.

T-RR9V-tabs-carry-entity-icons-and-views, T-MVW5-code-editor-package


← Back to Tasks