feat(diagnostics): walk the log lines from the keyboard; name the console "Server log"

Both log viewers put their lines in a NavGrid: j/k (and the arrows) step
from line to line, and Enter opens one exactly as a click does (the line's
button is its `data-nav-open`). A focused line is named by its code and
message.

The console's nav entry is "Szervernapló" / "Server log", its page title:
"Diagnosztika" was already the Settings tab that holds the user's own log,
and two places with one name read as one place.
This commit is contained in:
2026-09-19 02:02:45 +02:00
parent 8cfab498cf
commit 142593083f
6 changed files with 77 additions and 49 deletions
@@ -142,6 +142,17 @@ describe("AdminLogs", () => {
).toBe("true");
});
it("the keyboard can walk the lines and open one (NavGrid items)", async () => {
logsMock.mockResolvedValue({ items: [row(2), row(1)], accounts: {}, next_cursor: null });
renderConsole();
await waitFor(() => expect(lines()).toHaveLength(2));
const items = lines().map((b) => b.parentElement!);
expect(items.map((el) => el.getAttribute("data-nav-index"))).toEqual(["0", "1"]);
expect(lines().every((b) => b.hasAttribute("data-nav-open"))).toBe(true);
expect(screen.getByTestId("admin-logs-lines").querySelector("[data-nav-list]")).toBeTruthy();
});
it("a failed read is an error with a retry, not an empty log", async () => {
logsMock.mockRejectedValue(new Error("502"));
renderConsole();