- Add workflow_run trigger to ensure tests pass before building/pushing
- Add test status check to fail early if tests don't pass
- Add pre-build logging steps showing context and tags
- Add step IDs to capture build outputs (digest, metadata)
- Add comprehensive build summary showing digests and tags
- Add GitHub Actions job summary for better UI visibility
This ensures:
1. Untested code is never pushed to GHCR
2. Build progress is clearly visible in logs
3. Final artifacts (digests, tags) are easy to find
4. Workflow status can be quickly assessed from summary
https://claude.ai/code/session_01Kk7x2VdyXfayHqjuw8rqXe
- Add jest.d.ts to include @testing-library/jest-dom types
- Fix dashboard test mock to include all required props (isAuthenticated, authLoading, isLoading, hasContainers)
- Fix authSlice test by properly typing the Redux store
- Fix useInteractiveTerminal test by adding type annotation to props parameter
- Update tsconfig.json to include jest.d.ts
All TypeScript errors are now resolved and the build passes successfully.
https://claude.ai/code/session_01KrwCxjP4joh9CFAtreiBFu
The package-lock.json was missing several Playwright-related dependencies
(@playwright/test, playwright, playwright-core, fsevents) causing npm ci to
fail during Docker build. Regenerated the lock file to sync with package.json.
https://claude.ai/code/session_019yBpbUFxRG9dMfQJdHJsXh
- Update backend Dockerfile with multi-stage build that runs pytest
with coverage (70% threshold) before production build
- Update frontend Dockerfile with multi-stage build including:
- Unit test stage with Jest coverage
- E2E test stage with Playwright
- Production stage depends on test stages via markers
- Add Playwright e2e tests for login, dashboard, and terminal flows
- Configure Playwright with chromium browser
- Update jest.config.js to exclude e2e directory
- Update docker-compose.yml to target production stage
https://claude.ai/code/session_01XSQJybTpvKyN7td4Y8n5Rm
The terminal was rapidly connecting and disconnecting because handleFallback
in useTerminalModalState was not memoized, causing useInteractiveTerminal's
useEffect to re-run on every render. Added useCallback to all handlers and
created tests to catch handler stability regressions.
https://claude.ai/code/session_016MofX7DkHvBM43oTXB2D9y
Frontend improvements:
- Refactor useSimpleTerminal tests with it.each for empty/whitespace commands
- Add test for missing workdir in API response (100% branch coverage)
- Refactor DashboardHeader tests to parameterize container count variations
- Refactor LoginForm tests to parameterize input field changes
- Refactor ContainerCard tests to parameterize status border colors
- Add TerminalModal tests for FallbackNotification and isMobile dimensions
- Total: 254 passing tests, 76.94% coverage
Backend improvements:
- Refactor auth tests with pytest.parametrize for missing/empty fields
- Refactor container action tests with pytest.parametrize for start/stop/restart
- Maintains 100% backend coverage across all modules
- Total: 120 passing tests, 100% coverage
Benefits of parameterized tests:
- Reduced code duplication
- Easier to add new test cases
- Better test coverage with less code
- More maintainable test suite
https://claude.ai/code/session_mmQs0
- Improved useLoginForm tests to 100% coverage
- Added success path test (navigation to dashboard)
- Added failure path test (shake animation)
- Added tests for both success and failure branches
- Improved useTerminalModal tests to 100% coverage
- Added test for setTimeout behavior (300ms delay)
- Verified selectedContainer clears after close animation
- Enhanced LoginForm tests to 100% statements
- Added error state rendering test
- Added disabled button state test
Total: 235 passing tests (up from 229)
Coverage: 76.79% (up from 76.34%)
- useLoginForm.ts: 90.9% → 100%
- useTerminalModal.ts: 91.66% → 100%
https://claude.ai/code/session_mmQs0
This commit adds tests to catch the WebSocket transport misconfiguration
that caused "Invalid frame header" errors. The original test suite didn't
catch this because it was an infrastructure-level issue, not a code bug.
New Tests Added:
Frontend (frontend/lib/hooks/__tests__/useInteractiveTerminal.test.tsx):
- Verify Socket.IO client uses polling-only transport
- Ensure WebSocket is NOT in transports array
- Validate HTTP URL is used (not WebSocket URL)
- Confirm all event handlers are registered
- Test cleanup on unmount
Backend (backend/tests/test_websocket.py):
- TestSocketIOConfiguration class added
- Verify SocketIO async_mode, ping_timeout, ping_interval
- Confirm CORS is enabled
- Validate /terminal namespace registration
Documentation (TESTING.md):
- Explains why original tests didn't catch this issue
- Documents testing gaps (environment, mocking, integration)
- Provides recommendations for E2E, monitoring, error tracking
- Outlines testing strategy and coverage goals
Why Original Tests Missed This:
1. Environment Gap: Tests run locally where WebSocket works
2. Mock-Based: SocketIOTestClient doesn't simulate proxies/CDNs
3. No Infrastructure Tests: Didn't validate production-like setup
These new tests will catch configuration errors in code, but won't catch
infrastructure issues (Cloudflare blocking, proxy misconfig, etc.). For
those, we recommend E2E tests, synthetic monitoring, and error tracking
as documented in TESTING.md.
https://claude.ai/code/session_mmQs0
This change resolves the WebSocket connection error that occurs when Cloudflare
or other reverse proxies block WebSocket upgrade attempts.
Changes:
- Frontend: Configure Socket.IO client to use polling-only transport
- Backend: Add documentation comment about transport configuration
- Remove WebSocket URL conversion (no longer needed for polling)
The error occurred because:
1. Socket.IO started with HTTP polling (successful)
2. Attempted to upgrade to WebSocket (blocked by Cloudflare)
3. Browser received invalid/blocked frames causing "Invalid frame header"
4. Eventually fell back to polling (working)
With this fix:
- Socket.IO uses HTTP long-polling exclusively
- No WebSocket upgrade attempts
- No "Invalid frame header" errors
- Connection remains stable through Cloudflare
Polling transport provides equivalent functionality and reliability.
https://claude.ai/code/session_mmQs0
**Test Improvements:**
- Fixed all mock patch paths for refactored module structure
- Updated patches to target where functions are used, not defined
- Added test_coverage_boost.py with 9 new tests for exception handling
**Coverage Breakdown:**
- All routes: 100% coverage ✨
- Main app & config: 100% coverage ✨
- Most utilities: 89-100% coverage
- Handler logic: 38-100% coverage (edge cases remain)
**Test Results:**
- Total tests: 88/88 passing ✅
- Coverage: 88% (up from 62%)
- All critical paths covered
- Remaining 12% is error handling and diagnostics
**Uncovered Code:**
- Terminal disconnect cleanup (38%)
- Terminal input error paths (77%)
- Docker diagnostics (58%)
- Thread error handling (78%)
These are defensive code paths that are difficult to test
in isolation but don't affect core functionality.
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
- Added ls -la command execution demonstration
- Shows ANSI color support for directories (blue) and files
- Demonstrates full GNOME Terminal color rendering
- Updated screenshot shows complete terminal interaction
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
Changed Simple terminal output to use the same GNOME Terminal colors as
Interactive mode for consistency.
Changes:
- Background: #2E3436 (was #300A24 purple)
- Foreground: #D3D7CF (was #F8F8F2)
- Border and scrollbar colors updated to match GNOME theme
- Text colors: bright blue (#729FCF) and green (#8AE234)
Both Simple and Interactive terminals now have matching appearance.
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
Changed interactive terminal from Ubuntu purple theme to authentic GNOME
Terminal color scheme for better Linux desktop terminal experience.
Changes:
- Background: #2E3436 (dark gray, GNOME Terminal default)
- Foreground: #D3D7CF (light gray text)
- Updated all 16 ANSI colors to match GNOME Terminal palette
- Added selection colors (#4A90D9 background)
- Updated container styling with darker borders
- Increased padding for better readability
The terminal now looks and feels like GNOME Terminal. Full interactive
functionality works with xterm.js when connected to running Docker
containers via WebSocket.
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
Added ref availability check with retry logic to ensure terminal DOM
element is ready before xterm initialization. This fixes the issue where
xterm.js would fail to render because terminalRef.current was null when
the useEffect ran.
Changes:
- Wait up to 1 second for terminalRef to become available
- Add mounted flag to prevent state updates after unmount
- Add console logging for better debugging
- Prevent fallback calls after component unmount
Tested with Playwright to verify xterm now initializes and renders correctly.
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
Added Tooltip components to ContainerHeader and ContainerInfo to show
full text on hover when truncated. Container ID now has ellipsis styling
to handle long IDs gracefully.
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
Apply secondary color (#38b2ac cyan/teal) to Refresh and Logout buttons
in the dashboard header for better contrast against the dark background.
Updated both desktop outlined buttons and mobile icon buttons.
https://claude.ai/code/session_011PzvkCnVrsatoxbY3HbGXz
Changed Socket.IO transport order from ['websocket', 'polling'] to
['polling', 'websocket'] in the frontend terminal hook.
Why this fixes the issue:
- Cloudflare blocks direct WebSocket connections with 400 Bad Request
- HTTP polling works perfectly and bypasses Cloudflare's WebSocket protection
- Socket.IO now connects via polling first, then attempts upgrade to WebSocket
- If WebSocket upgrade fails (due to Cloudflare), connection stays on polling
- This ensures reliable connectivity without requiring Cloudflare config changes
Testing script included demonstrates:
✓ Polling transport: WORKS
✗ Direct WebSocket: BLOCKED by Cloudflare
✓ Auto-upgrade (polling→websocket): WORKS with graceful fallback
https://claude.ai/code/session_01SePwA78FSw4urCoyR2cqFh
Fixed two issues:
1. test_terminal_sendall_with_container: Changed sock.recv() to sock._sock.recv() to use the correct SocketIO API
2. Thread context warnings: Captured request.sid before starting read_output thread to avoid "Working outside of request context" errors
3. test_input_with_direct_socket_fallback: Updated mock socket to block instead of returning empty immediately, which was causing premature thread cleanup
All 79 tests now pass with no warnings.
https://claude.ai/code/session_01DLxxKWp6dmtGD4ZUQrReTb
Converted integration tests to work with both real Docker and simulated
containers:
- Removed module-level skip decorator
- Tests now use test_container_or_simulated fixture
- Automatically detects if container is real or simulated
- Tests socket behavior with both types
- Verifies _sock attribute and sendall method
Test Results:
- Before: 77 passed, 2 skipped
- After: 79 passed, 0 skipped
- Coverage: 82% (unchanged)
All tests now run successfully without Docker!
https://claude.ai/code/session_01B9dpKXH8wbD7MPtPBDHrjq