recentChecks is oldest-first, not newest-first. The server appends each snapshot with `$push … $slice: -N` (monitor.repository.mongo.ts:218) and returns it unreversed, and every existing consumer reads recentChecks[length - 1] as the latest. I had it backwards, which broke three things: - downSince() walked from index 0 and broke on the first element. For any monitor that was up before it failed — the normal case — the very first check is an "up", so the loop exited immediately and the downtime duration never rendered at all. - The sparkline reversed already-ascending data, drawing every trend line mirrored: climbing latency appeared to be improving. - The status code read index 0, the oldest retained check, so a monitor that served 200s before failing showed a green 200 beside a red dot. Also from review: - Drop `initializing` from the "Currently down" ranking. On a fresh install every new monitor starts there, so the card opened red claiming a fleet-wide outage. It means "not checked yet", not "broken". - Add the maintenance count to Monitor status. The summary reports it and the server counts it; omitting it left the tiles summing to less than totalMonitors with nothing explaining the gap. - Link the status tiles to plain /uptime. The monitors list never reads query params, so ?status= was silently dropped and the link lied. - Render the status code as plain text instead of StatusCodeLabel, whose Tooltip put a focusable element inside the row's link where no keyboard user could reach it. - Stop sending `limit`: findByTeamIdWithStats derives its page size from rowsPerPage alone and never reads it, so it only implied a truncation that was not in effect. - Persist a deliberately emptied dashboard instead of resetting it to the defaults on reload. - Pass isStale on every card. The prop and its dimming were implemented but never wired, so background refetches gave no feedback. Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
This directory contains the client side (frontend) of Checkmate.