fix(web,mobile): sent queued messages say "from queue", not "queued" (#19849)
Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: Rodrigo Brechard <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
4 files changed
+26
-12
No files matched your search
@@ -1313,10 +1313,12 @@ function renderFeedEntry(
|
||||
</View>
|
||||
<View className="mt-1 flex-row items-center justify-end gap-1 pr-0.5">
|
||||
{intentBadge ? (
|
||||
<View
|
||||
accessible
|
||||
accessibilityRole="text"
|
||||
<Pressable
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={intentBadge.accessibilityLabel}
|
||||
accessibilityHint="Explains this message's badge"
|
||||
hitSlop={8}
|
||||
onPress={() => Alert.alert("Message history", intentBadge.explanation)}
|
||||
className={cn(
|
||||
"rounded-full border px-1.5 py-0.5",
|
||||
intentBadge.tone === "queued"
|
||||
@@ -1334,7 +1336,7 @@ function renderFeedEntry(
|
||||
>
|
||||
{intentBadge.label}
|
||||
</Text>
|
||||
</View>
|
||||
</Pressable>
|
||||
) : null}
|
||||
<Text className="font-t3-medium text-xs tabular-nums text-foreground-secondary">
|
||||
{entry.pendingMessage && !entry.acknowledged ? "Pending" : timestampLabel}
|
||||
|
||||
@@ -8,18 +8,21 @@ describe("user message intent badge", () => {
|
||||
expect(resolveUserMessageIntentBadge("turn_start")).toBeNull();
|
||||
});
|
||||
|
||||
it("labels messages waiting behind the active turn", () => {
|
||||
it("explains the queued history without claiming delivery", () => {
|
||||
expect(resolveUserMessageIntentBadge("queued_turn")).toEqual({
|
||||
label: "queued",
|
||||
accessibilityLabel: "Queued behind the active turn",
|
||||
label: "from queue",
|
||||
accessibilityLabel: "Queued while the agent was busy",
|
||||
explanation:
|
||||
"This badge records that the message was queued. It stays visible after the message leaves the queue.",
|
||||
tone: "queued",
|
||||
});
|
||||
});
|
||||
|
||||
it("labels messages that steer the active turn", () => {
|
||||
it("explains the intent to steer without claiming delivery", () => {
|
||||
expect(resolveUserMessageIntentBadge("steer")).toEqual({
|
||||
label: "steer",
|
||||
accessibilityLabel: "Steered the active turn",
|
||||
explanation: "This message was intended to steer the agent while its turn was still running.",
|
||||
tone: "steer",
|
||||
});
|
||||
});
|
||||
@@ -28,6 +31,8 @@ describe("user message intent badge", () => {
|
||||
expect(resolveUserMessageIntentBadge("promoted_queued_to_steer")).toEqual({
|
||||
label: "queued → steer",
|
||||
accessibilityLabel: "Originally queued, then promoted to steer the active turn",
|
||||
explanation:
|
||||
"This message was originally queued, then promoted to steer the agent while its turn was still running.",
|
||||
tone: "steer",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { OrchestrationV2UserMessageInputIntent } from "@t3tools/contracts";
|
||||
export interface UserMessageIntentBadgePresentation {
|
||||
readonly label: string;
|
||||
readonly accessibilityLabel: string;
|
||||
readonly explanation: string;
|
||||
readonly tone: "queued" | "steer";
|
||||
}
|
||||
|
||||
@@ -12,20 +13,26 @@ export function resolveUserMessageIntentBadge(
|
||||
switch (intent) {
|
||||
case "queued_turn":
|
||||
return {
|
||||
label: "queued",
|
||||
accessibilityLabel: "Queued behind the active turn",
|
||||
label: "from queue",
|
||||
accessibilityLabel: "Queued while the agent was busy",
|
||||
explanation:
|
||||
"This badge records that the message was queued. It stays visible after the message leaves the queue.",
|
||||
tone: "queued",
|
||||
};
|
||||
case "steer":
|
||||
return {
|
||||
label: "steer",
|
||||
accessibilityLabel: "Steered the active turn",
|
||||
explanation:
|
||||
"This message was intended to steer the agent while its turn was still running.",
|
||||
tone: "steer",
|
||||
};
|
||||
case "promoted_queued_to_steer":
|
||||
return {
|
||||
label: "queued → steer",
|
||||
accessibilityLabel: "Originally queued, then promoted to steer the active turn",
|
||||
explanation:
|
||||
"This message was originally queued, then promoted to steer the agent while its turn was still running.",
|
||||
tone: "steer",
|
||||
};
|
||||
case "turn_start":
|
||||
|
||||
@@ -2654,7 +2654,7 @@ function UserMessageIntentMarker({
|
||||
const presentation =
|
||||
intent === "queued_turn"
|
||||
? {
|
||||
label: "Queued",
|
||||
label: "From queue",
|
||||
icon: null,
|
||||
}
|
||||
: intent === "promoted_queued_to_steer"
|
||||
@@ -2682,7 +2682,7 @@ function UserMessageIntentMarker({
|
||||
</TooltipTrigger>
|
||||
<TooltipPopup side="top">
|
||||
{intent === "queued_turn"
|
||||
? "Queued behind the active turn"
|
||||
? "Queued while the agent was busy"
|
||||
: intent === "promoted_queued_to_steer"
|
||||
? "Originally queued, then promoted to steer the active turn"
|
||||
: "Steered the active turn"}
|
||||
|
||||
Reference in new issue
Block a user