feat: multi-Oracle server support with runtime switching

Complete implementation of multi-server Oracle database support:

Backend:
- Multi-pool Oracle with lazy loading per server
- Email-to-server cache for automatic server discovery
- JWT tokens include server_id claim
- /auth/check-identity and /auth/check-email endpoints
- /auth/my-servers endpoint for listing user's accessible servers
- Server switch with password re-authentication

Frontend:
- New ServerSelector component for header dropdown
- Multi-step login flow (identity → server → password)
- Server switching from header with password modal
- Mobile drawer menu with server selection
- Dark mode support for all new components
- URL bookmark support with ?server= query param

Scripts:
- Unified start.sh replacing start-prod.sh/start-test.sh
- Unified ssh-tunnel.sh with multi-server support
- Updated status.sh for new architecture

Tests:
- E2E tests for multi-server and single-server login flows
- Backend unit tests for all new endpoints
- Oracle multi-pool integration tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-01-26 22:39:06 +00:00
parent 5f99ee2fd0
commit b137e80b71
102 changed files with 9398 additions and 2787 deletions

View File

@@ -398,12 +398,11 @@ Response: { total, by_status: { DRAFT: N, ... } }
**Solution:**
```bash
# Check which tunnel is running
./ssh-tunnel-prod.sh status
./ssh-tunnel-test.sh status
# Check SSH tunnel status (for servers requiring SSH)
./ssh-tunnel.sh status
# Restart with correct tunnel
./start-prod.sh # or ./start-test.sh
# Restart with correct environment
./start.sh prod # or ./start.sh test (test uses direct connection)
```
### 2. SQLite locked errors
@@ -420,7 +419,7 @@ Response: { total, by_status: { DRAFT: N, ... } }
ps aux | grep uvicorn
# Kill duplicates, restart
./start-prod.sh restart
./start.sh prod restart
```
### 3. Upload fails
@@ -497,9 +496,9 @@ npm run test
```bash
# Start unified monolith (backend + frontend)
./start-prod.sh # Production Oracle server
./start.sh prod # Production Oracle server
# OR
./start-test.sh # Test Oracle server
./start.sh test # Test Oracle server
```
### 2. Make Changes

View File

@@ -95,10 +95,10 @@ TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
```bash
# From project root - starts backend with Telegram bot integrated
./start-prod.sh
./start.sh prod
# Or for testing:
./start-test.sh
./start.sh test
```
The bot starts automatically as a background task when `MODULE_TELEGRAM_ENABLED=true`.

View File

@@ -21,10 +21,10 @@ Before starting manual tests:
```bash
# From project root - starts everything (SSH tunnel + backend + frontend)
./start-prod.sh
./start.sh prod
# Or for testing mode:
./start-test.sh
./start.sh test
# Check status
./status.sh