Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(clients): show scheduled usage-limit recovery in thread lists #15553

ClosedMatthewFeroz(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/15553/headopened View on GitHub

Showing 5 changed files with 60 additions and 15 deletions (loading 3).

x
0 of 5 viewed, 5 left
34 additions and 9 deletionsapps/mobile/src/features/threads/thread-list-v2-items.tsxModified
View file
@@ -1,3 +1,4 @@
+import { resolveScheduledLimitResume } from "@t3tools/client-runtime/state/limit-recovery";
import type { ThreadRowProviderInstance } from "./thread-provider-instance";
import {
THREAD_LIST_V2_MONO_FONT as MONO_FONT,
@@ -587,7 +588,18 @@
// label as the web sidebar, sourced from the server-side visited watermark
// so checking a thread on any device clears it everywhere.
const isUnread = status === "ready" && threadHasUnseenCompletion(thread);
+ const scheduledResume = status === "limited" ? resolveScheduledLimitResume(thread) : null;
+ const rowAccessibilityLabel = [
+ thread.title,
+ props.hasQueuedMessages ? "messages queued to send" : null,
+ scheduledResume?.description,
+ ]
+ .filter(Boolean)
+ .join(", ");
const statusLabel =
+ (scheduledResume
+ ? { label: scheduledResume.label, className: rowAppearance.tertiaryForegroundClassName }
+ : undefined) ??
STATUS_LABEL_BY_STATUS[status] ??
(isUnread ? { label: "Done", className: "text-adaptive-emerald-700-300" } : undefined);
// The timestamp is precomputed on the list item (same stamps the settled
@@ -952,6 +964,14 @@
type="monochrome"
) : null}