Backend / staging cleanup, performance substrate, and create-flow polish #60
Reference in New Issue
Block a user
Delete Branch "adilallo/Backend/StagingCleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
This PR bundles staging-readiness work, Next.js 16 performance substrate changes, marketing/create-flow UX fixes, and operator documentation updates on branch
adilallo/Backend/StagingCleanup.The main goals:
/(~45 KB → ~11.7 KB gzipped static shell perdocs/perf/next16-eval.md)."use memo").DELETE /api/drafts/mewhen the user is not signed in.Changes
Performance & Next 16 substrate
experimental.cacheComponentsinnext.config.mjs; removeforce-dynamicfrom(app)/(admin)layouts and wrap session-aware nav in<Suspense fallback={null}>.loading.tsxfor marketing and create-flow groups.compilationMode: "annotation") + ESLint plugin wiring.messages/en/marketing.ts, lazy-load heavy sections, trim LogoWall/QuoteBlock client work, extend imageminimumCacheTTL.docs/perf/next16-eval.mddocumenting evaluation, blockers resolved, and outcomes.Create flow — facet recommendations
lib/create/facetRecommendationsLoad.ts.CreateFlowLayoutClientonce community facets are selected.CardStackrendering onrecommendationsReadyin Communication, Membership, Conflict Management, and Decision Approaches screens.useFacetRecommendationsto read cache synchronously on mount.Create flow — draft cleanup
prepareFreshCreateFlowEntrySync/prepareFreshCreateFlowEntryaccept{ signedIn?: boolean }.DELETEandcreate:fresh-entry-pendingsentinel only run whensignedIn: trueand backend sync is on.loggedIn; profile passessignedIn: true; marketing entry points default to guest behavior.UI / accessibility fixes
public/favicon*,apple-touch-icon.png,scripts/generate-favicons.mjs).viewBox, prefix SVG clip/mask IDs to avoid collisions when multiple icons share a page.TextInput), improve button active/focus states.TripleTextBlocklayout fix; remove erroneous focus ring on Feature Grid section.Docs & ops
docs/guides/ops-runbook.md— steady-state deploy, rollback, recovery on Cloudron.ops-backend-deploy.md, backend roadmap/Linear tickets, static assets guide, relaunch brief.Tests
tests/unit/facetRecommendationsLoad.test.ts— cache + in-flight dedupe.tests/unit/prepareFreshCreateFlowEntry.test.ts— guest vs signed-in draft cleanup.How to Test
Setup
Create flow — recommended cards (signed-in or guest with facets)
aria-busy) rather than showing wrong order.Create flow — guest draft cleanup
DELETE /api/drafts/merequest (no401).Create flow — signed-in draft cleanup
DELETE /api/drafts/mefires once and wizard starts clean.Performance / PPR
npx next buildand confirm marketing routes show partial prerender (◐) where expected./and verify nav streams in without layout shift; compare static shell size to pre-change baseline if using bundle analyzer.Cross-browser / mobile
Marketing fixes
/abouttriple-step block renders correctly at md+ breakpoints.Regression
ackend / staging cleanup, performance substrate, and create-flow polishto Backend / staging cleanup, performance substrate, and create-flow polish