Skip to content

Админка: логи и подробности в окне поверх страницы - #402

Open
spacesarmat wants to merge 1 commit into
mainfrom
cursor/admin-log-modal-1d5b
Open

spacesarmat wants to merge 1 commit into
mainfrom
cursor/admin-log-modal-1d5b

Conversation

@spacesarmat

@spacesarmat spacesarmat commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Логи 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.

Open in Web Open in Cursor 

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with non-blocking fixes for late log replies and backward keyboard navigation.

Fix All in CursorFindings

  1. P2 Closed logs open again ▶
  2. P2 Focus leaves the window ▶
Fix with agent prompt
### Issue 1
ops/billing/admin/src/panels/DeskViews.tsx:472-474
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.

### Issue 2
ops/billing/admin/src/components/modal.tsx:34
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))) {
```

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!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The admin page now opens NUC logs, source checks, DHT reports, crash logs, and monitor details in a shared window.

  • Container logs open in a searchable window over the admin page.
  • Source checks show their results in a window over the admin page.
  • DHT probe results open in a window with readable details.
  • Crash logs open in a window over the crash list.
  • Monitor checks offer a window with readable details and the full check.

Reviews (1) · Last reviewed commit: "Админка: логи и подробности в окне" · Reviewed by Greptile

Логи NUC, проверка источников, отчёт DHT, сбой и подробности мониторинга открываются поверх страницы. У лога фильтр, обновление и копирование.

Co-authored-by: ANDY BUM <spacesarmat@users.noreply.github.com>
Comment on lines +472 to +474
setLog({ name, text: j.lines || j.error || '', refreshing: false });
} catch {
setLog({ name, text: 'логи недоступны', refreshing: false });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Fix in Cursor

const first = nodes[0];
const last = nodes[nodes.length - 1];
const active = document.activeElement;
if (e.shiftKey && (active === first || !root.contains(active))) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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!

Fix in Cursor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants