docs(local-llm): mark Sprint 1 items complete in DASHBOARD_REVIEW.md

Check off 9 items (B1, B3, B4, B5, B6, B9, B10, B11, P4) in both
the bug list and sprint tracker. Add commit 2da67c2 to commit log.
This commit is contained in:
saravanakumardb1 2026-02-19 15:13:43 -08:00
parent 2da67c2f74
commit 9a807f64cf

View File

@ -23,22 +23,22 @@
## 1. Bugs ## 1. Bugs
- [ ] **B1. Hardcoded machine specs in header**`page.tsx:317` - [x] **B1. Hardcoded machine specs in header**`page.tsx:317`
Subtitle reads `Apple M4 Pro · 48 GB · {system?.platform}` — should use `system?.chip` and `formatBytes(system?.memory.total)` dynamically so it works on any machine. Subtitle reads `Apple M4 Pro · 48 GB · {system?.platform}` — should use `system?.chip` and `formatBytes(system?.memory.total)` dynamically so it works on any machine.
- [ ] **B2. Pull model blocks UI — no progress feedback**`api/ollama/route.ts:84-92` - [ ] **B2. Pull model blocks UI — no progress feedback**`api/ollama/route.ts:84-92`
`handlePull` calls Ollama with `stream: false`. Large models (20+ GB) block for 30+ minutes. The Next.js API route will likely timeout. Must use `stream: true` and pipe progress events to the client. _(Combined with F1.)_ `handlePull` calls Ollama with `stream: false`. Large models (20+ GB) block for 30+ minutes. The Next.js API route will likely timeout. Must use `stream: true` and pipe progress events to the client. _(Combined with F1.)_
- [ ] **B3. Dead code: non-streaming `generate` action**`api/ollama/route.ts:69-82` - [x] **B3. Dead code: non-streaming `generate` action**`api/ollama/route.ts:69-82`
The `action === 'generate'` handler is unused — UI only uses `/api/ollama/stream`. Remove or keep as fallback with a comment. The `action === 'generate'` handler is unused — UI only uses `/api/ollama/stream`. Remove or keep as fallback with a comment.
- [ ] **B4. Escape key closes modal during active streaming**`page.tsx:188-197` - [x] **B4. Escape key closes modal during active streaming**`page.tsx:188-197`
Global `keydown` handler calls `setPromptModel(null)` unconditionally. Backdrop click correctly checks `!promptLoading`. Escape should also respect `promptLoading` to prevent discarding an in-flight response. Global `keydown` handler calls `setPromptModel(null)` unconditionally. Backdrop click correctly checks `!promptLoading`. Escape should also respect `promptLoading` to prevent discarding an in-flight response.
- [ ] **B5. Auto-refresh (15s) fires during streaming/pull**`page.tsx:182-185` - [x] **B5. Auto-refresh (15s) fires during streaming/pull**`page.tsx:182-185`
`setInterval(fetchAll, 15000)` runs unconditionally. During streaming this causes background churn and potential UI flicker. Should pause while `promptLoading` or `pullLoading` is true. `setInterval(fetchAll, 15000)` runs unconditionally. During streaming this causes background churn and potential UI flicker. Should pause while `promptLoading` or `pullLoading` is true.
- [ ] **B6. Toast ID collision on HMR remount**`page.tsx:156-159` - [x] **B6. Toast ID collision on HMR remount**`page.tsx:156-159`
`toastId.current` resets to 0 on component remount during dev. Use `Date.now()` or `crypto.randomUUID()` for robust uniqueness. `toastId.current` resets to 0 on component remount during dev. Use `Date.now()` or `crypto.randomUUID()` for robust uniqueness.
- [ ] **B7. vm_stat page size hardcoded**`api/system/route.ts:103` - [ ] **B7. vm_stat page size hardcoded**`api/system/route.ts:103`
@ -47,13 +47,13 @@
- [ ] **B8. Whisper models dir not configurable**`api/whisper/route.ts:24` - [ ] **B8. Whisper models dir not configurable**`api/whisper/route.ts:24`
Hardcoded to `~/whisper-models`. Should scan multiple known paths (`/opt/homebrew/share/whisper-cpp/models/`, `~/whisper-models`, `~/.cache/whisper/`) or accept `WHISPER_MODELS_DIR` env var. Hardcoded to `~/whisper-models`. Should scan multiple known paths (`/opt/homebrew/share/whisper-cpp/models/`, `~/whisper-models`, `~/.cache/whisper/`) or accept `WHISPER_MODELS_DIR` env var.
- [ ] **B9. No AbortController for streaming fetch**`page.tsx:250-289` - [x] **B9. No AbortController for streaming fetch**`page.tsx:250-289`
Closing the prompt modal doesn't cancel the underlying fetch. The `reader.read()` loop continues in the background wasting CPU/bandwidth until the model finishes generating. Closing the prompt modal doesn't cancel the underlying fetch. The `reader.read()` loop continues in the background wasting CPU/bandwidth until the model finishes generating.
- [ ] **B10. Brew shows "Loading..." when array is empty**`page.tsx:936-940` - [x] **B10. Brew shows "Loading..." when array is empty**`page.tsx:936-940`
When `system.brewPackages` is `[]` (all uninstalled), displays "Loading..." instead of "No packages found". Needs to distinguish "still fetching" vs "fetched but empty". When `system.brewPackages` is `[]` (all uninstalled), displays "Loading..." instead of "No packages found". Needs to distinguish "still fetching" vs "fetched but empty".
- [ ] **B11. Prompt text not cleared on close without send**`page.tsx:951-957` - [x] **B11. Prompt text not cleared on close without send**`page.tsx:951-957`
Backdrop click clears `promptText`, but Escape handler (B4 fix) should also clear it. Otherwise stale text persists when re-opening. Backdrop click clears `promptText`, but Escape handler (B4 fix) should also clear it. Otherwise stale text persists when re-opening.
--- ---
@ -147,7 +147,7 @@
- [ ] **P3. `du -sk ~/.ollama/models` on every refresh**`api/system/route.ts:41` - [ ] **P3. `du -sk ~/.ollama/models` on every refresh**`api/system/route.ts:41`
Traverses entire models directory every 15 seconds. Cache with 60-second TTL. Traverses entire models directory every 15 seconds. Cache with 60-second TTL.
- [ ] **P4. No fetch timeout on Ollama calls**`api/ollama/route.ts:5-12` - [x] **P4. No fetch timeout on Ollama calls**`api/ollama/route.ts:5-12`
`fetchOllama` has no `AbortSignal` or timeout. If Ollama hangs, the dashboard hangs. Add 5-second timeout. `fetchOllama` has no `AbortSignal` or timeout. If Ollama hangs, the dashboard hangs. Add 5-second timeout.
- [ ] **P5. `system_profiler` slow on first load**`api/system/route.ts:52-53` - [ ] **P5. `system_profiler` slow on first load**`api/system/route.ts:52-53`
@ -172,17 +172,17 @@
### Sprint 1 — Critical Bug Fixes _(est. 12 hrs)_ ### Sprint 1 — Critical Bug Fixes _(est. 12 hrs)_
| # | ID | Task | Effort | Commit | | # | ID | Task | Effort | Commit |
| --- | --------- | ----------------------------------------- | ------ | ------ | | --- | --------- | ----------------------------------------- | ------ | --------- |
| 1 | - [ ] B4 | Guard Escape key during streaming | 5 min | | | 1 | - [x] B4 | Guard Escape key during streaming | 5 min | `2da67c2` |
| 2 | - [ ] B5 | Pause auto-refresh during prompt/pull | 10 min | | | 2 | - [x] B5 | Pause auto-refresh during prompt/pull | 10 min | `2da67c2` |
| 3 | - [ ] B9 | Add AbortController to streaming fetch | 15 min | | | 3 | - [x] B9 | Add AbortController to streaming fetch | 15 min | `2da67c2` |
| 4 | - [ ] B1 | Dynamic chip/RAM in header | 5 min | | | 4 | - [x] B1 | Dynamic chip/RAM in header | 5 min | `2da67c2` |
| 5 | - [ ] B11 | Clear prompt text on Escape close | 5 min | | | 5 | - [x] B11 | Clear prompt text on Escape close | 5 min | `2da67c2` |
| 6 | - [ ] P4 | Add timeout to Ollama fetch calls | 10 min | | | 6 | - [x] P4 | Add timeout to Ollama fetch calls | 10 min | `2da67c2` |
| 7 | - [ ] B3 | Remove dead generate action (or document) | 5 min | | | 7 | - [x] B3 | Remove dead generate action (or document) | 5 min | `2da67c2` |
| 8 | - [ ] B6 | Use Date.now() for toast IDs | 2 min | | | 8 | - [x] B6 | Use Date.now() for toast IDs | 2 min | `2da67c2` |
| 9 | - [ ] B10 | Fix brew "Loading..." vs "empty" state | 5 min | | | 9 | - [x] B10 | Fix brew "Loading..." vs "empty" state | 5 min | `2da67c2` |
### Sprint 2 — Pull Progress + Metrics _(est. 23 hrs)_ ### Sprint 2 — Pull Progress + Metrics _(est. 23 hrs)_
@ -243,9 +243,9 @@
_Commits will be added here as work progresses._ _Commits will be added here as work progresses._
| # | Date | Commit | Sprint | Items Completed | | # | Date | Commit | Sprint | Items Completed |
| --- | ---- | ------ | ------ | --------------- | | --- | ------ | --------- | -------- | ------------------------------------ |
| 1 | | | | | | 1 | Feb 19 | `2da67c2` | Sprint 1 | B1, B3, B4, B5, B6, B9, B10, B11, P4 |
--- ---