Skip to content

Commit a1e977c

Browse files
tlongwell-blocknpub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dTyler Longwell
authored
fix(ui): relabel agent owner attribution from "owned by" to "managed by" (#2133)
Signed-off-by: Tyler Longwell <[email protected]> Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <[email protected]>
1 parent 3881bff commit a1e977c

12 files changed

Lines changed: 33 additions & 31 deletions

File tree

‎desktop/src/features/channels/ui/MembersSidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ function AddMemberSearchResultRow({
895895
</div>
896896
{ownerLabel ? (
897897
<span className="block truncate text-xs text-muted-foreground">
898-
owned by {ownerLabel}
898+
managed by {ownerLabel}
899899
</span>
900900
) : null}
901901
</div>

‎desktop/src/features/messages/ui/MentionAutocomplete.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ export const MentionAutocomplete = React.memo(function MentionAutocomplete({
184184
className="min-w-0 truncate"
185185
title={
186186
suggestion.ownerLabel && suggestion.notInChannel
187-
? `owned by ${suggestion.ownerLabel} · not in channel`
187+
? `managed by ${suggestion.ownerLabel} · not in channel`
188188
: suggestion.ownerLabel
189-
? `owned by ${suggestion.ownerLabel}`
189+
? `managed by ${suggestion.ownerLabel}`
190190
: "not in channel"
191191
}
192192
>
193193
{suggestion.ownerLabel && suggestion.notInChannel
194-
? `owned by ${suggestion.ownerLabel} · not in channel`
194+
? `managed by ${suggestion.ownerLabel} · not in channel`
195195
: suggestion.ownerLabel
196-
? `owned by ${suggestion.ownerLabel}`
196+
? `managed by ${suggestion.ownerLabel}`
197197
: "not in channel"}
198198
</span>
199199
) : null}

‎desktop/src/features/messages/ui/MessageAgentOwner.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function MessageAgentOwner({
1515
data-testid="message-agent-owner"
1616
>
1717
<span className="sr-only">
18-
{ownerLabel ? "Agent owned by" : "Agent; owner unavailable"}
18+
{ownerLabel ? "Agent managed by" : "Agent; owner unavailable"}
1919
</span>
2020
{ownerPubkey && ownerLabel ? (
2121
<>
@@ -24,7 +24,7 @@ export function MessageAgentOwner({
2424
className="inline-flex shrink-0 items-baseline gap-1 leading-4"
2525
>
2626
<Bot className="relative -top-px h-3.5 w-3.5 self-center" />
27-
<span>owned by</span>
27+
<span>managed by</span>
2828
</span>
2929
<UserProfilePopover
3030
pubkey={ownerPubkey}

‎desktop/src/features/messages/ui/NewMessageResultRow.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function NewMessageResultRow({
135135
</div>
136136
{ownerLabel ? (
137137
<span className="block truncate text-xs text-muted-foreground">
138-
owned by {ownerLabel}
138+
managed by {ownerLabel}
139139
</span>
140140
) : null}
141141
</div>

‎desktop/src/features/profile/ui/UserProfilePanelFields.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export type ProfileField = {
4747

4848
const AGENT_INFO_LABELS = new Set([
4949
"Public key",
50-
"Owned by",
50+
"Managed by",
5151
"NIP-05",
5252
"Agent type",
5353
"Capabilities",
@@ -277,12 +277,12 @@ export function buildOwnerFields({
277277
</span>
278278
),
279279
icon: UserRound,
280-
label: "Owned by",
280+
label: "Managed by",
281281
onClick:
282282
ownerClickable && ownerProfilePubkey
283283
? () => onOpenProfile?.(ownerProfilePubkey)
284284
: undefined,
285-
testId: "user-profile-owned-by",
285+
testId: "user-profile-managed-by",
286286
});
287287
}
288288

@@ -407,25 +407,25 @@ export function buildOwnerFields({
407407
function orderProfileFields(fields: ProfileField[]) {
408408
const visibilityLabel = "Visibility";
409409
const publicKeyLabel = "Public key";
410-
const ownedByLabel = "Owned by";
410+
const managedByLabel = "Managed by";
411411
const statusLabel = "Status";
412412
return [
413413
...fields.filter((field) => field.label === visibilityLabel),
414414
...fields.filter((field) => field.label === publicKeyLabel),
415-
...fields.filter((field) => field.label === ownedByLabel),
415+
...fields.filter((field) => field.label === managedByLabel),
416416
...fields.filter(
417417
(field) =>
418418
field.label !== visibilityLabel &&
419419
field.label !== publicKeyLabel &&
420-
field.label !== ownedByLabel &&
420+
field.label !== managedByLabel &&
421421
field.copyValue,
422422
),
423423
...fields.filter((field) => field.label === statusLabel),
424424
...fields.filter((field) => {
425425
if (
426426
field.label === visibilityLabel ||
427427
field.label === publicKeyLabel ||
428-
field.label === ownedByLabel ||
428+
field.label === managedByLabel ||
429429
field.label === statusLabel
430430
) {
431431
return false;

‎desktop/src/features/profile/ui/UserProfilePopover.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ export function UserProfilePopover({
534534
className="mt-0.5 truncate text-xs leading-4 text-muted-foreground"
535535
data-testid={`user-profile-popover-owner-${pubkey}`}
536536
>
537-
owned by {ownerLabel}
537+
managed by {ownerLabel}
538538
</p>
539539
) : null}
540540
{profileSubheader ? (

‎desktop/tests/e2e/mentions.spec.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ test("thread autocomplete keeps multiple long names readable in a narrow panel",
300300
row.getByTestId("mention-suggestion-avatar-fallback"),
301301
).toBeVisible();
302302
await expect(row.getByText("agent")).toBeVisible();
303-
await expect(row.getByText("owned by you")).toBeVisible();
303+
await expect(row.getByText("managed by you")).toBeVisible();
304304

305305
await expect(row.getByText(name)).not.toHaveCSS(
306306
"text-overflow",
@@ -1738,7 +1738,7 @@ test("agent profile popover shows its owner", async ({ page }) => {
17381738
profilePopover.getByTestId(
17391739
`user-profile-popover-owner-${OWNED_AGENT_PROFILE_PUBKEY}`,
17401740
),
1741-
).toHaveText("owned by bob");
1741+
).toHaveText("managed by bob");
17421742
});
17431743

17441744
test("agent profile popover labels an agent owned by the viewer as you", async ({
@@ -1778,7 +1778,7 @@ test("agent profile popover labels an agent owned by the viewer as you", async (
17781778
profilePopover.getByTestId(
17791779
`user-profile-popover-owner-${OWNED_AGENT_PROFILE_PUBKEY}`,
17801780
),
1781-
).toHaveText("owned by you");
1781+
).toHaveText("managed by you");
17821782
});
17831783

17841784
test("agent profile popover falls back to the owner's pubkey", async ({
@@ -1818,7 +1818,7 @@ test("agent profile popover falls back to the owner's pubkey", async ({
18181818
profilePopover.getByTestId(
18191819
`user-profile-popover-owner-${OWNED_AGENT_PROFILE_PUBKEY}`,
18201820
),
1821-
).toHaveText("owned by 11111111…1111");
1821+
).toHaveText("managed by 11111111…1111");
18221822
});
18231823

18241824
test("human profile popover does not show an owner", async ({ page }) => {

‎desktop/tests/e2e/messaging.spec.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,20 @@ test("agent owner label identifies the agent and owner", async ({ page }) => {
123123

124124
await expect(ownerTreatment.locator("svg")).toBeVisible();
125125
await expect(
126-
ownerTreatment.getByText("owned by", { exact: true }),
126+
ownerTreatment.getByText("managed by", { exact: true }),
127127
).toBeVisible();
128128
await expect(ownerTreatment.locator(".font-semibold")).toHaveText("bob");
129129
await expect(ownerTreatment.getByRole("button")).toHaveAccessibleName("bob");
130-
await expect(ownerTreatment.locator(".sr-only")).toHaveText("Agent owned by");
130+
await expect(ownerTreatment.locator(".sr-only")).toHaveText(
131+
"Agent managed by",
132+
);
131133

132134
const joinedRow = page
133135
.getByTestId("system-message-row")
134136
.filter({ hasText: "alice" })
135137
.filter({ hasText: "joined the channel" });
136138
await expect(joinedRow.getByTestId("message-agent-owner")).toContainText(
137-
"owned bybob",
139+
"managed bybob",
138140
);
139141
});
140142

‎desktop/tests/e2e/pubkey-display-screenshots.spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ test("new-DM agent name swaps to its public key on name hover", async ({
9191

9292
const agentName = agentResult.getByTestId(`new-dm-name-${AGENT_PUBKEY}`);
9393
const agentNpub = agentResult.getByTestId(`new-dm-npub-${AGENT_PUBKEY}`);
94-
await expect(agentResult).toContainText("owned by you");
94+
await expect(agentResult).toContainText("managed by you");
9595
await expect(agentName).toContainText("Pinky");
9696
await expect(agentNpub).toHaveCSS("opacity", "0");
9797

@@ -127,7 +127,7 @@ test("new-DM agent name swaps to its public key on name hover", async ({
127127
await expect(
128128
settledAgentName.getByText("Pinky", { exact: true }),
129129
).not.toHaveCSS("opacity", "1");
130-
await expect(settledAgentResult).toContainText("owned by you");
130+
await expect(settledAgentResult).toContainText("managed by you");
131131
await waitForAnimations(page);
132132
await page.getByTestId("new-message-page").screenshot({
133133
path: `${SHOTS}/new-dm-agent-name-hover.png`,

‎mobile/lib/features/channels/compose_bar.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class ComposeBar extends HookConsumerWidget {
135135
false;
136136

137137
// Preload profiles for channel members, mentionable agents, and their
138-
// owners so @mention suggestions show names ("owned by …" included).
138+
// owners so @mention suggestions show names ("managed by …" included).
139139
final relayAgents = ref.watch(agentDirectoryProvider).asData?.value;
140140
final agentOwners = ref.watch(agentOwnersProvider).asData?.value;
141141
useEffect(
@@ -240,7 +240,7 @@ class ComposeBar extends HookConsumerWidget {
240240
.take(_mentionSuggestionLimit)
241241
.toList();
242242

243-
// Resolve owner names for the visible "owned by …" subtitles.
243+
// Resolve owner names for the visible "managed by …" subtitles.
244244
useEffect(() {
245245
final ownerPubkeys = [for (final s in suggestions) ?s.ownerPubkey];
246246
if (ownerPubkeys.isNotEmpty) {

0 commit comments

Comments
 (0)