Skip to content

fix(logs): keep the logs console in-panel with latest-first rows - #333

Open
JohnChantz wants to merge 5 commits into
ui-rewritefrom
fix/logs-ui-overflow
Open

JohnChantz wants to merge 5 commits into
ui-rewritefrom
fix/logs-ui-overflow

Conversation

@JohnChantz

@JohnChantz JohnChantz commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx, where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Summary

The bottom logs sheet used to grow past its snap height: long messages stretched the panel, expanded JSON had no horizontal bound, and the search box only updated the URL. Operators now get a diagnostics console that stays inside the drawer (and the full Logs Viewer page), with search actually querying Loki.

Latest entries are listed first. The list follows new entries only while you are already at the top; scrolling down or expanding a row keeps your place, with a Jump to latest control when you leave the head. Collapsed HTTP rows show method, path, status, and duration so you can scan without opening every line. Loki failures surface as retryable errors instead of a silent empty list. The drawer no longer writes filter params onto module routes; only /logs-viewer syncs the URL.

Test plan

  • Open Logs from a module page. At 50%, 75%, and near-full snap points, only the log list scrolls.
  • Confirm the newest log is at the top of the list.
  • Expand a row with nested JSON and a very long message; the page should not grow horizontally.
  • Scan a collapsed HTTP row for method, path, and status without expanding it.
  • Search for a substring and confirm Loki results change (not just the URL).
  • Toggle Live, scroll down, then confirm the stream does not yank you to the latest entry until Jump to latest (scrolls to top).
  • Refresh with Loki down (or a forced error) and use Retry.
  • Open /logs-viewer, apply filters, reload, and confirm the query string is restored.
  • Close the drawer with Escape and check light/dark.

pnpm lint (0 errors on these files), pnpm test:logs-viewer, and pnpm build passed. Authenticated click-through of the live drawer was not completed from this session.

Other information:

Targets ui-rewrite so this stays on the current admin rewrite rather than main.

Bound drawer and viewer scrolling to one flex viewport, and wire
search into Loki so the sheet can expand without stretching.
Give the snap drawer a real height, drag only from the handle, and
absolutely position the list viewport so it no longer grows with rows.
@JohnChantz JohnChantz changed the title fix(logs): keep the logs console from overflowing its panel fix(logs): keep the logs console in-panel with latest-first rows Sep 14, 2026
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.

1 participant