authorgravatar for saphid@gmail.comAlex Southwell <saphid@gmail.com> 2026-09-06 17:11:41+10:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-06 00:11:41-07:00
log127efae4401cf2cc0fcd7ec7c5b2e2c037fe4151
treee9e99608c0307be60438df5d97fa3872cee8215e
parent00d6109cbb1a13712d7347701969870aee83252d
signature Signed by PGP key B5690EEEBB952194

fix(web): expose error disclosure state (#10125)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

1 files changed, 5 insertions(+), 1 deletions(-)

apps/web/src/components/settings/ExpandableText.tsx+5-1
......@@ -1,4 +1,4 @@
1import { useState } from "react";
1import { useId, useState } from "react";
22
33import { cn } from "../../lib/utils";
44
......@@ -17,12 +17,14 @@ export function ExpandableText({
1717 collapsedClassName?: string;
1818 expandLabel?: string;
1919}) {
20 const textId = useId();
2021 const [expanded, setExpanded] = useState(false);
2122 const canExpand = text.length > 180 || text.includes("\n");
2223
2324 return (
2425 <div className={cn("min-w-0", className)}>
2526 <div
27 id={textId}
2628 className={cn(
2729 "whitespace-pre-wrap break-words",
2830 !expanded && canExpand ? collapsedClassName : null,
......@@ -33,6 +35,8 @@ export function ExpandableText({
3335 {canExpand ? (
3436 <button
3537 type="button"
38 aria-expanded={expanded}
39 aria-controls={textId}
3640 className="cursor-pointer mt-1 text-[11px] font-medium text-foreground/70 underline-offset-2 hover:text-foreground hover:underline"
3741 onClick={() => setExpanded((value) => !value)}
3842 >