GeezerVison is showing github.com — fix(web,mobile): queued messages no longer say "From queue" once sent… · pingdotgg/t3code@5cda25e
File treeExpand file treeCollapse file tree Open diff view settings mobile/src/features/threads
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/ThreadFeed.tsx +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1302,9 +1302,7 @@ function renderFeedEntry( | 1302 | 1302 | accessibilityLabel={intentBadge.accessibilityLabel} | 1303 | 1303 | className="flex-row items-center gap-1" | 1304 | 1304 | > | 1305 | | - {intentBadge.icon ? ( | 1306 | | - <SymbolView name={intentBadge.icon} size={12} tintColor={iconSubtleColor} /> | 1307 | | - ) : null} | | 1305 | + <SymbolView name="arrow.uturn.forward" size={12} tintColor={iconSubtleColor} /> | 1308 | 1306 | <Text className="font-t3-medium text-xs text-foreground-secondary"> | 1309 | 1307 | {intentBadge.label} | 1310 | 1308 | </Text> | |
Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/userMessageIntentBadge.test.ts +2-11Lines changed: 2 additions & 11 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,32 +3,23 @@ import { describe, expect, it } from "@effect/vitest"; | 3 | 3 | import { resolveUserMessageIntentBadge } from "./userMessageIntentBadge"; | 4 | 4 |
| 5 | 5 | describe("user message intent badge", () => { | 6 | | - it("does not label ordinary turn-start messages", () => { | | 6 | + it("does not label turn-start or queued messages", () => { | 7 | 7 | expect(resolveUserMessageIntentBadge(undefined)).toBeNull(); | 8 | 8 | expect(resolveUserMessageIntentBadge("turn_start")).toBeNull(); | 9 | | - }); | 10 | | - | 11 | | - it("explains the queued history without claiming delivery", () => { | 12 | | - expect(resolveUserMessageIntentBadge("queued_turn")).toEqual({ | 13 | | - label: "From queue", | 14 | | - accessibilityLabel: "Queued while the agent was busy", | 15 | | - icon: null, | 16 | | - }); | | 9 | + expect(resolveUserMessageIntentBadge("queued_turn")).toBeNull(); | 17 | 10 | }); | 18 | 11 |
| 19 | 12 | it("explains the intent to steer without claiming delivery", () => { | 20 | 13 | expect(resolveUserMessageIntentBadge("steer")).toEqual({ | 21 | 14 | label: "Steer", | 22 | 15 | accessibilityLabel: "Steered the active turn", | 23 | | - icon: "arrow.uturn.forward", | 24 | 16 | }); | 25 | 17 | }); | 26 | 18 |
| 27 | 19 | it("preserves the queued origin after promotion to steer", () => { | 28 | 20 | expect(resolveUserMessageIntentBadge("promoted_queued_to_steer")).toEqual({ | 29 | 21 | label: "Steer", | 30 | 22 | accessibilityLabel: "Originally queued, then promoted to steer the active turn", | 31 | | - icon: "arrow.uturn.forward", | 32 | 23 | }); | 33 | 24 | }); | 34 | 25 | }); |
Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/userMessageIntentBadge.ts +1-11Lines changed: 1 addition & 11 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import type { OrchestrationV2UserMessageInputIntent } from "@t3tools/contracts"; | 2 | 2 |
| 3 | | -import type { AppSymbolName } from "../../components/ui/AppSymbol"; | 4 | | - | 5 | 3 | export interface UserMessageIntentBadgePresentation { | 6 | 4 | readonly label: string; | 7 | 5 | readonly accessibilityLabel: string; | 8 | | - readonly icon: AppSymbolName | null; | 9 | 6 | } | 10 | 7 |
| 11 | 8 | export function resolveUserMessageIntentBadge( | 12 | 9 | intent: OrchestrationV2UserMessageInputIntent | undefined, | 13 | 10 | ): UserMessageIntentBadgePresentation | null { | 14 | 11 | switch (intent) { | 15 | | - case "queued_turn": | 16 | | - return { | 17 | | - label: "From queue", | 18 | | - accessibilityLabel: "Queued while the agent was busy", | 19 | | - icon: null, | 20 | | - }; | 21 | 12 | case "steer": | 22 | 13 | return { | 23 | 14 | label: "Steer", | 24 | 15 | accessibilityLabel: "Steered the active turn", | 25 | | - icon: "arrow.uturn.forward", | 26 | 16 | }; | 27 | 17 | case "promoted_queued_to_steer": | 28 | 18 | return { | 29 | 19 | label: "Steer", | 30 | 20 | accessibilityLabel: "Originally queued, then promoted to steer the active turn", | 31 | | - icon: "arrow.uturn.forward", | 32 | 21 | }; | | 22 | + case "queued_turn": | 33 | 23 | case "turn_start": | 34 | 24 | case undefined: | 35 | 25 | return null; | |
Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/chat/MessagesTimeline.tsx +8-25Lines changed: 8 additions & 25 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2276,7 +2276,8 @@ function UserTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "message" | 2276 | 2276 | )} | 2277 | 2277 | </p> | 2278 | 2278 | ) : null} | 2279 | | - {row.message.inputIntent && row.message.inputIntent !== "turn_start" ? ( | | 2279 | + {row.message.inputIntent === "steer" || | | 2280 | + row.message.inputIntent === "promoted_queued_to_steer" ? ( | 2280 | 2281 | <UserMessageIntentMarker intent={row.message.inputIntent} /> | 2281 | 2282 | ) : null} | 2282 | 2283 | <div className="relative max-w-[80%] rounded-2xl bg-message p-3 text-message-foreground"> | @@ -2447,24 +2448,8 @@ function UserTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "message" | 2447 | 2448 | function UserMessageIntentMarker({ | 2448 | 2449 | intent, | 2449 | 2450 | }: { | 2450 | | - readonly intent: NonNullable<ChatMessage["inputIntent"]>; | | 2451 | + readonly intent: "steer" | "promoted_queued_to_steer"; | 2451 | 2452 | }) { | 2452 | | - const presentation = | 2453 | | - intent === "queued_turn" | 2454 | | - ? { | 2455 | | - label: "From queue", | 2456 | | - icon: null, | 2457 | | - } | 2458 | | - : intent === "promoted_queued_to_steer" | 2459 | | - ? { | 2460 | | - label: "Steer", | 2461 | | - icon: Redo2Icon, | 2462 | | - } | 2463 | | - : { | 2464 | | - label: "Steer", | 2465 | | - icon: Redo2Icon, | 2466 | | - }; | 2467 | | - const IntentIcon = presentation.icon; | 2468 | 2453 | return ( | 2469 | 2454 | <Tooltip> | 2470 | 2455 | <TooltipTrigger | @@ -2475,15 +2460,13 @@ function UserMessageIntentMarker({ | 2475 | 2460 | /> | 2476 | 2461 | } | 2477 | 2462 | > | 2478 | | - {IntentIcon ? <IntentIcon aria-hidden="true" className="size-3" /> : null} | 2479 | | - {presentation.label} | | 2463 | + <Redo2Icon aria-hidden="true" className="size-3" /> | | 2464 | + Steer | 2480 | 2465 | </TooltipTrigger> | 2481 | 2466 | <TooltipPopup side="top"> | 2482 | | - {intent === "queued_turn" | 2483 | | - ? "Queued while the agent was busy" | 2484 | | - : intent === "promoted_queued_to_steer" | 2485 | | - ? "Originally queued, then promoted to steer the active turn" | 2486 | | - : "Steered the active turn"} | | 2467 | + {intent === "promoted_queued_to_steer" | | 2468 | + ? "Originally queued, then promoted to steer the active turn" | | 2469 | + : "Steered the active turn"} | 2487 | 2470 | </TooltipPopup> | 2488 | 2471 | </Tooltip> | 2489 | 2472 | ); | |
|