@devries-cameron20 / t3code-1 / commits / 8030067470
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): snooze times read naturally in context menus (#24945)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Antony committed Nov 11, 2026 at 08:06 UTC 8030067470b22e9aee2aa4c2e6cfa80485b9ed9b
6 files changed +30 -3
apps/desktop/src/electron/ElectronMenu.ts
+4 -1
@@ -75,7 +75,10 @@ function normalizeContextMenuItems(source: readonly ContextMenuItem[]): ContextM
75
76 const normalizedItem: ContextMenuItem = {
77 id: sourceItem.id,
78 - label: sourceItem.label,
78 + label:
79 + typeof sourceItem.detail === "string" && sourceItem.detail.length > 0
80 + ? `${sourceItem.label} (${sourceItem.detail})`
81 + : sourceItem.label,
82 destructive: sourceItem.destructive === true,
83 disabled: sourceItem.disabled === true,
84 ...(sourceItem.separatorBefore === true ? { separatorBefore: true } : {}),
apps/web/src/components/Sidebar.tsx
+2 -1
@@ -2346,7 +2346,8 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
2346 children: [
2347 ...snoozePresets.map((preset) => ({
2348 id: `snooze:${preset.id}`,
2349 - label: `${preset.label} (${preset.whenLabel})`,
2349 + label: preset.label,
2350 + detail: preset.whenLabel,
2351 disabled: !canOperateThreads(selectedThreads),
2352 })),
2353 {
apps/web/src/components/threadActionMenu.logic.ts
+2 -1
@@ -155,7 +155,8 @@ export function buildThreadActionMenuItems(
155 children: [
156 ...state.snoozePresets.map((preset) => ({
157 id: `snooze:${preset.id}` as const,
158 - label: `${preset.label} (${preset.whenLabel})`,
158 + label: preset.label,
159 + detail: preset.whenLabel,
160 })),
161 {
162 id: "snooze:custom" as const,
apps/web/src/contextMenuFallback.test.ts
+8
@@ -237,4 +237,12 @@ describe("showContextMenuFallback", () => {
237
238 await expect(selectionPromise).resolves.toBe("rename");
239 });
240 +
241 + it("shows an item's detail beside its label and reads both to screen readers", () => {
242 + void showContextMenuFallback([{ id: "snooze:hour", label: "In 1 hour", detail: "3:00 PM" }]);
243 + const button = findButton("In 1 hour");
244 +
245 + expect(button?.textContent).toBe("In 1 hour3:00 PM");
246 + expect(button?.attributes.get("aria-label")).toBe("In 1 hour, 3:00 PM");
247 + });
248 });
apps/web/src/contextMenuFallback.ts
+11
@@ -477,6 +477,17 @@ export function showContextMenuFallback<T extends string>(
477 label.textContent = item.label;
478 button.appendChild(label);
479
480 + if (item.detail) {
481 + // The comma gives screen readers a pause between label and detail.
482 + button.setAttribute("aria-label", `${item.label}, ${item.detail}`);
483 + const detail = document.createElement("span");
484 + detail.className = "ms-auto shrink-0 ps-4 text-muted-foreground text-xs";
485 + detail.style.cssText =
486 + "margin-inline-start:auto;flex-shrink:0;padding-inline-start:1rem;color:var(--contrast-muted-foreground);font-size:0.75rem;";
487 + detail.textContent = item.detail;
488 + button.appendChild(detail);
489 + }
490 +
491 if (hasChildren) {
492 button.setAttribute("aria-haspopup", "menu");
493 button.setAttribute("aria-expanded", "false");
packages/contracts/src/ipc.ts
+3
@@ -24,6 +24,7 @@ import type {
24 export interface ContextMenuItem<T extends string = string> {
25 id: T;
26 label: string;
27 + detail?: string;
28 destructive?: boolean;
29 disabled?: boolean;
30 header?: boolean;
@@ -40,6 +41,7 @@ export type QuitShortcutHintEvent =
41 export interface ContextMenuItemSchemaType {
42 readonly id: string;
43 readonly label: string;
44 + readonly detail?: string;
45 readonly destructive?: boolean;
46 readonly disabled?: boolean;
47 readonly header?: boolean;
@@ -52,6 +54,7 @@ export interface ContextMenuItemSchemaType {
54 export const ContextMenuItemSchema: Schema.Codec<ContextMenuItemSchemaType> = Schema.Struct({
55 id: Schema.String,
56 label: Schema.String,
57 + detail: Schema.optionalKey(Schema.String),
58 destructive: Schema.optionalKey(Schema.Boolean),
59 disabled: Schema.optionalKey(Schema.Boolean),
60 header: Schema.optionalKey(Schema.Boolean),