fix(web): restore login footer with API status indicator#107
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis PR implements a login footer with API health status awareness. The Login component is enhanced to use the useHealthControllerCheck hook to monitor API availability. Based on the health status, an apiDown prop is passed to AuthButton, which displays an [API OFFLINE] state with disabled behavior when the API is unavailable. The StatusIndicator is repositioned to the login footer, and corresponding CSS styling is added for the footer layout and API-down button appearance. Changes
Sequence DiagramsequenceDiagram
participant Login as Login.tsx
participant HealthAPI as Health API<br/>(useHealthControllerCheck)
participant AuthButton as AuthButton
participant User as User
Login->>HealthAPI: Poll API health status
activate HealthAPI
HealthAPI-->>Login: Return health data & loading state
deactivate HealthAPI
Login->>Login: Derive isApiDown from<br/>health data/loading state
Login->>AuthButton: Render with apiDown={isApiDown}
alt API is Down
AuthButton->>AuthButton: Apply login-button--api-down class<br/>Display [API OFFLINE]<br/>Set disabled=true
else API is Up
AuthButton->>AuthButton: Display [CONNECT]<br/>Set disabled based on isLoading
end
AuthButton-->>User: Show button state
User->>AuthButton: Click button (if enabled)
AuthButton->>AuthButton: Attempt login<br/>(if not apiDown)
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Move StatusIndicator from login panel to new footer element - Add useHealthControllerCheck hook to derive API status - Disable connect button and show [API OFFLINE] when API is down - Add login-footer CSS positioning and api-down button styling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c5f5f21 to
4ec6efc
Compare
Summary
StatusIndicatorfrom inside the login panel to the footer[API OFFLINE]when the API health check failsChanges
useHealthControllerCheckhook, derivedisApiDownstate, moved StatusIndicator to new footer element, passedapiDownprop to AuthButtonapiDownprop — disables button and shows[API OFFLINE]text with red border styling when API is unreachable.login-footerpositioning styles and.login-button--api-downvisual stylingTest plan
[CONNECT]and is clickable[API OFFLINE], is disabled, has red borderpnpm --filter web build)🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes