Repository navigation
Commit b570318
feat(catalog): resolve publisher display name in catalog detail pane
The `PersonaCatalogDetail` component hardcoded the label passed to
`PersonaAddedBy` as "Community member" for any non-own catalog entry.
The publisher's pubkey is already available as
`catalogSource.ownerPubkey` (set from the kind:30175 event's pubkey).
Use `useUsersBatchQuery` to resolve the pubkey to a kind:0 display
name. Label precedence: own entry → "You"; resolved profile →
`displayName` then `name`; loading or unresolvable → "Community
member" (unchanged fallback).
The batch query is disabled when the entry is not a community entry, so
there is no extra network call for own entries or built-in agents.
E2e: update the existing assertion that was checking for the hardcoded
fallback, add a new test that verifies "Community member" still renders
when the publisher pubkey is not in the mock profile registry.
Co-authored-by: Will Pfleger <[email protected]>
Signed-off-by: Will Pfleger <[email protected]>1 parent ab55fee commit b570318
2 files changed
Lines changed: 56 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
280 | 300 | | |
281 | 301 | | |
282 | 302 | | |
| |||
290 | 310 | | |
291 | 311 | | |
292 | 312 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 313 | + | |
301 | 314 | | |
302 | 315 | | |
303 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
| 1677 | + | |
| 1678 | + | |
1677 | 1679 | | |
1678 | | - | |
| 1680 | + | |
1679 | 1681 | | |
1680 | 1682 | | |
1681 | 1683 | | |
| |||
1728 | 1730 | | |
1729 | 1731 | | |
1730 | 1732 | | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1731 | 1765 | | |
1732 | 1766 | | |
1733 | 1767 | | |
| |||
0 commit comments