Repository navigation
feat(herdr): show extras and memory notes in the panel - #961
Conversation
The panel read skills, agents, MCP servers, plugins and hooks, but not extras, which `sync --all` also syncs. An extra waiting for a sync was not shown, so Overview could say everything was in sync when it wasn't. Extras are now a sixth kind, read per scope with `extras list --json` and `extras memory list --json`. Overview counts them, and an extra whose target is not `synced` waits for a sync like an MCP server, so the existing Sync button covers it. Library has an Extras tab with file extras, folder extras and memory notes. A preview shows the file, or a folder's files, with its frontmatter, and the targets with their mode and status. Nothing new can be changed from the panel. An extra's target is named by the target whose skills folder shares its parent folder, as the dashboard names it, else by its path. In a project, `status` reports absolute target paths while extras keep the config's relative ones, so those are resolved against the project folder first. Targets that share a skills folder, such as codex and universal at ~/.agents/skills, come from `status` in no fixed order, so the first by name names the extra's target. An extra whose source is missing (`source_exists` is false, or a target reports `no source`) is not something a sync can fix: `doctor` reports it as an error, `diff` marks it failed and the dashboard shows it in red. It goes under Need a look as "source missing", which now holds more than hook notices, so Overview's title for it is "NEED A LOOK". With nothing waiting, Overview says how many extras need a look instead of "Everything is in sync", and the preview says the source is missing instead of offering a Try again that can't help. Memory notes never wait for a sync, so a failed memory read, as on a CLI before 0.24, leaves the sync state confirmed and Sync available. When that read has never answered, the Extras count is the extras that were read. The memory folder also appears as an extra of its own, as it does in the dashboard's Folders & files. Refs runkids#930
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c33d33fc6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
| // An extra's target is named by the target whose skills folder shares its parent folder. | ||
| // Relative project paths start from the project folder; the first target by name wins a shared folder. | ||
| const segments = (path) => String(path ?? "").toLowerCase().split(/[\\/]+/).filter((s) => s && s !== "."); |
There was a problem hiding this comment.
Preserve case when matching POSIX target paths
On a case-sensitive POSIX machine, a supported custom target at /home/me/.Claude/skills and an extra at /home/me/.claude/rules are distinct, but lowercasing every segment makes owner() assign the extra to that target and targetList() charge its pending work to the wrong map line. Preserve case for POSIX paths and fold it only for Windows paths; the generated herdr/skillshare-mod/mods/skillshare/model.js contains the same logic.
AGENTS.md reference: AGENTS.md:L37-L37
Useful? React with 👍 / 👎.
| if (item.extra !== "folder") return { files: [item.file], file: item.file, dir: item.dir, ...(await loadFile(io, on, item.dir, item.file)) }; | ||
| // A folder shows its SKILL.md, which READ_SKILL already read, else its first file. A folder | ||
| // holds no SKILL.md as a rule, so READ_SKILL ending non-zero is not an error here. | ||
| const r = await io.sh(READ_SKILL, [item.dir], on), cut = r.stdout.indexOf("@@\n"); |
There was a problem hiding this comment.
Match folder previews to the extras inventory
When a folder extra contains skillshare's .metadata.json or a nested Git checkout, this new reuse of READ_SKILL lists files that internal/sync/extras.go explicitly excludes from extras syncing (READ_SKILL skips only the root ./.git/*). The preview can therefore expose internal/unshipped files and even choose one as the default document; use an extras-specific listing with the CLI's exclusions in both this loader and the generated herdr/skillshare-mod/mods/skillshare/loader.js.
AGENTS.md reference: AGENTS.md:L37-L37
Useful? React with 👍 / 👎.
| const keys = item.kind === "skills" || item.kind === "agents" ? ["list", "diff", "status"] : item.kind === "extras" ? [item.extra === "note" ? "memory" : "extras"] : [item.kind]; | ||
| if (!item.notice && item.state !== "off" && keys.some((key) => raw.pending?.includes(key) || raw.errors?.[key])) { | ||
| item.cachedState = item.state; | ||
| item.state = "unknown"; |
There was a problem hiding this comment.
Keep broken extras visible while refresh is unconfirmed
When a refresh is pending or fails after a missing-source extra was cached, this branch changes its state from broken to unknown with cachedState: "broken"; Overview's unconfirmed predicate accepts only sync, missing, and update, while needsLook accepts only the current broken state, so the row disappears from Overview for the duration of the refresh or failure. Include cached broken rows in the unconfirmed section; the same model/main pairing is duplicated under herdr/skillshare-mod/mods/skillshare/.
AGENTS.md reference: AGENTS.md:L37-L37
Useful? React with 👍 / 👎.
| in the source and a line to every target that shows which ones are waiting. | ||
| - **Read before you act.** Click any row to preview it: a skill's `SKILL.md` and files, an agent, an | ||
| MCP server's settings with secret values hidden, a hook, a plugin, and the targets each goes to. | ||
| MCP server's settings with secret values hidden, a hook, a plugin, an extra's file or folder, a |
There was a problem hiding this comment.
Redraw panel assets for the Extras UI
The README and recipes now advertise the six-kind Extras UI, but this commit leaves herdr/skillshare/panels.png at its pre-feature version (and therefore also leaves the standalone package's generated preview.png unchanged), so the primary visual documentation still shows the old panel. Redraw the board and regenerate the standalone package with the repository script.
AGENTS.md reference: herdr/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
|
Thanks @eirikc, this is in good shape. The Sync path ( Could you fix two things before we merge? Each with a test:
We'll take the rest in a follow-up after merge:
So no need to change those here. |
…ed files Review of runkids#961 found two gaps. While extras were read again, or after `extras list` failed, a missing-source extra turned "unknown" and was shown neither under Need a look nor under Sync status unconfirmed. It now waits under Sync status unconfirmed, like other rows whose read is pending. A folder extra's preview listed its files with the skill reader, which skips only the top-level .git. Extras sync skips every .git folder and every .metadata.json (DiscoverExtraFiles), and .metadata.json sorted first, so it could open as the default document. The preview now lists the folder as extras sync sees it. Refs runkids#930
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Thanks! Both fixed in 9d17705, each with a test: |
…972) Follow-ups from the review of #961, which added extras to the panel. Memory notes were counted twice. `extras memory init` saves a `memory` extra, so `extras list` returns the memory folder as an extra while `extras memory list` returns each note in it. The Extras count and Overview's resource total counted both. Notes now have no sync state of their own: they are listed under MEMORY NOTES in the Extras tab, apart from the sync groups, and are not counted, as in the dashboard, which lists the memory extra among extras and its notes on a page of their own. For the same reason a pending or failed memory read no longer marks notes "sync status unknown" or holds the Extras count at "…". An extra's target was matched in any case, so on a case-sensitive POSIX machine an extra in ~/.claude/rules was named after a target in ~/.Claude/skills. Case is now folded only when the scope's project folder or target paths are Windows paths. One extra waiting on two folders of one target, such as ~/.claude/rules and ~/.claude/commands, added two to that target's count while Overview said one resource waits. It now counts once per target. A folder extra's preview stopped at 40 files without saying so. It now reads one name past the 40 shown and says when the list goes on; a SKILL.md past the cut is still shown first. The README and recipe intros now name extras with the other kinds, and the Library line in learn/with-herdr.md and its four translations describes the notes section. zh-Hans now says the source, not a source file, is missing, since a folder extra's source is a folder. Refs #930
The 0.30.13 entry thanked them only for the request, but they wrote #961.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel) — not labelled, but you invited a PR.Linked Issue
Closes #930
Change
Shows extras and memory notes in the Herdr panel, read from
extras list --jsonandextras memory list --json. Read-only.targetOf; project paths are resolved against the project folder.learn/with-herdr.mdand translations); standalone package regenerated.Not covered
panels.pngisn't redrawn.drift) and a hand-edited prepend/append block (modified) under Needs sync, though Sync won't fix them.Checks run
make checkin the devcontainer (WSL): passes.herdr-app checkon both mod folders: passes.Checklist
make check) — for code changes