Skip to content

feat(herdr): show extras and memory notes in the panel - #961

Merged
runkids merged 3 commits into
runkids:mainfrom
eirikc:feat/herdr-extras
Nov 20, 2026
Merged

runkids merged 3 commits into
runkids:mainfrom
eirikc:feat/herdr-extras

Conversation

@eirikc

@eirikc eirikc commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)
  • Approved feature or large change (the linked issue has the approved label) — 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 --json and extras memory list --json. Read-only.

  • Overview: an Extras count; an extra waiting for a sync is listed and counts on its target's map line.
  • Library: an Extras tab; a preview shows the file or folder and its targets.
  • Target names follow the dashboard's targetOf; project paths are resolved against the project folder.
  • A missing source goes under Need a look, since sync can't fix it. That Overview heading is now "NEED A LOOK" instead of "HOOKS NEED A LOOK".
  • Docs updated (README, RECIPEs, wiki, learn/with-herdr.md and translations); standalone package regenerated.

Not covered

  • panels.png isn't redrawn.
  • Like the dashboard, the panel lists a locally edited target (drift) and a hand-edited prepend/append block (modified) under Needs sync, though Sync won't fix them.
  • The ja, ko and zh text are AI-translations. Needs a check.

Checks run

  • make check in the devcontainer (WSL): passes.
  • herdr-app check on both mod folders: passes.
  • Tried in Herdr on Windows 11.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section
  • I've reviewed every line of the diff and can explain it
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T12:27:47.949213Z 9d17705 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 !== ".");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +447 to 450
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";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@runkids

runkids commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks @eirikc, this is in good shape. The Sync path (sync --all covers extras), the generated package and the translations all check out.

Could you fix two things before we merge? Each with a test:

  1. A missing-source extra drops out of Overview while extras are read again, or when extras list fails (Codex thread on model.js). During the refresh its state becomes unknown with cachedState: "broken". The "Sync status unconfirmed" group takes only sync, missing and update, and needsLook takes only a current broken, so the row shows in neither. Keep it visible in one of them.
  2. A folder extra's preview lists files that extras sync skips (Codex thread on loader.js). READ_SKILL leaves out only the root ./.git, so .metadata.json and nested .git/ folders show up. An extra can point at an installed skill's folder, which is why DiscoverExtraFiles in internal/sync/extras.go skips that file (157eddc). .metadata.json also sorts first, so in a folder without a SKILL.md it becomes the default document. Please match DiscoverExtraFiles's exclusions.

We'll take the rest in a follow-up after merge:

  • case folding in owner()
  • redrawing panels.png
  • the memory extra listed beside its own notes
  • notes reading "sync status unknown" during a refresh
  • a hint when a folder preview stops at 40 files
  • the README and RECIPE intros
  • a check of the ja, ko and zh text

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
@runkids

runkids commented Nov 20, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 9d17705ad8

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@eirikc

eirikc commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @eirikc, this is in good shape. The Sync path (sync --all covers extras), the generated package and the translations all check out.

Could you fix two things before we merge? Each with a test:

  1. A missing-source extra drops out of Overview while extras are read again, or when extras list fails (Codex thread on model.js). During the refresh its state becomes unknown with cachedState: "broken". The "Sync status unconfirmed" group takes only sync, missing and update, and needsLook takes only a current broken, so the row shows in neither. Keep it visible in one of them.
  2. A folder extra's preview lists files that extras sync skips (Codex thread on loader.js). READ_SKILL leaves out only the root ./.git, so .metadata.json and nested .git/ folders show up. An extra can point at an installed skill's folder, which is why DiscoverExtraFiles in internal/sync/extras.go skips that file (157eddc). .metadata.json also sorts first, so in a folder without a SKILL.md it becomes the default document. Please match DiscoverExtraFiles's exclusions.

We'll take the rest in a follow-up after merge:

  • case folding in owner()
  • redrawing panels.png
  • the memory extra listed beside its own notes
  • notes reading "sync status unknown" during a refresh
  • a hint when a folder preview stops at 40 files
  • the README and RECIPE intros
  • a check of the ja, ko and zh text

So no need to change those here.

Thanks! Both fixed in 9d17705, each with a test:
A missing-source extra now stays under "Sync status unconfirmed" while extras are read again or after extras list fails.
Folder previews now list files the way DiscoverExtraFiles does, skipping every .git folder and .metadata.json.
make check passes in the devcontainer.

@runkids
runkids merged commit cbc3614 into runkids:main Nov 20, 2026
10 checks passed
runkids added a commit that referenced this pull request Nov 20, 2026
…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
runkids added a commit that referenced this pull request Nov 21, 2026
The 0.30.13 entry thanked them only for the request, but they wrote #961.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

herdr panel: show extras (files, folders, memory notes)

2 participants