Skip to content

ENG-9279: Add status to reflex.dev footer#6351

Merged
Alek99 merged 9 commits into
mainfrom
carlos/add-status-to-footer
Apr 24, 2026
Merged

ENG-9279: Add status to reflex.dev footer#6351
Alek99 merged 9 commits into
mainfrom
carlos/add-status-to-footer

Conversation

@carlosabadia
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 21, 2026

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 21, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing carlos/add-status-to-footer (91a46eb) with main (2fe1a44)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR adds a live service-status badge to the reflex.dev footer (both the docs page template and the shared footer component). A new monitor_checkly_status async lifespan task polls the Checkly API every 60 seconds and stores the result in a module-level global that a @rx.var(interval=60) computed var reads back to the client. Prior review concerns (credential guard, shared component instances, hardcoded URL) have all been addressed.

Confidence Score: 5/5

Safe to merge — all previous P1 concerns are resolved and the two remaining findings are minor P2 style/consistency notes.

All blocking issues from prior review rounds are addressed. The only open items are a timeout inconsistency between the outer and inner HTTP clients (P2) and an unusual placement of a global declaration (P2 style). Neither affects correctness or production reliability.

No files require special attention.

Important Files Changed

Filename Overview
packages/reflex-site-shared/src/reflex_site_shared/backend/status.py New file: async Checkly polling task + StatusState Reflex var. Early-exit guard for missing credentials is in place; minor inconsistency between outer (30 s) and inner (check_status) HTTP timeouts.
packages/reflex-site-shared/src/reflex_site_shared/components/server_status.py New file: server_status() badge component. Fresh component instances are created per call via _status_icon(), and the link uses noopener noreferrer. Looks clean.
packages/reflex-site-shared/src/reflex_site_shared/constants.py Adds CHECKLY_API_BASE_URL, CHECKLY_ACCOUNT_ID, CHECKLY_API_KEY, CHECKLY_CHECK_GROUP_ID, and STATUS_WEB_URL constants; all env-backed with safe empty-string defaults.
docs/app/reflex_docs/reflex_docs.py Registers monitor_checkly_status as a lifespan task. Straightforward wiring, no issues.
docs/app/reflex_docs/templates/docpage/docpage.py Adds server_status(StatusState.status) to the docpage footer alongside the copyright notice. Layout change is clean.
packages/reflex-site-shared/src/reflex_site_shared/views/footer.py Adds server_status(StatusState.status) to the shared footer and a h-fit class to the logo link. The layout restructuring looks correct.
packages/reflex-site-shared/src/reflex_site_shared/components/icons.py Adds a circle SVG icon used for the status dot. Clean addition.

Sequence Diagram

sequenceDiagram
    participant App as reflex_docs App
    participant Task as monitor_checkly_status (lifespan)
    participant Checkly as Checkly API
    participant State as StatusState.status (rx.var)
    participant Client as Browser Client

    App->>Task: register_lifespan_task()
    loop Every 60 seconds
        Task->>Checkly: GET /check-groups/{id}/checks
        Checkly-->>Task: list of check IDs
        par For each check ID
            Task->>Checkly: GET /check-statuses/{id}
            Checkly-->>Task: hasFailures / isDegraded
        end
        Task->>Task: Update CURRENT_STATUS global
    end
    loop Every 60 seconds (client poll)
        Client->>State: request StatusState.status
        State->>State: read CURRENT_STATUS global
        State-->>Client: Success | Warning | Critical
        Client->>Client: Render server_status badge in footer
    end
Loading

Reviews (2): Last reviewed commit: "remove this" | Re-trigger Greptile

Comment thread packages/reflex-ui-shared/src/reflex_ui_shared/components/server_status.py Outdated
Comment thread packages/reflex-ui-shared/src/reflex_ui_shared/backend/status.py Outdated
@carlosabadia carlosabadia marked this pull request as draft April 21, 2026 16:34
@carlosabadia carlosabadia marked this pull request as ready for review April 23, 2026 11:27
@Alek99 Alek99 self-requested a review April 24, 2026 02:05
@Alek99 Alek99 merged commit 7e79619 into main Apr 24, 2026
91 of 92 checks passed
@Alek99 Alek99 deleted the carlos/add-status-to-footer branch April 24, 2026 02:05
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