refactor(frontend): finish design-system migration — chatbot, a11y, lint

- Rewrite chatbot container + panel to new surface/signal/ink tokens
  (was still on dead glass/text-primary tokens -> wrong colors)
- loading-skeleton: glass -> surface-2
- Fix a11y: SVG charts role=img+aria-label, audio aria-label,
  message-entry as real <button>, tooltip biome-ignore (intentional)
- Type messages/page initialPage (noImplicitAny)
- tsc clean, next build green, biome 0 errors
This commit is contained in:
asepharyana
2026-08-14 11:02:52 +07:00
parent 5bbf75a65b
commit 8b281c7feb
10 changed files with 61 additions and 40 deletions
@@ -2,7 +2,7 @@
* Messages — Server Component.
* Reads URL guild/channel/selected/tab on the server; seeds first page SSR.
*/
import { getMessages } from "@/lib/api/server";
import { getMessages, type MessagePageResult } from "@/lib/api/server";
import MessagesView from "./view";
export default async function MessagesPage({
@@ -19,7 +19,7 @@ export default async function MessagesPage({
? (sp.tab as "all" | "images" | "review")
: "all";
let initialPage;
let initialPage: MessagePageResult | undefined;
if (guild) {
initialPage = await getMessages(guild, channel || undefined).catch(
() => undefined,
@@ -149,7 +149,13 @@ function PreviewDialog({
<div className="display text-lg text-[var(--color-signal)]">
{recording.filename}
</div>
<audio controls src={recording.download_url ?? ""} className="w-full" />
{/* biome-ignore lint/a11y/useMediaCaption: voice recordings are uncaptioned audio previews — no transcript available */}
<audio
controls
src={recording.download_url ?? ""}
aria-label={`Audio recording: ${recording.filename}`}
className="w-full"
/>
<div className="mono text-xs text-[var(--color-ink-soft)]">
{(recording.size_bytes / 1024).toFixed(0)} KB ·{" "}
{recording.upload_status}