Skip to content

Set up environment variables and external services#14

Merged
at-ok merged 3 commits into
mainfrom
claude/setup-env-external-services-01Jsnn1zQB8wHjDtaALHnha4
Nov 18, 2025
Merged

Set up environment variables and external services#14
at-ok merged 3 commits into
mainfrom
claude/setup-env-external-services-01Jsnn1zQB8wHjDtaALHnha4

Conversation

@at-ok

@at-ok at-ok commented Nov 18, 2025

Copy link
Copy Markdown
Owner

Changes Made

Code Quality Improvements

  • Fixed all ESLint warnings in components and pages
  • Resolved all TypeScript type errors in test files
  • Removed unused imports and variables
  • Replaced any types with proper type definitions

Component Fixes

  • app/runner/page.tsx: Removed unused variables and imports, fixed type definitions
  • app/chaser/page.tsx: Added missing dependency to useEffect
  • components/GameStats.tsx: Removed unused import, added proper type interfaces
  • components/Map.tsx: Removed unused import, fixed type assertion
  • components/ReplayViewer.tsx: Removed unused import
  • components/ZoneManager.tsx: Removed unused import

Test File Fixes

  • Updated all test mocks to match actual type definitions
  • Removed non-existent properties (register, logout, updateProfile, accuracy, firebaseUser)
  • Added correct properties (session, signIn, signOut)
  • Added non-null assertions for array access in tests
  • Fixed GeolocationPosition mock to include toJSON method

Dependency Updates

  • Removed deprecated @supabase/auth-helpers-nextjs package
  • Package was not in use and showing deprecation warnings

Verification

✅ Build: Success
✅ Type Check: No errors
✅ ESLint: No warnings or errors
✅ Tests: 70/70 passing (100%)

## Changes Made

### Code Quality Improvements
- Fixed all ESLint warnings in components and pages
- Resolved all TypeScript type errors in test files
- Removed unused imports and variables
- Replaced `any` types with proper type definitions

### Component Fixes
- **app/runner/page.tsx**: Removed unused variables and imports, fixed type definitions
- **app/chaser/page.tsx**: Added missing dependency to useEffect
- **components/GameStats.tsx**: Removed unused import, added proper type interfaces
- **components/Map.tsx**: Removed unused import, fixed type assertion
- **components/ReplayViewer.tsx**: Removed unused import
- **components/ZoneManager.tsx**: Removed unused import

### Test File Fixes
- Updated all test mocks to match actual type definitions
- Removed non-existent properties (register, logout, updateProfile, accuracy, firebaseUser)
- Added correct properties (session, signIn, signOut)
- Added non-null assertions for array access in tests
- Fixed GeolocationPosition mock to include toJSON method

### Dependency Updates
- Removed deprecated @supabase/auth-helpers-nextjs package
- Package was not in use and showing deprecation warnings

## Verification
✅ Build: Success
✅ Type Check: No errors
✅ ESLint: No warnings or errors
✅ Tests: 70/70 passing (100%)
Apply consistent code formatting across the entire codebase using Prettier.
This ensures consistent code style and resolves all formatting warnings.

Files affected: 40 files
- Source files (components, hooks, pages)
- Configuration files
- Documentation files
- Test files
## Changes Made

### Test Updates
- **tests/e2e/example.spec.ts**
  - Updated to check for actual page elements (heading, input fields)
  - Removed incorrect `<main>` selector (pages use `<div>` structure)
  - Tests now verify login form presence

- **tests/e2e/role-pages.spec.ts**
  - Updated all role page tests to expect access denied messages for unauthenticated users
  - Fixed test expectations to match actual Japanese text:
    - Runner: "逃走者の権限が必要です"
    - Chaser: "鬼の権限が必要です"
    - GameMaster: "ゲームマスターの権限が必要です"
  - Removed incorrect `<main>` selectors
  - Tests now verify proper authentication barriers

### Infrastructure
- Updated .gitignore to exclude Playwright test artifacts:
  - /test-results/
  - /playwright-report/
  - /playwright/.cache/

## Context

All role pages (runner, chaser, gamemaster) require authentication and display
access denied messages when accessed without proper credentials. Tests were
failing because they expected immediate page content instead of authentication
barriers.

These tests will run successfully in CI with proper authentication flow.
@at-ok at-ok merged commit 90a279f into main Nov 18, 2025
8 checks passed
@at-ok at-ok deleted the claude/setup-env-external-services-01Jsnn1zQB8wHjDtaALHnha4 branch November 18, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants