Skip to content

Keep the log drawn when hide paths changes with Inspect open - #183

Merged
IamMrCupp merged 1 commit into
mainfrom
fix/log-pane-repaint
Nov 29, 2026
Merged

IamMrCupp merged 1 commit into
mainfrom
fix/log-pane-repaint

Conversation

@IamMrCupp

Copy link
Copy Markdown
Owner

With Inspect's strings open and the column scrolled down to the log, turning "Hide file paths in this window" on or off could leave the whole log box undrawn — border, background, text. The lines were there and already masked: one scroll inside the box and they painted.

What it takes

Both at once: every line in the log rewritten (masking does that) and the log moved by the Strings table collapsing or expanding above it. Each on its own drew fine:

  • Filtering the strings (column moves, log doesn't change): fine.
  • Detect (log grows, nothing above moves): fine.
  • Hide paths with an empty buffer (log rewritten, nothing above moves): fine.

It's the app's WebKit. The Chromium preview never did it.

The fix

The log follows its newest line in a useLayoutEffect now, not a useEffect, so the scroll is set before the browser paints and lands in the same frame as the change. That's the right hook for measuring and scrolling the DOM anyway.

Not verified. I couldn't make the blank box happen anywhere I could drive end to end: not in the fake-engine build without this fix either, long paths and all. It only showed in a real build with the made-up dump opened through the file panel. So this is the likely fix, not a proven one.

To check it: open a dump in a build of this branch, Inspect it, scroll down to the log, and turn hide paths on and off a couple of times. If the box still goes blank, this PR is wrong and the next thing to try is CSS on .log-lines.

Frontend checks pass (664 tests, tsc, eslint). No test covers the paint itself: jsdom doesn't lay anything out.

…t draws it after hide paths changes

Signed-off-by: Aaron Cupp <mrcupp@mrcupp.com>
@IamMrCupp
IamMrCupp merged commit 4b531f3 into main Nov 29, 2026
8 checks passed
@IamMrCupp
IamMrCupp deleted the fix/log-pane-repaint branch November 29, 2026 00:52
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