chore: align codebase and docs for Vite SPA runtime#11
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Code Review SummaryStatus: 1 Warning Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)The PR correctly removes The architectural changes are sound:
Files Reviewed (12 files)
Recommendation: Consider removing unused dependencies ( |
There was a problem hiding this comment.
Pull request overview
This PR removes leftover Next.js/SSR artifacts and updates documentation so the repository clearly represents a Vite-powered, client-rendered SPA runtime (with SSR-only helpers archived outside the main lib/ path).
Changes:
- Removed
'use client'directives from pages, components, and library modules. - Archived the Supabase SSR/Next.js server helper into
experimental/and added an SPA-unsupported stub export. - Updated runtime documentation (README structure + new
docs/architecture.mdADR).
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/auth.tsx | Removes 'use client' directive to reflect non-Next/Vite SPA runtime. |
| lib/ThemeContext.tsx | Removes 'use client' directive. |
| components/ProjectCard.tsx | Removes 'use client' directive. |
| components/Navbar.tsx | Removes 'use client' directive. |
| components/ImageCarousel.tsx | Removes 'use client' directive. |
| components/ContactForm.tsx | Removes 'use client' directive. |
| app/page.tsx | Removes 'use client' directive. |
| app/login.tsx | Removes 'use client' directive. |
| app/admin.tsx | Removes 'use client' directive. |
| app/privacy.tsx | Removes 'use client' directive. |
| app/terms.tsx | Removes 'use client' directive. |
| app/project-detail.tsx | Removes 'use client' directive. |
| experimental/supabase/server.ts | Adds an archived SSR helper module (currently disabled) and a stub createClient that throws in Vite. |
| docs/architecture.md | Adds an ADR documenting SPA rendering/auth/data/deployment assumptions. |
| README.md | Updates project structure notes for SPA usage and adds experimental/ to the structure listing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Built as static assets using Vite (`npm run build`) and deployed as a static web app. | ||
| - Platform configuration (for example on Vercel) serves the SPA entry point and static assets. | ||
| - Experimental SSR-oriented modules are kept outside the production import path to avoid ambiguity in runtime expectations. |
There was a problem hiding this comment.
The architecture doc describes deployment as “static assets … deployed as a static web app,” but the repo also contains Vercel serverless API routes (e.g., /api/wakatime.ts) and vercel.json routes /api/*. Consider updating this section to acknowledge the mixed model (static SPA + serverless endpoints) so the runtime/deployment expectations are accurate.
| - Built as static assets using Vite (`npm run build`) and deployed as a static web app. | |
| - Platform configuration (for example on Vercel) serves the SPA entry point and static assets. | |
| - Experimental SSR-oriented modules are kept outside the production import path to avoid ambiguity in runtime expectations. | |
| - The frontend is built as static assets using Vite (`npm run build`) and deployed as a static web app. | |
| - On platforms like Vercel, the SPA entry point and static assets are served statically, while requests under `/api/*` are handled by serverless API routes (for example, `/api/wakatime.ts`). | |
| - No server-side rendering (SSR) is used for page rendering in production; experimental SSR-oriented modules are kept outside the production import path to avoid ambiguity in runtime expectations. |
Motivation
lib/.Description
lib/supabase/server.tstoexperimental/supabase/server.tsand left the SSR-specific implementation commented/disabled to avoid runtime imports."use client"/'use client'from app pages, components, and libs so files start with normal imports (examples:app/page.tsx,components/Navbar.tsx,lib/auth.tsx).README.mdproject-structure entry foractions/to reflect SPA usage and added anexperimental/folder to the structure section.docs/architecture.mdcontaining the architecture decision record describing rendering strategy, auth flow, data layer, and deployment model for the SPA runtime.Testing
rg -n "'use client'|\"use client\""to verify there are no remaininguse clientdirectives and it returned no matches (success).npm run build(TypeScript compile +vite build) and the production build completed successfully (build succeeded with standard size warnings).Codex Task