diff --git a/apps/web/app/(dashboard)/dashboard/documents/[docId]/page.tsx b/apps/web/app/(dashboard)/dashboard/documents/[docId]/page.tsx index c783cc8..e4abe23 100644 --- a/apps/web/app/(dashboard)/dashboard/documents/[docId]/page.tsx +++ b/apps/web/app/(dashboard)/dashboard/documents/[docId]/page.tsx @@ -183,9 +183,7 @@ function SectionTreeNode({ )} {section.summary && ( -
- -
+ )} @@ -345,8 +343,19 @@ export default function DocumentDetailPage({ }); if (res.ok) { router.push("/dashboard/documents"); + return; } - } catch { + const body = (await res.json().catch(() => null)) as { + error?: string; + } | null; + alert( + `Delete failed (HTTP ${res.status})${body?.error ? `: ${body.error}` : ""}`, + ); + setIsDeleting(false); + } catch (e) { + alert( + `Delete failed: ${e instanceof Error ? e.message : "network error"}`, + ); setIsDeleting(false); } }, [docId, router]); diff --git a/apps/web/app/(dashboard)/dashboard/documents/page.tsx b/apps/web/app/(dashboard)/dashboard/documents/page.tsx index a29d92a..26e0abb 100644 --- a/apps/web/app/(dashboard)/dashboard/documents/page.tsx +++ b/apps/web/app/(dashboard)/dashboard/documents/page.tsx @@ -127,9 +127,18 @@ export default function DocumentsPage() { : prev, { revalidate: false }, ); + } else { + const body = (await res.json().catch(() => null)) as { + error?: string; + } | null; + alert( + `Delete failed (HTTP ${res.status})${body?.error ? `: ${body.error}` : ""}`, + ); } - } catch { - // retry silently + } catch (e) { + alert( + `Delete failed: ${e instanceof Error ? e.message : "network error"}`, + ); } finally { setDeletingId(null); } diff --git a/apps/web/components/ui/markdown.tsx b/apps/web/components/ui/markdown.tsx index ea35845..f4f892f 100644 --- a/apps/web/components/ui/markdown.tsx +++ b/apps/web/components/ui/markdown.tsx @@ -46,9 +46,11 @@ export function MarkdownSummary({ content, className }: MarkdownProps) { className={cn( "prose prose-xs max-w-none", "prose-headings:hidden", - "prose-p:text-muted-foreground prose-p:text-sm prose-p:leading-relaxed prose-p:my-0", + // Readable dark-gray summary text (muted-foreground was too faint + // on white cards). foreground/75 = ink at 75% opacity. + "prose-p:text-foreground/75 prose-p:text-sm prose-p:leading-relaxed prose-p:my-0", "prose-strong:text-foreground prose-strong:font-medium", - "prose-ul:my-1 prose-ol:my-1 prose-li:text-sm prose-li:text-muted-foreground prose-li:my-0", + "prose-ul:my-1 prose-ol:my-1 prose-li:text-sm prose-li:text-foreground/75 prose-li:my-0", "prose-code:text-xs prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded", "[&>*:first-child]:mt-0 [&>*:last-child]:mb-0", className