From 70c207803909ad72d77a45211225d0133a9836bf Mon Sep 17 00:00:00 2001 From: Philipp D Date: Tue, 27 Oct 2026 17:22:17 +0100 Subject: [PATCH 1/4] feat(dashboard): fewer upgrade nags: the review banner hides until the next minor, skills are outdated only when their text changed The "stack file behind" banner gets a dismiss button; hidden, it stays hidden for that stack until a new minor devstack is installed (a patch release does not bring it back). Kept per browser, like the guest banner. An installed agent skill is compared with this devstack's templates rendered with the skill's own version, so a release whose skills read the same apart from the marker line and docs links no longer asks for a refresh (dashboard, `status`, `doctor`, `skills check`). Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 10 +++++ crates/devstack-skills/src/lib.rs | 69 +++++++++++++++++++---------- docs/stack-file.md | 3 +- ui/src/components/UpgradeBanner.vue | 25 ++++++++++- 4 files changed, 81 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 424acd2e..a96f6230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ and listed with their assets on the ## [Unreleased] +### Changed + +- **The dashboard's "stack file behind" banner can be hidden**: it stays + hidden for that stack until the next minor devstack is installed; a patch + release does not bring it back. +- **The agent skills count as outdated only when their text changed**: a new + devstack whose skills read the same, apart from the version in their marker + line and docs links, no longer asks for a refresh (dashboard, `status`, + `doctor`, `skills check`). + ### Fixed - **A lane's memory check looks at Docker Desktop's VM** (#309): on Windows diff --git a/crates/devstack-skills/src/lib.rs b/crates/devstack-skills/src/lib.rs index 936ab174..8a5c5cd7 100644 --- a/crates/devstack-skills/src/lib.rs +++ b/crates/devstack-skills/src/lib.rs @@ -6,8 +6,8 @@ //! (`.claude/skills` when it names none). A generated skill says so in a //! marker line; installing again overwrites it, and `devstack status` (and //! the dashboard, through the hub) notes when an installed copy, in those -//! folders or another agent's, no longer matches this devstack or this stack -//! file. What is +//! folders or another agent's, no longer matches this devstack's templates or +//! this stack file (a new version alone does not count). What is //! specific to a project beyond that belongs in a skill of the project's own, //! which devstack never touches. @@ -104,17 +104,19 @@ fn file_name(stack_file: &Path) -> String { pub fn render_all(stack: &Stack, stack_file: &Path) -> Vec<(&'static str, String)> { TEMPLATES .iter() - .map(|(name, tpl)| (*name, render(tpl, stack, stack_file))) + .map(|(name, tpl)| (*name, render(tpl, stack, stack_file, VERSION))) .collect() } -fn render(tpl: &str, stack: &Stack, stack_file: &Path) -> String { +/// `version` names the devstack in the marker line and the docs links: this +/// one, or an installed skill's own to tell whether more than that differs. +fn render(tpl: &str, stack: &Stack, stack_file: &Path, version: &str) -> String { let file = file_name(stack_file); let vars: Vec<(&str, String)> = vec![ ( "marker", format!( - "generated by devstack {VERSION} from {file} {MARKER_TAG}: edits here are overwritten; put project specifics into a skill of your own" + "generated by devstack {version} from {file} {MARKER_TAG}: edits here are overwritten; put project specifics into a skill of your own" ), ), ("stack_name", stack.stack.name.clone()), @@ -128,7 +130,7 @@ fn render(tpl: &str, stack: &Stack, stack_file: &Path) -> String { .map_or_else(|| "any version".into(), |r| format!("devstack {r}")), ), ("repo_url", REPO_URL.into()), - ("docs_url", format!("{REPO_URL}/blob/v{VERSION}/docs")), + ("docs_url", format!("{REPO_URL}/blob/v{version}/docs")), ("services_table", services_table(stack)), ("held_paths", held_paths(stack)), ("commands_table", commands_table(stack)), @@ -395,7 +397,9 @@ pub struct Installed { /// Generated skills found, by folder: `.claude/skills/devstack` (one the /// project wrote itself is not one). pub found: Vec, - /// Of those, the ones that differ from what `install` would write now. + /// Of those, the ones that differ from what `install` would write now, + /// apart from the devstack version: a release whose skills read the same + /// leaves them be. pub outdated: Vec, /// The oldest devstack their marker lines name: the version the /// repository was last set up with. `None` when no marker names one. @@ -410,10 +414,9 @@ pub fn installed(stack_file: &Path) -> Installed { let Ok(dirs) = search_dirs(&stack, stack_file) else { return Installed::default(); }; - let rendered = render_all(&stack, stack_file); let mut out = Installed::default(); for dir in &dirs { - for (name, content) in &rendered { + for (name, tpl) in TEMPLATES { let Ok(e) = std::fs::read_to_string(dir.join(name).join("SKILL.md")) else { continue; }; @@ -421,11 +424,19 @@ pub fn installed(stack_file: &Path) -> Installed { continue; } let at = shown(stack_file, dir, name); - if normalize(&e) != normalize(content) { + // Held against this devstack's text as the version that wrote it. + let version = marker_version(&e); + let content = render( + tpl, + &stack, + stack_file, + version.as_deref().unwrap_or(VERSION), + ); + if normalize(&e) != normalize(&content) { out.outdated.push(at.clone()); } out.found.push(at); - if let Some(v) = marker_version(&e) { + if let Some(v) = version { let older = out.from.as_deref().is_none_or(|f| { devstack_config::version_order(&v) < devstack_config::version_order(f) }); @@ -615,7 +626,7 @@ steps = [{ exec = "true" }] #[test] fn the_marker_names_the_version_it_was_written_by() { let s = stack(); - let written = render(TEMPLATES[0].1, &s, Path::new("devstack.toml")); + let written = render(TEMPLATES[0].1, &s, Path::new("devstack.toml"), VERSION); assert_eq!(marker_version(&written).as_deref(), Some(VERSION)); assert_eq!( marker_version( @@ -645,8 +656,17 @@ ours" assert!(now.outdated.is_empty()); assert_eq!(now.from.as_deref(), Some(VERSION)); - // One of them written by an older devstack. - age(&dir.path().join(".claude/skills/devstack/SKILL.md")); + // One of them written by an older devstack whose skill read the same: + // nothing to refresh, but it still says how far back. + let skill = dir.path().join(".claude/skills/devstack/SKILL.md"); + age(&skill, false); + let same = installed(&file); + assert!(same.outdated.is_empty(), "{:?}", same.outdated); + assert_eq!(same.from.as_deref(), Some("0.1.0")); + + // One whose text has changed since. + install(&stack, &file, None, false).unwrap(); + age(&skill, true); let then = installed(&file); assert_eq!(then.outdated, [".claude/skills/devstack"]); assert_eq!(then.from.as_deref(), Some("0.1.0")); @@ -654,14 +674,17 @@ ours" const STACK: &str = "version = 1\n[stack]\nname = \"shop\"\n[services.api]\nrun = \"x\"\n"; - /// As if an older devstack had written it. - fn age(skill: &Path) { - let text = std::fs::read_to_string(skill).unwrap(); - std::fs::write( - skill, - text.replace(&format!("devstack {VERSION} "), "devstack 0.1.0 "), - ) - .unwrap(); + /// As if an older devstack had written it, with other text than this one + /// when `changed`. + fn age(skill: &Path, changed: bool) { + let mut text = std::fs::read_to_string(skill) + .unwrap() + .replace(&format!("devstack {VERSION} "), "devstack 0.1.0 ") + .replace(&format!("/blob/v{VERSION}/"), "/blob/v0.1.0/"); + if changed { + text.push_str("\nA paragraph this devstack no longer writes.\n"); + } + std::fs::write(skill, text).unwrap(); } #[test] @@ -690,7 +713,7 @@ ours" // found and refreshed; the project's own skill there stays. let github = dir.path().join(".github/skills"); install(&stack, &file, Some(&github), false).unwrap(); - age(&github.join("devstack/SKILL.md")); + age(&github.join("devstack/SKILL.md"), true); std::fs::write(github.join("devstack-config/SKILL.md"), "ours").unwrap(); assert_eq!(outdated(&file), [".github/skills/devstack"]); install(&stack, &file, None, false).unwrap(); diff --git a/docs/stack-file.md b/docs/stack-file.md index ef610178..94f56a42 100644 --- a/docs/stack-file.md +++ b/docs/stack-file.md @@ -954,7 +954,8 @@ inside the repository and be named once; the list must not be empty. A generated skill (its marker line says so) is also looked for in the other agents' folders (`.github/skills`, `.cursor/skills`, `.gemini/skills`, ...): `devstack status`, `doctor`, `skills check` and the dashboard report one that -no longer matches, and `skills install` refreshes it there. A skill the +no longer matches (a newer devstack whose skills read the same, apart from +its version, does not count), and `skills install` refreshes it there. A skill the project wrote itself is never touched. ## Placeholders diff --git a/ui/src/components/UpgradeBanner.vue b/ui/src/components/UpgradeBanner.vue index c6cb66f8..3278f865 100644 --- a/ui/src/components/UpgradeBanner.vue +++ b/ui/src/components/UpgradeBanner.vue @@ -2,7 +2,9 @@ // The stack file was last brought up to date with an older devstack // (`[stack] reviewed`): a coding agent brings it up to date with the hub's // prompt. The agent skills are SkillsBanner's: refreshing them leaves this. -import { watch } from 'vue'; +// Hidden, it stays hidden until the next minor devstack is installed. +import { computed, ref, watch } from 'vue'; +import { persist } from '@/lib/persist'; import { useHub } from '@/stores/hub'; import { useStack } from '@/stores/stack'; import AgentPrompt from './AgentPrompt.vue'; @@ -11,6 +13,22 @@ import Icon from './icons/Icon.vue'; const hub = useHub(); const stack = useStack(); +/** `0.25.1` and `0.25.0-rc.1` are `0.25`: a patch release does not show it again. */ +function minor(version: string): string { + return version.split(/[.-]/).slice(0, 2).join('.'); +} + +const key = computed(() => `upgradeDismissed.${stack.id}`); +const dismissed = ref(null); +watch(key, (k) => (dismissed.value = persist.get(k)), { immediate: true }); +const shown = computed(() => !!stack.upgrade?.behind && dismissed.value !== minor(stack.upgrade.current)); + +function dismiss() { + if (!stack.upgrade) return; + dismissed.value = minor(stack.upgrade.current); + persist.set(key.value, dismissed.value); +} + // A new devstack (the hub restarts with it) or an edited stack file (an // agent set `reviewed`) changes the answer. watch( @@ -20,7 +38,7 @@ watch( From 75c339551558fec27ed4d4fd082aeff219451407 Mon Sep 17 00:00:00 2001 From: Philipp D Date: Tue, 27 Oct 2026 17:44:47 +0100 Subject: [PATCH 2/4] feat(dashboard): the upgrade banner is one quiet line that also says the skills are older The "stack file behind" banner was a blue block of two sentences, four buttons and a disclosure, with a second banner for the agent skills below it. Now it is one neutral line: - AgentPrompt gets a `compact` variant: one button for the first agent, a menu with the other agents, "Copy prompt" and "Show the prompt" (in a dialog). Its other uses keep the full layout. - The explanation of `[stack] reviewed` moves into the text's tooltip. - Skills from an older devstack are said in the same line, with "Refresh skills only"; SkillsBanner leaves that case to it while it shows (lib/upgradeNotice.ts holds the shared state and the hide-until-next- minor logic). Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 5 +- ui/src/components/AgentPrompt.vue | 111 +++++++++++++++++++++++++++- ui/src/components/SkillsBanner.vue | 12 +-- ui/src/components/UpgradeBanner.vue | 55 +++++++------- ui/src/lib/upgradeNotice.ts | 42 +++++++++++ 5 files changed, 189 insertions(+), 36 deletions(-) create mode 100644 ui/src/lib/upgradeNotice.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a96f6230..813d3deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,10 @@ and listed with their assets on the ### Changed -- **The dashboard's "stack file behind" banner can be hidden**: it stays +- **The dashboard's "stack file behind" banner is one quiet line and can be + hidden**: neutral instead of blue, one "Bring up to date" button whose + menu holds the other agents, the copy and the prompt, and it says that the + agent skills are older too instead of a second banner. Hidden, it stays hidden for that stack until the next minor devstack is installed; a patch release does not bring it back. - **The agent skills count as outdated only when their text changed**: a new diff --git a/ui/src/components/AgentPrompt.vue b/ui/src/components/AgentPrompt.vue index 70f3f59e..d232c46d 100644 --- a/ui/src/components/AgentPrompt.vue +++ b/ui/src/components/AgentPrompt.vue @@ -2,16 +2,20 @@ // A prompt for a coding agent, written by the hub (ADR-0046, amendment // 2026-10-22): copied, shown, or handed to an agent the hub starts in the // right folder. The page names the prompt and what it is about, never text. +// `compact` fits it into a one-line banner: one button for the first agent, +// the others, the copy and the text in its menu. import { computed, ref, watch } from 'vue'; import { api, paths } from '@/api'; import type { Opener, PromptKind, PromptTarget } from '@/api/types'; import { act } from '@/lib/actions'; import { useOpenerPrefs } from '@/lib/openers'; +import { usePopover } from '@/lib/popover'; import { useHub } from '@/stores/hub'; import { useUi } from '@/stores/ui'; import Icon from './icons/Icon.vue'; +import Modal from './Modal.vue'; -const props = defineProps<{ kind: PromptKind; target: PromptTarget }>(); +const props = defineProps<{ kind: PromptKind; target: PromptTarget; compact?: boolean; label?: string }>(); const hub = useHub(); const ui = useUi(); const prefs = useOpenerPrefs(); @@ -19,6 +23,10 @@ const prefs = useOpenerPrefs(); const text = ref(null); const problem = ref(null); const starting = ref(null); +const showing = ref(false); +const root = ref(null); +const trigger = ref(null); +const menu = usePopover(root, trigger); // Keyed by the request itself: a parent that renders again passes a new // target object for the same prompt. @@ -45,6 +53,7 @@ void hub.loadOpeners(); const agents = computed(() => prefs.shown(hub.openers ?? []).filter((o) => o.prompt)); async function copy() { + menu.close(); if (!text.value) return; try { await navigator.clipboard.writeText(text.value); @@ -55,6 +64,7 @@ async function copy() { } async function start(o: Opener) { + menu.close(); starting.value = o.id; try { await act({ @@ -73,7 +83,41 @@ async function start(o: Opener) {