Commit Graph

4 Commits

Author SHA1 Message Date
5fc02f8d9b fix: Complete CI/CD testing infrastructure setup
**Environment Variables:**
- Fixed docker-compose.ci.yml to use correct environment variable names:
  - SURREALDB_JWT_SECRET (not SURREAL_JWT_SECRET)
  - GOOGLE_GENERATIVE_AI_API_KEY (not GOOGLE_API_KEY)
- Updated Gitea Actions workflow to match correct variable names

**Docker Configuration:**
- Removed SurrealDB health check (minimal scratch image lacks utilities)
- Added 10-second sleep before Next.js starts to wait for SurrealDB
- Updated magnitude service to run as root user for npm global installs
- Added xvfb-run to magnitude command for headless browser testing
- Updated Playwright Docker image from v1.49.1 to v1.56.1 in both files
- Added named volume for node_modules to persist installations

**Test Configuration:**
- Updated magnitude.config.ts to use Claude Sonnet 4.5 (20250929)
- Added headless: true to playwright.config.ts

**Testing:**
- CI test script (./scripts/test-ci-locally.sh) now works correctly
- All services start properly: SurrealDB → Next.js → Magnitude
- Playwright launches successfully in headless mode with xvfb-run

Note: Users need to ensure .env contains:
- ATPROTO_CLIENT_ID
- ATPROTO_REDIRECT_URI
- SURREALDB_JWT_SECRET
- GOOGLE_GENERATIVE_AI_API_KEY
- ANTHROPIC_API_KEY

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 15:03:01 +00:00
1ff9a2cf4b feat: Add comprehensive testing infrastructure
Implements robust testing setup with Playwright global auth, reusable test
helpers, Docker support, and CI/CD integration with Gitea Actions.

## Changes

### Playwright Setup
- Add global auth setup with storage state reuse (tests/playwright/auth.setup.ts)
- Fix auth setup to clear existing state before fresh login
- Create reusable performOAuthLogin helper (tests/playwright/helpers.ts)
- Configure dotenv loading for environment variables in playwright.config.ts

### Magnitude Configuration
- Update to use Claude Sonnet 4.5 (claude-sonnet-4-5-20250514)
- Create reusable loginFlow helper (tests/magnitude/helpers.ts)
- Fix smoke test to check login page instead of non-existent homepage

### Docker Support
- Add Dockerfile.playwright with non-root user (pwuser) for security
- Uses official Playwright Docker image (mcr.microsoft.com/playwright:v1.49.1-noble)
- Provides consistent testing environment across users and CI/CD

### CI/CD Integration
- Add Gitea Actions workflow (.gitea/workflows/magnitude.yml)
- Runs Magnitude tests on every push and PR
- Starts SurrealDB and Next.js dev server automatically
- Uploads test results as artifacts (30-day retention)

### Documentation
- Add comprehensive testing setup docs to AGENTS.md:
  - Playwright Docker setup instructions
  - CI/CD with Gitea Actions
  - Testing framework separation (Playwright vs Magnitude)
  - Required secrets for CI/CD

### Testing Best Practices
- Separate Playwright (manual + global auth) from Magnitude (automated E2E)
- Reusable helpers reduce code duplication
- Both frameworks work independently

## Testing

-  Playwright auth setup test passes (5.6s)
-  Magnitude smoke test passes
-  OAuth flow works correctly with helper function

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 13:51:09 +00:00
4967ce3cd1 feat: Add Playwright testing scaffolding infrastructure
Implements complete Playwright testing infrastructure for manual MCP testing and
as foundation for Magnitude tests.

Created:
- playwright.config.ts - Main configuration with setup project
- tests/playwright/auth.setup.ts - Authentication setup (placeholder)
- tests/playwright/fixtures.ts - Custom fixtures for authenticated/page contexts
- tests/playwright/helpers/chat.ts - Chat interaction helpers
- tests/playwright/helpers/galaxy.ts - Galaxy visualization helpers
- tests/playwright/helpers/node.ts - Node creation/management helpers
- tests/playwright/smoke.spec.ts - Basic smoke tests
- .env.test - Environment variables template

Updated:
- package.json - Added test:playwright scripts
- .gitignore - Added tests/playwright/.auth/ exclusion

Ready for manual Playwright MCP testing and Magnitude test creation.

Resolves plan: 01-playwright-scaffolding.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 21:14:35 +00:00
0ed2d6c0b3 feat: Improve UI layout and navigation
- Increase logo size (48x48 desktop, 56x56 mobile) for better visibility
- Add logo as favicon
- Add logo to mobile header
- Move user menu to navigation bars (sidebar on desktop, bottom bar on mobile)
- Fix desktop chat layout - container structure prevents voice controls cutoff
- Fix mobile bottom bar - use icon-only ActionIcons instead of truncated text buttons
- Hide Create Node/New Conversation buttons on mobile to save header space
- Make fixed header and voice controls work properly with containers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 14:43:11 +00:00