feat: redis health, prod JWT guard, locale selector fix, nested card flatten - #492
Merged
floxxih merged 1 commit intoMay 29, 2026
Conversation
…flatten Closes floxxih#428 — /health now includes a Redis PING probe. New `check_redis_health()` returns `{status, detail?}` and never raises, so a downed Redis surfaces as `degraded` rather than a 500. Three backend tests cover not-initialised / healthy / exception paths plus an end-to-end assertion that the field is present in the response. Closes floxxih#430 — `Settings` gains a model-validator that refuses to construct when `debug=False` and `jwt_secret_key` is still the bundled default. The error names `JWT_SECRET_KEY` and points operators at setting it to a unique value, so startup logs make the cause obvious. Local debug mode keeps the convenient default. Three tests pin the behaviour. Closes floxxih#422 — Navbar's language selector previously read `pathname.split("/")[0]` directly, so routes like `/dashboard/orders` made the select render an out-of-set value. Now it goes through `getLocaleFromPathname` (validates against SUPPORTED_LOCALES, falls back to DEFAULT_LOCALE) and `buildLocalizedPath` for the route swap. A new test suite pins all three helpers — `getLocaleFromPathname`, `buildLocalizedPath`, and `stripLocaleFromPathname`. Closes floxxih#419 — flattened the nested "Actions" panel inside the htlcs detail Card (variant="glass"). Was a `rounded-2xl border` second-Card surface inside the parent Card; now uses a subtle bg tint with the smaller `rounded-xl` radius the issue calls for. A code comment records the radius-normalisation decision.
|
@chigozirim007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four assigned issues, one PR per repo per persona.
/healthnow includes a Redis PING probe via a newcheck_redis_health()helper. Returns{status, detail?}; never raises, so a downed Redis surfaces asdegradedinstead of a 500. Three backend tests cover not-initialised / healthy / exception, plus an end-to-end assertion that the field is present in the response shape.Settingsgained amodel_validator(mode="after") that refuses to construct whendebug=Falseandjwt_secret_keyis still the bundled default. The error message namesJWT_SECRET_KEYand points operators at setting it to a unique value. Local debug mode keeps the convenient default. Three tests pin the behaviour (production-rejects-default, production-accepts-custom, debug-keeps-default).pathname.split("/")[0]directly, so routes like/dashboard/ordersrendered an out-of-set value ("dashboard") in the<select>. Now it goes throughgetLocaleFromPathname(validates againstSUPPORTED_LOCALES, falls back toDEFAULT_LOCALE) for the current-value read andbuildLocalizedPathfor the route swap on change. New__tests__/i18nConfig.test.tscovers all three helpers including the near-miss case (/english/aboutfalls back to default).variant="glass"). It was arounded-2xl border border-border bg-surface-raisedsecond-card surface inside the parent Card — exactly the "card inside a card" pattern the issue calls out. Now uses a subtlebg-surface-raised/60tint with the smallerrounded-xlradius, with an inline comment recording the radius-normalisation decision.Notes
pytest/vitestlocally in the build sandbox; CI is the source of truth. Both new test files follow the patterns of existing tests inbackend/tests/andfrontend/src/__tests__/.rounded-2xldivs are left for a follow-up so this PR stays narrow.Test plan
pytest backend/tests/test_health_and_jwt_validation.pypasses (7 tests)vitest frontend/src/__tests__/i18nConfig.test.tspasses (14 cases)/healthwith Redis down — response is 200 withredis.status: "degraded"DEBUG=falseand the default secret — startup errors with the named env var/dashboard/orders— language selector showsEN(or the default), changing it routes to/es/dashboard/orders