docs(bf-dm8v): note that feature was already complete
The OOM event detection and alert banner was implemented in commit ea1406a.
This notes file documents the implementation summary.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ea1406ac2d
commit
b5df74a321
1 changed files with 37 additions and 0 deletions
37
notes/bf-dm8v.md
Normal file
37
notes/bf-dm8v.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# OOM Event Detection - Already Complete
|
||||
|
||||
This task (bf-dm8v) was already implemented in commit `ea1406a` on 2026-06-07.
|
||||
|
||||
## Implementation Summary
|
||||
|
||||
The OOM event detection and alert banner feature was fully implemented with:
|
||||
|
||||
### Backend (systemCgroupMonitor.ts)
|
||||
- `getOomState()` function for lightweight OOM polling
|
||||
- Tracks: `oomKillCount`, `lastOomAt`, `oomDetected`, `memoryCurrentAtOom`
|
||||
- Reads from `/sys/fs/cgroup/user.slice/user-1001.slice/memory.events`
|
||||
|
||||
### API (server.ts)
|
||||
- `GET /api/system/oom-state` endpoint returns current OOM state
|
||||
- Includes `formattedMemoryCurrent` for human-readable memory value
|
||||
|
||||
### Frontend (OomAlertBanner.tsx)
|
||||
- Polls `/api/system/oom-state` every 30 seconds
|
||||
- Shows persistent red alert banner when `oomDetected=true`
|
||||
- Displays: OOM kill count, timestamp, memory at detection
|
||||
- Dismissible via X button
|
||||
- Auto-clears after 1 hour using localStorage
|
||||
- CSS styling: red background, warning icon, dismiss button
|
||||
|
||||
### Integration (App.tsx)
|
||||
- Banner rendered at top of dashboard (line 640)
|
||||
- `oomBannerDismissed` state tracks dismissal
|
||||
|
||||
## Files Modified in ea1406a
|
||||
- `src/systemCgroupMonitor.ts` - +66 lines (getOomState, OomState interface)
|
||||
- `src/web/server.ts` - +11 lines (/api/system/oom-state endpoint)
|
||||
- `src/web/frontend/src/components/OomAlertBanner.tsx` - +115 lines (new component)
|
||||
- `src/web/frontend/src/App.tsx` - +3 lines (import and render)
|
||||
- `src/web/frontend/src/index.css` - +68 lines (banner styling)
|
||||
|
||||
Total: 263 lines added
|
||||
Loading…
Add table
Reference in a new issue