Skip to content

fix: liveness probe, nav routing, sidebar active-state, and repayment streak logic#1263

Merged
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
pope-h:fix/issues-1215-1227-1228-1232
Jun 27, 2026
Merged

fix: liveness probe, nav routing, sidebar active-state, and repayment streak logic#1263
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
pope-h:fix/issues-1215-1227-1228-1232

Conversation

@pope-h

@pope-h pope-h commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four issues across the backend infra, frontend navigation, and gamification logic.

#1215 — Docker liveness probe hits dependency-checking /health

Introduced a dependency-free liveness route (/livez) that returns 200 without touching DB/Redis/Soroban, and pointed the Docker HEALTHCHECK at it. The existing /health and /health/deep endpoints are now reserved for readiness checks (they continue to return 503 when 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 //profile and hitting not-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.href check with prefix-aware matching consistent with BottomNav, so parent nav items (Loans, Admin Disputes, etc.) stay highlighted and receive aria-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-flip

Removed the random Math.random() > 0.5 branch that arbitrarily awarded the "On-time repayment streak" XP and streak_master achievement. 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

  • Backend health/liveness routes exercised locally
  • Frontend nav routing assertions pass
  • Repayment streak unit tests pass

Closes #1215
Closes #1227
Closes #1228
Closes #1232

@ogazboiz ogazboiz merged commit 82a0e01 into LabsCrypt:main Jun 27, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment