Skip to content

fix(ui): move log severity off the row and onto the rail - #5112

Merged
amir20 merged 3 commits into
masterfrom
fix/quieter-log-rows
Sep 11, 2026
Merged

fix(ui): move log severity off the row and onto the rail#5112
amir20 merged 3 commits into
masterfrom
fix/quieter-log-rows

Conversation

@amir20

@amir20 amir20 commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Picks up the feedback in #5103.

The row tint from #5058 washed error and warn lines in red and orange across the full width. At drawer width that's a lot of saturated background under text you're trying to read, and it stacks on top of the zebra striping, so the stream reads busy.

Severity now rides primarily on the level marker. A single error line gets the same 3px rail a grouped entry already gets, rather than a 4px dot that was too small to carry it alone. The row background is a hint on top of that:

  • error and fatal keep a tint, at 5% instead of 9%
  • warn loses its tint. An orange wash on a routine retry line was the noisiest thing in the stream, and the orange dot already marks it.
  • new "Highlight error rows" toggle in settings, on by default, for anyone who wants the field completely flat
  • zebra softened from 4% to 2.5%
  • sidebar rows and header titles from 14px to 15px, which was the other half of Option for more compact STDOUT/STDERR label #5103

The Go side stores it as a *bool with omitempty. A plain bool would serialize as false for every profile written before this setting existed, and that false gets injected into the page and overrides the frontend default of true, silently shipping the feature off.

The tailwind class cleanup that was here has moved to #5113, which also adds the linter that catches it. Expect a small conflict in LogLevel.vue and the EventSource snapshot between the two, whichever lands second.

All 16 locale files carry the two new keys, translated.

Tested by hand in dark mode against a container emitting a fixed mix of info, debug, warn, single line errors and multi line panics, with the toggle flipped both ways and the setting confirmed to round trip through the server profile. pnpm typecheck, pnpm test (373) and go test -race ./internal/web/... pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QkDSHZUSAtWyqdeXrwq2Sw

@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown

