From 7a36414fe0beaa4fb7106ef0b13a0e585b856141 Mon Sep 17 00:00:00 2001 From: SheeshDarth Date: Wed, 15 Jul 2026 12:16:19 +0530 Subject: [PATCH 1/3] feat(build): standalone output for self-contained distribution (MS6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MS6 (Framework & Performance). output: "standalone" emits a self-contained .next/standalone/server.js with only traced runtime deps — the basis for MS7 distribution (npx / single-folder deploy). The Drizzle migration .sql files are read from disk at runtime by instrumentation.ts, which dependency tracing can't see (it only follows imports), so outputFileTracingIncludes force-copies them — otherwise a distributed build boots against an unmigrated DB. Verified: standalone server boots on 127.0.0.1, homepage returns HTTP 200, and a runtime DB is created + migrated (native better_sqlite3.node + all 11 migrations traced into the bundle). Co-Authored-By: Claude Opus 4.8 --- next.config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/next.config.ts b/next.config.ts index b39d104..38b926a 100644 --- a/next.config.ts +++ b/next.config.ts @@ -33,6 +33,19 @@ const securityHeaders = [ ]; const nextConfig: NextConfig = { + // Self-contained production server (.next/standalone/server.js) with only the + // traced runtime deps — the basis for MS7 distribution (`npx`, single-folder + // deploy). Native better-sqlite3 is traced via serverExternalPackages below. + output: "standalone", + + // The Drizzle migration files are read from disk at runtime (instrumentation.ts + // runs the migrator on boot), so dependency tracing — which only follows + // imports — can't see them. Force them into the standalone bundle, or a + // distributed build boots against an unmigrated database. + outputFileTracingIncludes: { + "/**": ["./lib/db/migrations/**/*"], + }, + // better-sqlite3 is a native addon — it must be require()'d at runtime, not // bundled. Without this, Turbopack tries to bundle it into its render/ // static-path worker processes, which crashes them (WorkerError) on the From 019f42bd8c7b9e547bef666f83d4c5978625cd03 Mon Sep 17 00:00:00 2001 From: SheeshDarth Date: Wed, 15 Jul 2026 12:22:15 +0530 Subject: [PATCH 2/3] a11y(components): accessible names for icon-only delete buttons (MS6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MS6 (Framework & Performance) — a11y budget. The delete buttons across modules, questions, daily-log entries, and concept links render only a Trash2 icon with a `title` tooltip, which is not a reliable accessible name (WCAG 4.1.2 needs a programmatic name). Added aria-label to each so screen readers announce the action; the module button names the specific module. Co-Authored-By: Claude Opus 4.8 --- components/daily-log/DailyLogEntry.tsx | 1 + components/dsa-bridge/ConceptLinkCard.tsx | 1 + components/explain-back/QuestionCard.tsx | 1 + components/learning-map/ModuleCard.tsx | 1 + 4 files changed, 4 insertions(+) diff --git a/components/daily-log/DailyLogEntry.tsx b/components/daily-log/DailyLogEntry.tsx index 3cf7102..6b80818 100644 --- a/components/daily-log/DailyLogEntry.tsx +++ b/components/daily-log/DailyLogEntry.tsx @@ -61,6 +61,7 @@ export function DailyLogEntry({ log, deleteAction }: Props) { type="submit" className="p-1.5 text-zinc-700 hover:text-red-400 transition-colors" title="Delete" + aria-label="Delete daily log entry" > diff --git a/components/dsa-bridge/ConceptLinkCard.tsx b/components/dsa-bridge/ConceptLinkCard.tsx index 2280e98..2ec6360 100644 --- a/components/dsa-bridge/ConceptLinkCard.tsx +++ b/components/dsa-bridge/ConceptLinkCard.tsx @@ -86,6 +86,7 @@ export function ConceptLinkCard({ link, deleteAction }: Props) { type="submit" className="p-1.5 text-zinc-700 hover:text-red-400 transition-colors" title="Delete" + aria-label="Delete concept link" > diff --git a/components/explain-back/QuestionCard.tsx b/components/explain-back/QuestionCard.tsx index ef908bb..f72fa80 100644 --- a/components/explain-back/QuestionCard.tsx +++ b/components/explain-back/QuestionCard.tsx @@ -102,6 +102,7 @@ export default function QuestionCard({