fix: give the brain scan report page its own scroll so long reports aren't clipped - #3200
Merged
Merged
Conversation
…ren't clipped `/brain*` is in Layout's isFullWidth list, so <main> renders as a bare `relative overflow-hidden` and each page under it must supply its own `overflow-y-auto`. Brain.jsx does; BrainScanReport.jsx was a plain <div>, so anything past the first screenful of a scan report was unreachable. Wraps all three render branches in the standard `h-full overflow-y-auto p-4 md:p-6` shell used by the other full-width pages, and adds a regression test asserting the container exists in the loading, loaded, and unavailable states.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Opening a malware scan report from a Brain link card (
/brain/links/:id/scan-report) showed the top of the report and nothing else — the page would not scroll, so anything past the first screenful was unreachable./brain*is inLayout.jsx'sisFullWidthlist, so<main>renders as a barerelative overflow-hiddenand each page under it must supply its ownoverflow-y-auto.Brain.jsxdoes;BrainScanReport.jsxwas a plain<div>, so its content was clipped with no way to reach the rest.All three render branches (loading, loaded, unavailable) now share a
Shellwrapper usingh-full overflow-y-auto p-4 md:p-6— the same idiom the other full-width pages already use (CatalogIngest.jsx,PipelineExport.jsx,StoryBuilder.jsx, and ~7 more).Test plan
client/src/pages/BrainScanReport.test.jsxasserts the page owns anh-full overflow-y-autocontainer in the loading, loaded, and unavailable states — 3/3 pass.h-full overflow-y-autofrom the wrapper turns all 3 red.npx eslintclean on both changed client files.