Merged
Conversation
❌ Deploy Preview for f3-the-codex-demo failed. Why did it fail? →
|
Add ESLint with Next.js configuration to enforce code quality standards and maintain consistent coding practices across the project. The setup includes: - ESLint 9.39.1 and eslint-config-next 16.0.1 dependencies - ESLint configuration file (.eslintrc.json) extending Next.js core web vitals and TypeScript rules - All necessary ESLint-related dependencies and plugins This helps catch potential errors early and ensures code follows established patterns.
Move user info API call from callback page to auth library to: - Centralize authentication logic - Improve error handling with detailed messages - Add proper caching headers - Enable reuse across application - Handle CORS issues by running server-side
Add database migration infrastructure using node-pg-migrate: - Add npm scripts for migration operations (generate, up, down, redo) - Create db-generate-migration.ts script to generate new migration files - Create db-migrate.ts script to handle migration execution with various commands - Add peer dependency flag to package-lock.json for node-pg-migrate compatibility The migration scripts provide a consistent interface for database schema changes and support common migration operations including rollback capabilities.
- Add IF NOT EXISTS and IF EXISTS clauses to table/index creation/drop operations in existing migrations - Add new migration to create mentioned_entries column in entries table - Improve migration safety by making operations idempotent - Ensure consistent formatting across migration files These changes make migrations safer to run multiple times and add support for tracking mentioned entries relationships.
Add ESLint configuration file using the official Next.js ESLint config preset. This establishes code quality standards and linting rules for the project to maintain consistent code style and catch potential issues early in development.
- Add verifyAdminEmail action to check if user has admin access - Wrap handleLogout in useCallback to prevent unnecessary re-renders - Enhance authentication initialization with email verification - Clear auth data and show appropriate error messages for unauthorized users - Add proper error handling for authentication failures - Update dependencies in useEffect to include handleLogout and verifyAdminEmail
48edb9d to
9420479
Compare
This was referenced Nov 4, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚧 This PR is Part of a Series
👋 TL;DR
Adds database migration infrastructure, enhances authentication flow with admin email verification, and establishes ESLint configuration for code quality.
(Part 2) F3 Codex Auth Bug Fix (110425) - Watch Video
🔎 Details
This PR introduces database migration infrastructure using node-pg-migrate with npm scripts for migration operations. Authentication improvements include extracting user info fetching to a dedicated function and adding admin email verification with enhanced error handling. Database schema updates make existing migrations idempotent and add a
mentioned_entriescolumn. ESLint configuration has been established using Next.js presets to enforce code quality standards.✅ How to Test
🥜 GIF