Repository navigation
Админка: логи и подробности в окне поверх страницы - #402
spacesarmat wants to merge 1 commit into
Conversation
Логи NUC, проверка источников, отчёт DHT, сбой и подробности мониторинга открываются поверх страницы. У лога фильтр, обновление и копирование. Co-authored-by: ANDY BUM <spacesarmat@users.noreply.github.com>
| setLog({ name, text: j.lines || j.error || '', refreshing: false }); | ||
| } catch { | ||
| setLog({ name, text: 'логи недоступны', refreshing: false }); |
There was a problem hiding this comment.
Closing a log while its request is running clears log, but openLog sets it again when the request finishes or fails. The window pops open again, and an older reply can replace a newer log. CrashesDesk has the same issue.
Ignore replies after the user closes the window or starts another request.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ops/billing/admin/src/panels/DeskViews.tsx
Line: 472-474
Comment:
**Closed logs open again**
Closing a log while its request is running clears `log`, but `openLog` sets it again when the request finishes or fails. The window pops open again, and an older reply can replace a newer log. `CrashesDesk` has the same issue.
Ignore replies after the user closes the window or starts another request.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| const first = nodes[0]; | ||
| const last = nodes[nodes.length - 1]; | ||
| const active = document.activeElement; | ||
| if (e.shiftKey && (active === first || !root.contains(active))) { |
There was a problem hiding this comment.
Pressing Shift+Tab immediately after opening Modal can move focus onto the page behind it. The effect focuses root, but the backward Tab check handles only the first control or an element outside root. Since root.contains(root) is true, neither case matches the initial focus.
Include active === root in this check, or focus the first control when opening.
| if (e.shiftKey && (active === first || !root.contains(active))) { | |
| if (e.shiftKey && (active === root || active === first || !root.contains(active))) { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: ops/billing/admin/src/components/modal.tsx
Line: 34
Comment:
**Focus leaves the window**
Pressing Shift+Tab immediately after opening `Modal` can move focus onto the page behind it. The effect focuses `root`, but the backward Tab check handles only the first control or an element outside `root`. Since `root.contains(root)` is true, neither case matches the initial focus.
Include `active === root` in this check, or focus the first control when opening.
```suggestion
if (e.shiftKey && (active === root || active === first || !root.contains(active))) {
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Логи NUC больше не рисуются под списком контейнеров. То же окно используется для проверки источников, отчёта DHT, отчёта о сбое и подробностей мониторинга.
Окно: заголовок, «Закрыть», Esc, клик по затемнению, фокус не уходит наружу. Текст моноширинный и прокручивается. Есть фильтр строк и «Копировать». У лога контейнера есть «Обновить». На узком экране окно прижато к низу.
Не влито и на NUC не выкатывалось.
Проверено:
ops/billing/test/adminLog.test.ts,adminModal.test.tsx,monitorView.test.ts. Сборка админки совпадает сops/billing/public.Лог NUC на широком экране
Лог NUC на узком экране
Подробности проверки
Отчёт о сбое
Проверка источников
To show artifacts inline, enable in settings.
The PR appears safe to merge, with non-blocking fixes for late log replies and backward keyboard navigation.
Fix with agent prompt
Summary
The admin page now opens NUC logs, source checks, DHT reports, crash logs, and monitor details in a shared window.
Reviews (1) · Last reviewed commit: "Админка: логи и подробности в окне" · Reviewed by Greptile