fix(composer): make capability origin, status, and triggers legible - #3112
fix(composer): make capability origin, status, and triggers legible#3112benjaminshafii wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
93d9c27 to
c84b0fb
Compare
Validation: real app, isolated Linux sandbox, matched A/BAll nine branches of this series were merged into one integration branch (
Step 4 fails identically on clean Validated frames: A real regression this caught, in this seriesBooting the real app initially failed with:
Static verification on the merged resultHonest gaps
|
Correction to my validation note aboveIn the "Honest gaps" section I wrote that local macOS That diagnosis was wrong. I tested it properly afterwards and disproved it:
So dev Electron currently opens no window on this macOS host regardless of profile, keychain, or worktree. It is pre-existing, unrelated to this series, and I have not root-caused it. The same commits do open a window in a clean Linux sandbox, which is where the validation above was run — so the core-flow evidence in this comment stands unchanged. The shared-profile collision is nonetheless real (two worktrees genuinely cannot both hold the lock, and the loser lingers with an open CDP port and no log line). That is fixed separately in #3124, which adds Flagging it because the original wording would have sent a reviewer chasing the wrong cause. |
Problem
Three defects in how the composer's capability panel (the
Plugicon — "Commands, skills, and MCPs") describes what a member has.Fix 1 — status with no way out
MCP rows rendered
Sign in needed/Offline/Issueas plain non-interactive<div>s. A member saw the problem and had no next step. Actionable rows are now buttons that route to where it can be fixed, reusing the panel's existingonOpenSettingsSectioncallback.Readyrows stay inert — nothing to do.Fix 2 — the origin badge was backwards
Personal skills got a
Localpill; skills that came from the organization got no badge at all — exactly backwards from what a member needs to know. Organization skills now carry a badge naming the marketplace they came from, so origin is legible for both cases without adding a row.Fix 3 —
triggerwas meaningless for organization skillsLocal skills derive
triggerfrom frontmattertrigger:/when:or the first bullet under## When to use. Organization skills derived it from the folder name, so theTriggercard in the detail modal showed noise for precisely the skills an enterprise member consumes.Both paths now share one trigger rule (
@openwork/types/skill-markdown), and theTriggercard hides when no trigger can be derived rather than showing something misleading.Reviewer note on the shared helper
First attempt put a full YAML parser in
packages/typesto share the rule — which would have pulled a parser into the renderer bundle for one string field (apps/apphas noyamldependency today). Caught in review and reworked: the shared helper is now dependency-free, reads onlytrigger/whenscalars, ignores indented keys and block scalars, and yields no trigger rather than a wrong one when it cannot read confidently. The server keeps using its own real YAMLparseFrontmatterand passes the parsed data in.pnpm-lock.yamldiff is empty.Verification
New tests cover the trigger reader (quoted values,
when:, ignored nested keys, unreadable block scalar → undefined,## When to usefallback) and the origin badge for both cases.