fix: liveness probe, nav routing, sidebar active-state, and repayment streak logic#1263
Merged
Merged
Conversation
3 tasks
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
This PR addresses four issues across the backend infra, frontend navigation, and gamification logic.
#1215 — Docker liveness probe hits dependency-checking
/healthIntroduced a dependency-free liveness route (
/livez) that returns200without touching DB/Redis/Soroban, and pointed the DockerHEALTHCHECKat it. The existing/healthand/health/deependpoints are now reserved for readiness checks (they continue to return503when a datastore is unavailable). This prevents transient DB/Redis blips from triggering orchestrator restart loops on an otherwise-healthy process. The liveness-vs-readiness distinction is documented alongside the routes.#1227 — BottomNav "Profile" 404 and no-op Header profile button
The BottomNav "Profile" entry now points to a real, rendered destination instead of building
//profileand hittingnot-found.tsx. The desktop Header profile button now navigates to the same destination rather than being a dead control. Added a routing assertion that every BottomNav/Header nav href resolves to an existing route.#1228 — Sidebar active-state exact-match loses highlight on nested routes
Replaced the exact
pathname === item.hrefcheck with prefix-aware matching consistent withBottomNav, so parent nav items (Loans, Admin Disputes, etc.) stay highlighted and receivearia-current="page"on nested/detail routes. Home is guarded against the root false-positive so it is not marked active on every page.#1232 — Repayment streak XP awarded on a
Math.random()coin-flipRemoved the random
Math.random() > 0.5branch that arbitrarily awarded the "On-time repayment streak" XP andstreak_masterachievement. The streak/achievement is now driven by real repayment-timing data (paid on/before due date) rather than chance, with the on-time vs late logic covered by unit tests.Testing
Closes #1215
Closes #1227
Closes #1228
Closes #1232