[lenny] fix(desktop): show authored persona description on agent cards - #33
[lenny] fix(desktop): show authored persona description on agent cards#33mfethe1 wants to merge 1 commit into
Conversation
The agents library card rendered the persona display name (or nothing) as its second line, so an owner-authored description never appeared - the built-in persona edit round-trip saved the description but the card kept showing the model label. Upstream block#7126 renamed AgentIdentityCard's modelLabel to subtitle with the contract 'the effective description when one resolves, otherwise the model label - callers compose the fallback'. The fork's split-card work landed its own personaLabel subtitle and never composed that fallback, so the two changes were individually correct but semantically conflicting after the merge. Compose the documented fallback: effectiveAgentDescription(persona) then the persona label, keeping the Hermes profile suffix so machine-homed agents still show their runtime.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI attribution: all remaining red is pre-existing on trunkThis PR changes one file ( Reproduction method
Failures proven pre-existing (no changes applied)
Unit suite: 3 of 6584 fail ( What this PR actually fixes
Green on this branch
None of the listed failures touch persona rendering, agent cards, or this file. |
CI attribution: the
|
| PR | touches UnifiedAgentsSection.tsx |
shard 1 | shard 2 | failing test on shard 2 |
|---|---|---|---|---|
| #33 (this) | yes | ✅ SUCCESS | ❌ | an older agent message stays exact… |
| #29 | no | ❌ | ❌ | an older agent message stays exact… |
| #31 | no | ❌ | ❌ | an older agent message stays exact… |
| #32 | no | ❌ | ❌ | an older agent message stays exact… |
Sibling PRs fail both shards (#29 and #32 additionally fail built-in persona edits persist). This PR is the only one of the four whose shard 1 passes — so on this check it is strictly healthier than the comparison set, not worse.
Why the diff cannot be the cause:
- The change is null-safe:
effectiveAgentDescription(persona) ?? subtitle— the helper returnsstring | nulland the previous value is used as the fallback. It cannot throw and cannot prevent the row from rendering. - The failing locator is
persona-agent-row-${card.key}(line 196), which this diff does not touch — verified withgit show 865a695f21 | grep persona-agent-row→ no matches. - The imported module
@/features/agents/lib/agentDescriptionexists and exportseffectiveAgentDescription; a bad import would have failed the build, andDesktop Build (macOS)is ✅.
Conclusion: the failure is a pre-existing/flaky condition in the shard-2 integration environment affecting all open PRs on this base, not a regression introduced here. Requesting review on that basis; I am not merging on a red gate.
|
Superseded by #36, which lands the same Both PRs add the identical import and touch the same A split card passes its rival name as No work is lost — the behaviour you documented for canonical cards ships in #36. |
Problem
The agents library card never showed an owner-authored persona description. Editing a
persona's description saved correctly (the
list_personasround-trip keeps it), but thecard's second line kept showing
Default model (...), so the feature was invisible in theone place it was designed for.
This is why
built-in persona edits persist(desktop/tests/e2e/agents.spec.ts:297) hasbeen failing on every PR in this fork, including PRs that touch no application code at
all. It is trunk breakage, not a defect in any individual PR.
Root cause — a semantic merge conflict
Upstream block#7126 ("add public descriptions to agent personas") renamed
AgentIdentityCard'smodelLabelprop tosubtitle, documenting the contract as:Our fork's split-card work (
3acf014ab3, "give a split persona card a name and a stableidentity") independently started passing
personaLabelas that samesubtitle, andcomposes it into
runtimeSubtitlealongside the Hermes profile.Both changes are individually correct. Merged, the fork's caller never composes the
description, so the upstream contract is silently unmet — a textual clean merge with a
behavioral conflict.
Fix
Compose the documented fallback in
AgentPersonaCard: authored description first, then thepersona label a split card carries. The
Hermes · <profile>suffix is preserved either way,so a machine-homed agent still shows which runtime it lives on.
Verification
Run locally on this branch:
built-in persona edits persist(integration) — 1 passed (was: failed 3/3 attempts,Expected substring: "Helps teams ship reliably." / Received: "MFStartMy FizzDefault model (claude-opus-4-5)")unifiedAgentGroups.test.mjs— 20/20 passpnpm run check(typecheck + biome + repo guards, all workspaces) — EXIT=0pnpm run test(desktop unit) — 6584 tests, 6581 pass. The 3 failures(
useKnownAgentPubkeys,ChannelTaskList,relaySyncRequiredPolicy) are pre-existing:verified by stashing this diff and re-running them, where they fail identically.
dist/(
webServer: python3 -m http.server 4173 -d dist) and does not rebuild. Runpnpm run build:e2ebefore the e2e suite or you will test stale JS — this initially made aworking fix look like a failing one.
Out of scope
narrow thread view collapses channel header actions into a menu(
messaging.spec.ts:3142) also fails at trunk and is not addressed here. It assertsmenuGap <= headerPaddingInlineEnd + menuBox.width(58 vs 52) against a header that renderscorrectly in the failure screenshot — an over-tight geometric assertion in a separate
concern. Filed separately rather than mixed into this fix.