Skip to content

T-7UDE-related-files-tab

State: planning/proposed · Impact: medium · Complexity: medium

A skill’s aux column lists the peer files the bundle carries and nothing else, so the notes it embeds, the notes it links, the names that resolve to nothing and the container that carries it are invisible from the note being edited. The compiler already computes most of that closure and throws it away. This task exposes it as one read and renders it as a Related tree, which is also what turns a dangling wikilink into a one-click “create this”.

LocationRole today
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs#ClosurePer emitted file: contributing_notes (the owner plus everything transitively embedded) and unresolved (link targets that resolved to nothing)
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs#compile_noteProduces CompiledNote { body, resources, closures } — the closure exists only to make staleness computable
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs#scan_wiki_tokensThe one scanner that tells an embed from a link. Private to the module
solutions/determined/crates/determined-agent-skills/src/lib.rs#get_rosterThe vault scan behind agentSkillGetRoster
solutions/determined/crates/determined-core/src/wire/mod.rs#AgentSkillNoteDetailCarries resources, the resolved plugin and marketplace, and the resolved kind — and no link or embed list
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vueThe aux “Files” panel lists data.resources and reveals one in the rail
solutions/determined/experiences/agent-pants/app/composables/useAgentPantsUi.ts#useAgentPantsFocusResourceThe channel the Files panel uses to ask the tree to reveal a peer file
solutions/determined/experiences/agent-pants/app/components/ApComponentTree.vueWatches that channel and expands to the file row

A new read call agentSkillGetRelated(entry) answers {embeds, links, resources, carried_by} for one note: the notes its body embeds (transitively, as the compiler resolves them), the notes it links without embedding, the peer files the bundle ships, and the plugin or marketplace that carries it. A link target that resolves to nothing comes back in links marked missing rather than being dropped.

A new ApRelatedTree.vue renders that as one grouped tree in the aux region, each row carrying its kind’s glyph from KIND_ICON. A click routes by row type: a note opens in the editor, a resource opens in the code viewer from T-MVW5-code-editor-package, a missing target opens the wizard seeded with that name. It replaces the Files panel, which becomes the Resources group inside it.

  1. Make the scanner reachable from outside compile.rs — pub(crate) plus a pub fn that returns the split, or make scan_wiki_tokens itself public. Open decision in this step: whether Related runs a scan or a compile. A compile already resolves embeds transitively and records unresolved, but it also renders every resource’s bytes; a scan-only pass is the default here, with the compile reserved for the transitive case if the scan cannot reach it.
  2. Add get_related(vault_dir, entry) to determined-agent-skills, joining the scan with the roster (to resolve a target to a note) and with the note’s resolved plugin and marketplace (for carried_by).
  3. 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 transports and the TypeScript client regenerate from there.
  4. useAgentSkillRelated(path) beside the other note composables.
  5. New ApRelatedTree.vue: four groups — Embeds, Links, Resources, Carried by. Each row carries its kind glyph; a missing row renders muted, with a “create” affordance.
  6. Wire the clicks: a note routes to /apps/agent-pants/notes/<path>, a resource opens the code viewer, a missing target opens ApNewComponentWizard with the name seeded through wizardSeed.ts.
  7. Replace the aux Files panel on notes/[...path].vue with the tree, keeping useAgentPantsFocusResource so a resource row can still reveal itself in the component tree.
  8. Tests: a Rust test over a fixture note that embeds one note, links a second and links a third that does not exist; a component test for the four groups and the missing-row affordance.
AreaNote
solutions/agent-pants/crates/agent-adapt-core/src/compile.rsExpose the embed/link split the scanner already computes
solutions/determined/crates/determined-agent-skills/src/lib.rsAdd get_related, joining the scan with the roster
solutions/determined/crates/determined-core/src/wire/mod.rsWire types for the related answer and its rows
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 agentSkillGetRelated
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillRelated.tsFetch keyed by note path
solutions/determined/experiences/agent-pants/app/components/ApRelatedTree.vueThe grouped, kind-coloured tree and its click routing
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vueThe Files panel gives way to the Related tree
solutions/determined/experiences/agent-pants/app/utils/wizardSeed.tsSeed a create from a missing link target
  • AC-1: A Rust test over a fixture note that embeds one note, links a second and links a third that does not exist returns one embed, two links, and the third marked missing.
  • AC-2: A note embedded two hops deep appears in embeds — the answer is transitive, matching the compiler’s closure.
  • AC-3: The Related tree shows Embeds, Links, Resources and Carried by, and a group with no rows is not rendered.
  • AC-4: Each note row carries the glyph its kind carries in the component tree.
  • AC-5: Clicking a note row navigates to that note’s editor; clicking a resource row opens it in the code viewer; clicking a missing row opens the wizard with the name pre-filled.
  • AC-6: A skill inside a plugin inside a marketplace lists both containers under Carried by.
  • AC-7: The aux “Files” panel is gone from notes/[...path].vue and its resources are the Resources group.
  • Backlinks from other notes into this one. carried_by is containment, not incoming links.
  • Rendering an embed’s content inline, which is T-LN3V-transclusion-rendering-in-agent-manager.
  • A vault-wide graph view.
  • Editing anything from the tree; every row navigates.
  • Repairing a broken link in place; the missing row seeds a create and nothing more.

The user’s planning request of 2026-09-07 asked for a Related tab showing everything a note links, embeds, carries and is carried by. Member of milestone M-BMFD. The closure this reads is already computed for staleness — compile.rs records contributing_notes and unresolved per emitted file — so the data exists and only the read is missing.

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


← Back to Tasks