Reviewed the diff. No bugs found — small, self-contained change.

  • Removed rowLevel()/data-log-level confirmed with no leftover references anywhere (CSS, specs, e2e).
  • rail computed in LogLevel.vue correctly gates on position || level === "error"/"fatal"; warn intentionally stays a dot per PR description.
  • text-smtext-[0.9375rem] applied consistently across all sidebar/header title spots (HostMenu, K8sMenu, NavHeader, NavItem) — no stragglers left on old size.
  • No test coverage added/changed for the rail behavior (no spec exercises LogLevel.vue's rail logic), but this matches existing test coverage gaps for that component, not a regression.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Try this PR without waiting for a release:

docker run -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle:pr-5112

Also on ghcr.io/amir20/dozzle:pr-5112 and as amir20/dozzle:pr-5112-alpine. Rebuilt on every push, currently a3243bc.

@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown

Bug: permalink highlight is masked on error/fatal rows when "Highlight error rows" is on (default)

assets/components/logs/LogList.vue:100-120 — moving the error/fatal tint into &.highlight-errors > li { &[data-log-level="error"] ... } raises its specificity to (0,2,2) (ul.highlight-errors > li[data-log-level]), which now beats .log-permalink-target at (0,1,2) regardless of source order.

Before this PR, all these rules were flat siblings under > li with equal specificity, so log-permalink-target (last in source) correctly won. Now the red tint always wins on error/fatal lines, so following a permalink to an error/fatal log line no longer shows the intended bg-secondary/15 pulse — it just shows the static red background instead. Since highlightErrors defaults to true, this hits every user out of the box.

Fix: give .log-permalink-target matching or higher specificity within the .highlight-errors scope (e.g. nest it there too, or bump with a combined &.log-permalink-target selector) so the pulse still wins.

Everything else looks solid: locales are all 16 files translated (not copy-pasted), the *bool/omitempty reasoning for HighlightErrors in internal/profile/disk.go is correct, and the Tailwind arbitrary-value → scale conversions check out against the compiled scale (e.g. min-w-1=4px, w-0.75=3px, max-w-6xl=1152px).

@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown

Blocking:

  • assets/components/logs/__snapshots__/EventSource.spec.ts.snap: snapshot now expects min-h-px / min-h-1 / min-w-1, but the source for those exact nodes is untouched by this PR and still literally emits min-h-[1px] (assets/components/logs/entries/LoadMoreLogItem.vue:2) and min-h-[4px] min-w-[4px] (LogLevel.vue:27, non-rail branch — confirmed unchanged against origin/master). Vue doesn't canonicalize static class strings at runtime, so pnpm test should fail against this snapshot as committed. Looks like the "tailwind cleanup" from chore(lint): run the tailwind class checks in CI #5113 leaked into this snapshot without the matching source change.

Bug:

  • LogList.vue:100-120: moving .log-permalink-target outside the new &.highlight-errors > li { ... } block changes its CSS specificity relative to the error/fatal tint. Old code had both rules at equal specificity under > li, so .log-permalink-target (declared last) won. Now ul.highlight-errors > li[data-log-level="error"] (2 classes/attrs) beats ul > li.log-permalink-target (1 class), so with the new "Highlight error rows" toggle on (default), permalinking to an error/fatal line will pulse to bg-secondary/15 and then settle back to the red tint instead of staying on the permalink highlight — breaks the "Settle to the resting bg-secondary/15" comment right above it.

amir20 and others added 3 commits September 11, 2026 12:42
The row tint added in #5058 washed error and warn lines in red and orange
at full width, which fights the text sitting on top of it and reads as busy
next to the zebra underneath.

Severity now rides on the level marker only, so a single error line gets the
same 3px rail a grouped entry gets instead of a 4px dot. Zebra drops from 4%
to 2.5%, and the sidebar goes from 14px to 15px.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QkDSHZUSAtWyqdeXrwq2Sw
Brings back a background on error and fatal rows at 5% instead of the 9%
from #5058, and adds a toggle in settings for anyone who wants the field
completely flat. Warn does not get one back: an orange wash on a routine
retry line was the noisiest thing in the stream, and the orange dot already
marks it.

The Go field is a *bool with omitempty so a profile written before this
setting existed stays silent instead of injecting a false that overrides
the default of true.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QkDSHZUSAtWyqdeXrwq2Sw
Zebra at 2.5%, the error tint at 5%, the level rail on single lines and the
15px sidebar all move pixels, so the homepage shots no longer matched.

Regenerated through the compose image so the filenames keep their
chromium-linux suffix. make int passes, 30 tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QkDSHZUSAtWyqdeXrwq2Sw
@amir20
amir20 force-pushed the fix/quieter-log-rows branch from 63fd6cd to a3243bc Compare September 11, 2026 19:51
@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown

Reviewed the diff. No bugs found — the *bool/omitempty reasoning in internal/profile/disk.go:43 checks out: old profiles lack the highlightErrors key in the JSON handed to the frontend, and profileStorage.ts's Object.assign(storage.value, config.profile.settings) leaves the pre-merged default (true) in place since the key is absent, so existing users don't get silently flipped to flat. CSS specificity in LogList.vue:110 (.highlight-errors > li[data-log-level=...]) correctly outranks the plain :hover/zebra rules per the comment's intent.

Minor:

  • LogLevel.vue:49: rail computed only fires for error/fatal, not warn. Matches the PR's intent (warn keeps only the dot) but worth double-checking that's the desired asymmetry long-term, since it means warn severity now relies solely on the orange dot with zero row signal.
  • All 16 locale files + en.yml updated together, translations look genuine (not copy-pasted English) — good adherence to the repo's translation rule.

@amir20
amir20 merged commit b8aea48 into master Sep 11, 2026
14 checks passed
@amir20
amir20 deleted the fix/quieter-log-rows branch September 11, 2026 22:12
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