The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 09:00 UTC
fix(web): expose error disclosure state (#10125)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Alex Southwell committed
Sep 6, 2026 at 17:11 UTC
127efae4401cf2cc0fcd7ec7c5b2e2c037fe4151
1 file changed
+5
-1
apps/web/src/components/settings/ExpandableText.tsx
+5
-1
@@ -1,4 +1,4 @@
1
-import { useState } from "react";
1
+import { useId, useState } from "react";
2
3
import { cn } from "../../lib/utils";
4
@@ -17,12 +17,14 @@ export function ExpandableText({
17
collapsedClassName?: string;
18
expandLabel?: string;
19
}) {
20
+ const textId = useId();
21
const [expanded, setExpanded] = useState(false);
22
const canExpand = text.length > 180 || text.includes("\n");
23
24
return (
25
<div className={cn("min-w-0", className)}>
26
<div
27
+ id={textId}
28
className={cn(
29
"whitespace-pre-wrap break-words",
30
!expanded && canExpand ? collapsedClassName : null,
@@ -33,6 +35,8 @@ export function ExpandableText({
35
{canExpand ? (
36
<button
37
type="button"
38
+ aria-expanded={expanded}
39
+ aria-controls={textId}
40
className="cursor-pointer mt-1 text-[11px] font-medium text-foreground/70 underline-offset-2 hover:text-foreground hover:underline"
41
onClick={() => setExpanded((value) => !value)}
42
>