v3: error cards across the app, friendly network errors, code quality pass

This commit is contained in:
khannurien
2026-03-21 19:17:23 +00:00
parent 608c6bc6a8
commit 5bed03baa5
21 changed files with 206 additions and 121 deletions

View File

@@ -6,6 +6,7 @@ import { deserializeComment } from "../model.ts";
import { Avatar } from "./Avatar.tsx";
import { Markdown } from "./Markdown.tsx";
import { relativeTime } from "../utils/relativeTime.ts";
import { ErrorCard } from "./ErrorCard.tsx";
interface CommentThreadProps {
dumpId: string;
@@ -204,7 +205,9 @@ function CommentNode({
placeholder="Write a reply…"
rows={3}
/>
{replyError && <p className="comment-form-error">{replyError}</p>}
{replyError && (
<ErrorCard title="Failed to post reply" message={replyError} />
)}
<div className="comment-form-actions">
<button
type="submit"
@@ -323,7 +326,7 @@ export function CommentThread({
rows={3}
/>
{topLevelError && (
<p className="comment-form-error">{topLevelError}</p>
<ErrorCard title="Failed to post comment" message={topLevelError} />
)}
<div className="comment-form-actions">
<button