Skip to content

chore: Hodge Podge to address various CSS inconsistencies - BED-7297 #2386

Open
KillahDillah wants to merge 18 commits intomainfrom
BED-7297-styling-bugs
Open

chore: Hodge Podge to address various CSS inconsistencies - BED-7297 #2386
KillahDillah wants to merge 18 commits intomainfrom
BED-7297-styling-bugs

Conversation

@KillahDillah
Copy link
Contributor

@KillahDillah KillahDillah commented Feb 19, 2026

Description

This ticket is addressing various CSS issues, mostly within the PZM space.

  • updated 'rounded' to 'rounded-lg' to make components consistent and align with designs (verified by Ryan)
  • fix double borders
Screenshot 2026-02-19 at 2 45 29 PM Screenshot 2026-02-19 at 2 46 43 PM
  • remove unused styles
  • align sizing of components between PZM
  • align spacing between buttons (differs on Attack Paths Page)
Screenshot 2026-02-19 at 3 06 47 PM Screenshot 2026-02-25 at 9 56 19 AM
  • fix overflow bug when creating a rule
Overflow BUG - ObjectSelect: Differing headings

Motivation and Context

Resolves: BED-7297

For consistency and to fix bugs

How Has This Been Tested?

Resizing the window, zooming in and out, resizing columns on Certs table, expanding and collapsing sections throughout PZM.

Screenshots (optional):

Notice the rounded corners and shadow displaying on EntityInfoPanel
Screenshot 2026-02-25 at 9 53 22 AM

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Database Migrations

Checklist:

Summary by CodeRabbit

  • Style
    • Unified corner radii across many UI components for more consistent rounding.
    • Adjusted borders (changed some top/bottom borders and border rendering) to improve visual hierarchy.
    • Tweaked spacing, padding, margins, shadows, and container heights for tighter vertical rhythm and improved responsiveness.
    • Refined several panels and lists to better control scroll behavior and two-column layouts for clearer content separation.

@KillahDillah KillahDillah self-assigned this Feb 19, 2026
@KillahDillah KillahDillah added the user interface A pull request containing changes affecting the UI code. label Feb 19, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR applies UI/layout-only changes across multiple components: Tailwind class tweaks (rounded → rounded-lg, border-y → border-b), padding/margin adjustments, height/width constraint updates, and minor structural rearrangements. No logic, state, or public API signatures were changed.

Changes

Cohort / File(s) Summary
Border Radius Standardization
cmd/ui/src/views/Explore/ExploreSearch/ExploreSearch.tsx, packages/javascript/bh-shared-ui/src/components/CreateUserForm/CreateUserForm.tsx, packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx, packages/javascript/bh-shared-ui/src/components/ExploreSearchCombobox/ExploreSearchCombobox.tsx, packages/javascript/bh-shared-ui/src/views/SSOConfiguration/SSOConfiguration.tsx
Replaced rounded with rounded-lg (larger corner radius) and added rounded classes to some wrappers; purely visual.
Border Style Updates
packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectsAccordion.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/RulesAccordion.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/ObjectSelect.tsx
Changed row/accordion borders from border-y (top+bottom) to border-b (bottom only); visual-only.
Details View Layout Restructuring
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/DynamicDetails.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectCountPanel.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/SelectedDetailsTabs/SelectedDetailsTabs.tsx
Adjusted container heights, padding, margins, added rounded-lg and shadows, removed some max-width constraints, and refined internal spacing—layout/visual changes only.
History View Layout Changes
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryContent.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryNote.tsx
Reworked history layout to a two-column structure with HistoryNote in a fixed right column; adjusted gaps, heights, and removed explicit width constraints on header.
Form & List Layout Tweaks
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/RuleForm.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/ObjectSelect.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/BasicInfo.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelectionPreview.tsx
Removed fixed max-width, adjusted list heights, swapped mt→mb in one container, removed trailing whitespace and simplified className usage; no behavior changes.
Miscellaneous Minor Visual Edits
packages/javascript/bh-shared-ui/src/components/EnvironmentSelectPanel/EnvironmentSelectPanel.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/PrivilegeZonesCypherEditor/PrivilegeZonesCypherEditor.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/TagForm/TagForm.tsx, packages/javascript/bh-shared-ui/src/components/CreateUserForm/...
Removed rounded in one Card, added mb-8 to a Card, removed empty Skeleton className, and other small class/padding cleanups.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • specter-flq
  • urangel
  • Holocraft
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: Hodge Podge to address various CSS inconsistencies - BED-7297' clearly summarizes the main change: addressing CSS/styling issues across the codebase, with a reference to the ticket number.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed PR description includes all required sections: detailed description of CSS changes with visual examples, motivation (BED-7297), testing methodology, types of changes, and completed checklist items.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BED-7297-styling-bugs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KillahDillah KillahDillah force-pushed the BED-7297-styling-bugs branch 2 times, most recently from cb132ab to 2883ed5 Compare February 20, 2026 00:22
@KillahDillah KillahDillah marked this pull request as ready for review February 20, 2026 18:22
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectsAccordion.tsx (1)

96-103: ⚠️ Potential issue | 🟡 Minor

LoadingRow border style is now inconsistent with Row.

LoadingRow (Line 100) still uses border-y, while the data Row (Line 130) was updated to border-b. This causes a visible border difference between the skeleton loading state and the populated state — each loading row has both a top and bottom border, but each data row only has a bottom border.

🔧 Proposed fix
-        className='border-y border-neutral-3 relative w-full p-2'>
+        className='border-b border-neutral-3 relative w-full p-2'>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectsAccordion.tsx`
around lines 96 - 103, The loading skeleton's container (LoadingRow) uses
'border-y' which creates both top and bottom borders and mismatches the actual
data row (Row) that uses 'border-b'; update the LoadingRow component's className
to use 'border-b' instead of 'border-y' so the skeleton row visually matches the
data Row (look for the LoadingRow arrow function and the Row component in
ObjectsAccordion.tsx and change the className accordingly).
🧹 Nitpick comments (9)
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryNote.tsx (1)

35-35: Consider applying rounded-lg to the content Card for consistency.

Every other Card in this PR's touch list (e.g., BasicInfo.tsx, SeedSelection.tsx, ObjectCountPanel.tsx) receives rounded-lg. The inner content Card here is the only one that doesn't, which may produce a visual inconsistency (square-cornered note body beneath a rounded-lg header card).

✨ Proposed fix
-            <Card className='p-4'>
+            <Card className='p-4 rounded-lg'>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryNote.tsx`
at line 35, In HistoryNote.tsx update the inner content Card (the JSX element
using Card with className='p-4') to include rounded-lg in its className so it
matches the other Cards (e.g., BasicInfo, SeedSelection, ObjectCountPanel);
modify the Card's className string to add 'rounded-lg' alongside 'p-4' to
restore consistent rounded corners for the note body.
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectCountPanel.tsx (1)

27-81: Consider extracting the shared Card className into a constant.

The loading and error Card classNames are identical, and the success branch differs only by overflow-y-auto. Extracting these reduces duplication and makes future styling updates a single-line change.

♻️ Proposed refactor
+const baseCardClassName = 'flex flex-col px-6 py-6 select-none rounded-lg';
+
 const ObjectCountPanel: FC = () => {
     const objectsCountQuery = useObjectCounts();

     if (objectsCountQuery.isLoading) {
         return (
             <Card
                 tabIndex={0}
-                className='flex flex-col px-6 py-6 select-none rounded-lg'
+                className={baseCardClassName}
                 data-testid='privilege-zones_object-counts'>
     ...
     } else if (objectsCountQuery.isError) {
         return (
             <Card
                 tabIndex={0}
-                className='flex flex-col px-6 py-6 select-none rounded-lg'
+                className={baseCardClassName}
                 data-testid='privilege-zones_object-counts'>
     ...
     } else if (objectsCountQuery.isSuccess && objectsCountQuery.data) {
         return (
             <Card
                 tabIndex={0}
-                className='flex flex-col px-6 py-6 select-none overflow-y-auto rounded-lg'
+                className={`${baseCardClassName} overflow-y-auto`}
                 data-testid='privilege-zones_object-counts'>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectCountPanel.tsx`
around lines 27 - 81, The Card className is duplicated across branches (loading,
error, success) with only the success branch adding overflow-y-auto; extract the
shared string into a constant (e.g., baseCardClass) and replace each Card's
className with baseCardClass, using `${baseCardClass} overflow-y-auto` (or
equivalent) in the objectsCountQuery.isSuccess branch; update the Card usages in
this file (the loading branch, the objectsCountQuery.isError branch, and the
objectsCountQuery.isSuccess branch) to reference that constant so future styling
changes are made in one place.
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx (1)

115-115: pl-4 is redundant alongside px-4.

px-4 already sets both padding-left and padding-right to 1rem, so pl-4 is a no-op here and can be removed.

♻️ Proposed cleanup
-                <Card className='mb-5 pl-4 px-4 py-2 rounded-lg'>
+                <Card className='mb-5 px-4 py-2 rounded-lg'>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx`
at line 115, The Card element in SeedSelection.tsx uses both "px-4" and "pl-4"
in its className, making "pl-4" redundant; remove "pl-4" from the className on
the Card (the JSX element with className='mb-5 pl-4 px-4 py-2 rounded-lg') so it
becomes 'mb-5 px-4 py-2 rounded-lg'.
cmd/ui/src/views/Explore/ExploreSearch/ExploreSearch.tsx (1)

172-216: Verify the intentional mix of rounded vs rounded-lg within this component.

The header div (line 178) was updated to rounded-lg, but the outer container (line 174) and the content panel (line 213) still use rounded. If full visual consistency is the goal, these two spots may have been missed.

♻️ Potential follow-up if a uniform corner radius is desired
-            className={cn('h-full min-h-0 w-[410px] flex gap-4 flex-col rounded', {
+            className={cn('h-full min-h-0 w-[410px] flex gap-4 flex-col rounded-lg', {
-                className={cn('hidden min-h-0 rounded pointer-events-auto', {
+                className={cn('hidden min-h-0 rounded-lg pointer-events-auto', {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmd/ui/src/views/Explore/ExploreSearch/ExploreSearch.tsx` around lines 172 -
216, The component mixes Tailwind corner utilities: the outer wrapper
(data-testid='explore_search-container') and content panel (the div with
className computed via cn starting with 'hidden min-h-0 rounded
pointer-events-auto') use "rounded" while the header
(data-testid='explore_search-container_header') uses "rounded-lg"; pick the
intended radius and make them consistent by changing the className on either the
header to "rounded" or the outer/container divs to "rounded-lg" so all three
(outer wrapper, header, content panel) match; update the className strings on
ExploreSearch's JSX accordingly.
packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx (1)

87-87: border-y-neutral-light-5 color class doesn't match the border-b width class.

After changing border-yborder-b, the color utility was not updated correspondingly. border-y-neutral-light-5 sets the color for both top and bottom borders; with only border-b in play, border-b-neutral-light-5 is the precise match. Functionally the bottom border renders correctly since border-y-{color} also sets border-bottom-color, but the semantic mismatch is misleading.

♻️ Proposed fix
-                    'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2 border-b border-y-neutral-light-5',
+                    'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2 border-b border-b-neutral-light-5',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx` at
line 87, The CSS utility class for the border color is semantically mismatched:
in VirtualizedNodeList.tsx update the class string that currently contains
'border-y-neutral-light-5' to use 'border-b-neutral-light-5' so the color
utility matches the explicit bottom-border width class (look for the class list
containing 'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2
border-b ...' and replace the color token accordingly).
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx (1)

60-60: Consider documenting the magic 10rem offset.

The 10rem in h-[calc(100%-10rem)] presumably accounts for fixed chrome above this component (top nav, breadcrumbs, etc.), but there's no comment or named token making that assumption explicit. If the surrounding layout changes, this silently mis-sizes the panel.

🛠️ Suggestion
-        <div className='h-[calc(100%-10rem)]'>
+        {/* 10rem = combined height of the app topbar + page breadcrumbs */}
+        <div className='h-[calc(100%-10rem)]'>

Or extract to a Tailwind CSS variable / utility class if the same offset is reused elsewhere.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx`
at line 60, The hard-coded height calc using the Tailwind class
h-[calc(100%-10rem)] in Details.tsx is a magic value; replace it with a
documented and reusable approach by either adding an inline comment explaining
that 10rem accounts for the fixed top chrome (nav/breadcrumbs) or extracting the
offset into a named constant/utility (e.g., a Tailwind variable/utility class or
a JS/TS constant like PANEL_TOP_OFFSET) and using that in the height calculation
so the intent is clear and changes to the layout only require updating one
place.
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/DynamicDetails.tsx (1)

131-131: max-h-full removed from RuleDetails — intentional asymmetry with TagDetails?

TagDetails (line 80) still carries max-h-full, while RuleDetails no longer does. The parent column in Details.tsx (line 79) owns overflow-y-auto, so there's no functional overflow risk. If this is intentional (e.g., to fix the rule-creation overflow bug mentioned in the PR), a brief inline comment would help future readers understand the divergence.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/DynamicDetails.tsx`
at line 131, RuleDetails lost the max-h-full utility while TagDetails still has
it, creating an unexplained asymmetry; either restore max-h-full on the
RuleDetails container or, if the removal was intentional to address the
rule-creation overflow bug, add an inline comment near the RuleDetails JSX (and
reference Details.tsx parent column with overflow-y-auto) explaining why
RuleDetails omits max-h-full so future readers understand the divergence from
TagDetails.
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryContent.tsx (2)

94-95: Fragile height pairing: h-[75dvh] outer and h-[65dvh] inner are independently hardcoded.

The 10dvh gap is expected to absorb the CardHeader height plus any padding. This assumption breaks if header or padding sizes change, or on very short viewports where 10dvh could be smaller than the actual header height (e.g., at 600px viewport height, 10dvh ≈ 60px which may be insufficient).

A more resilient approach is to make the Card a flex column and let the scroll area grow to fill remaining space:

♻️ Proposed refactor to use flex layout instead of paired hardcoded heights
-            <div data-testid='history-wrapper' className='flex gap-6 mt-4 h-[75dvh]'>
-                <Card className='rounded-lg flex-1 min-w-0'>
+            <div data-testid='history-wrapper' className='flex gap-6 mt-4 h-[75dvh]'>
+                <Card className='rounded-lg flex-1 min-w-0 flex flex-col overflow-hidden'>
                     <CardHeader className='flex-row ml-3 justify-between items-center'>
                         ...
                     </CardHeader>
                     <div
                         onScroll={...}
                         ref={scrollRef}
                         tabIndex={0}
-                        className='overflow-y-auto h-[65dvh]'>
+                        className='overflow-y-auto flex-1'>

Also applies to: 104-109

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryContent.tsx`
around lines 94 - 95, The layout uses fragile hardcoded heights (h-[75dvh] on
the outer div and h-[65dvh] on an inner element) which can break if CardHeader
or paddings change; update HistoryContent.tsx to make the Card a flex column and
replace fixed inner height with a flex-grow scrollable container so the header
size is intrinsic and the content area fills remaining space (adjust the element
that currently uses h-[65dvh] to use flex-1/overflow-auto and set Card to flex
flex-col); target the outer wrapper with data-testid='history-wrapper', the Card
component instance, and the scroll area inside the Card to implement these
changes.

121-123: Fixed w-[400px] min-w-[400px] on the HistoryNote column is not responsive.

On narrower viewports or when the browser window is resized below ~450px effective width, the fixed 400px sidebar and the unsized main card will overflow or collapse the layout with no wrapping or responsive fallback.

Consider whether a minimum breakpoint guard or a max-w with shrink is warranted, or document that this view has a known minimum supported viewport width.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryContent.tsx`
around lines 121 - 123, The fixed 400px sidebar width on the div wrapping
HistoryNote causes layout overflow on narrow viewports; update the wrapper (the
div that currently has 'w-[400px] min-w-[400px] overflow-y-auto') to use
responsive and shrinkable sizing so it can collapse on small screens (for
example use a full-width fallback like w-full with a sm:w-[400px] or
max-w-[400px], and ensure min-w-0 and flex-shrink-0 are applied so the
HistoryNote column can shrink instead of forcing overflow). Locate the wrapper
around the HistoryNote component in HistoryContent.tsx and replace the fixed
width classes with responsive/min/max/shrink classes to prevent overflow on
narrow viewports.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryContent.tsx`:
- Around line 94-95: The Card inside the HistoryContent component (the element
under the div with data-testid='history-wrapper') lacks a flex rule so it
doesn't expand in the flex row; update the Card's className to include "flex-1
min-w-0" (i.e., change Card className to 'flex-1 min-w-0 rounded-lg' or append
those utilities) so it fills remaining horizontal space—apply the same change to
the other Card instance referenced in this file (the second Card near the
History log section).

---

Outside diff comments:
In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectsAccordion.tsx`:
- Around line 96-103: The loading skeleton's container (LoadingRow) uses
'border-y' which creates both top and bottom borders and mismatches the actual
data row (Row) that uses 'border-b'; update the LoadingRow component's className
to use 'border-b' instead of 'border-y' so the skeleton row visually matches the
data Row (look for the LoadingRow arrow function and the Row component in
ObjectsAccordion.tsx and change the className accordingly).

---

Nitpick comments:
In `@cmd/ui/src/views/Explore/ExploreSearch/ExploreSearch.tsx`:
- Around line 172-216: The component mixes Tailwind corner utilities: the outer
wrapper (data-testid='explore_search-container') and content panel (the div with
className computed via cn starting with 'hidden min-h-0 rounded
pointer-events-auto') use "rounded" while the header
(data-testid='explore_search-container_header') uses "rounded-lg"; pick the
intended radius and make them consistent by changing the className on either the
header to "rounded" or the outer/container divs to "rounded-lg" so all three
(outer wrapper, header, content panel) match; update the className strings on
ExploreSearch's JSX accordingly.

In `@packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx`:
- Line 87: The CSS utility class for the border color is semantically
mismatched: in VirtualizedNodeList.tsx update the class string that currently
contains 'border-y-neutral-light-5' to use 'border-b-neutral-light-5' so the
color utility matches the explicit bottom-border width class (look for the class
list containing 'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center
pl-2 border-b ...' and replace the color token accordingly).

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx`:
- Line 60: The hard-coded height calc using the Tailwind class
h-[calc(100%-10rem)] in Details.tsx is a magic value; replace it with a
documented and reusable approach by either adding an inline comment explaining
that 10rem accounts for the fixed top chrome (nav/breadcrumbs) or extracting the
offset into a named constant/utility (e.g., a Tailwind variable/utility class or
a JS/TS constant like PANEL_TOP_OFFSET) and using that in the height calculation
so the intent is clear and changes to the layout only require updating one
place.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/DynamicDetails.tsx`:
- Line 131: RuleDetails lost the max-h-full utility while TagDetails still has
it, creating an unexplained asymmetry; either restore max-h-full on the
RuleDetails container or, if the removal was intentional to address the
rule-creation overflow bug, add an inline comment near the RuleDetails JSX (and
reference Details.tsx parent column with overflow-y-auto) explaining why
RuleDetails omits max-h-full so future readers understand the divergence from
TagDetails.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectCountPanel.tsx`:
- Around line 27-81: The Card className is duplicated across branches (loading,
error, success) with only the success branch adding overflow-y-auto; extract the
shared string into a constant (e.g., baseCardClass) and replace each Card's
className with baseCardClass, using `${baseCardClass} overflow-y-auto` (or
equivalent) in the objectsCountQuery.isSuccess branch; update the Card usages in
this file (the loading branch, the objectsCountQuery.isError branch, and the
objectsCountQuery.isSuccess branch) to reference that constant so future styling
changes are made in one place.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryContent.tsx`:
- Around line 94-95: The layout uses fragile hardcoded heights (h-[75dvh] on the
outer div and h-[65dvh] on an inner element) which can break if CardHeader or
paddings change; update HistoryContent.tsx to make the Card a flex column and
replace fixed inner height with a flex-grow scrollable container so the header
size is intrinsic and the content area fills remaining space (adjust the element
that currently uses h-[65dvh] to use flex-1/overflow-auto and set Card to flex
flex-col); target the outer wrapper with data-testid='history-wrapper', the Card
component instance, and the scroll area inside the Card to implement these
changes.
- Around line 121-123: The fixed 400px sidebar width on the div wrapping
HistoryNote causes layout overflow on narrow viewports; update the wrapper (the
div that currently has 'w-[400px] min-w-[400px] overflow-y-auto') to use
responsive and shrinkable sizing so it can collapse on small screens (for
example use a full-width fallback like w-full with a sm:w-[400px] or
max-w-[400px], and ensure min-w-0 and flex-shrink-0 are applied so the
HistoryNote column can shrink instead of forcing overflow). Locate the wrapper
around the HistoryNote component in HistoryContent.tsx and replace the fixed
width classes with responsive/min/max/shrink classes to prevent overflow on
narrow viewports.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/History/HistoryNote.tsx`:
- Line 35: In HistoryNote.tsx update the inner content Card (the JSX element
using Card with className='p-4') to include rounded-lg in its className so it
matches the other Cards (e.g., BasicInfo, SeedSelection, ObjectCountPanel);
modify the Card's className string to add 'rounded-lg' alongside 'p-4' to
restore consistent rounded corners for the note body.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx`:
- Line 115: The Card element in SeedSelection.tsx uses both "px-4" and "pl-4" in
its className, making "pl-4" redundant; remove "pl-4" from the className on the
Card (the JSX element with className='mb-5 pl-4 px-4 py-2 rounded-lg') so it
becomes 'mb-5 px-4 py-2 rounded-lg'.

@coderabbitai coderabbitai bot added the bug Something isn't working label Feb 20, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx (1)

87-87: border-y-neutral-light-5 color class is semantically stale after switching to border-b

border-y-neutral-light-5 sets the color for both the top and bottom borders, but now that border-b is the only active width class the top-border color is silently ignored. It's harmless, but updating the color utility to border-b-neutral-light-5 makes the intent self-documenting.

♻️ Align the border-color class with border-b
-'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2 border-b border-y-neutral-light-5',
+'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2 border-b border-b-neutral-light-5',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx` at
line 87, The CSS utility for the border color is still using
border-y-neutral-light-5 while the markup only applies a bottom border via
border-b; in VirtualizedNodeList (the JSX element with class string
'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2 border-b
border-y-neutral-light-5') replace border-y-neutral-light-5 with
border-b-neutral-light-5 so the border color utility matches the active border
width utility and documents the intent.
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx (1)

115-115: Nit: pl-4 is redundant when px-4 is present.

px-4 already sets both padding-left and padding-right to 1rem, making the explicit pl-4 unnecessary. This may have been pre-existing, but since the line was touched, it's a good opportunity to clean it up.

Suggested fix
-                <Card className='mb-5 pl-4 px-4 py-2 rounded-lg'>
+                <Card className='mb-5 px-4 py-2 rounded-lg'>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx`
at line 115, In SeedSelection.tsx, the Card component's className includes a
redundant "pl-4" alongside "px-4"; remove "pl-4" from the className on the Card
(the JSX element using Card in the RuleForm) so padding-left isn't
duplicated—leave "px-4 py-2 mb-5 rounded-lg" (and any other existing classes)
intact.
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx (1)

60-65: Fragile magic number in h-[calc(100%-10rem)]

The 10rem offset is implicitly assumed to equal the combined height of <PageDescription> + the mt-6 w-2/3 InfoHeader block + my-4 margins from the flex row (line 65). There is no comment documenting this, so any future height change to either of those sibling elements will silently break the layout.

Additionally, the inner flex row (line 65) carries h-full, which tries to occupy the entire h-[calc(100%-10rem)] height. Because <PageDescription> and the InfoHeader are also inside this container (not positioned out-of-flow), the total block height can exceed the outer constraint. Consider adding overflow-hidden to the outer wrapper or, ideally, replacing this with a proper flex column layout that lets PageDescription/InfoHeader shrink-wrap and the main content area flex-grow:

♻️ Suggested structural alternative
-<div className='h-[calc(100%-10rem)]'>
+<div className='flex flex-col h-full overflow-hidden'>
     <PageDescription />
     <div className='mt-6 w-2/3'>
         <InfoHeader />
     </div>
-    <div className='flex gap-6 my-4 h-full'>
+    <div className='flex gap-6 my-4 flex-1 min-h-0'>

This makes the outer wrapper a flex column, lets the static elements size themselves naturally, and gives the main content area the remaining space via flex-1 min-h-0 (the min-h-0 is necessary to allow flex children to overflow-scroll correctly).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx`
around lines 60 - 65, The outer wrapper using the magic height
h-[calc(100%-10rem)] is brittle — replace the current static-height approach by
making the container a column flex (e.g., add flex flex-col and
overflow-hidden), let PageDescription and InfoHeader remain natural flow (remove
the hard-coded height dependency), and convert the main content row (the div
with class 'flex gap-6 my-4 h-full') into a flex-grow area by giving it flex-1
and min-h-0 (and remove h-full) so it correctly takes remaining space and allows
internal scrolling; update class names on the outer wrapper, the InfoHeader
container (mt-6 w-2/3) if needed, and the inner flex row to implement this
layout change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx`:
- Line 68: In the EntityInfoPanel component fix the class name typo in the
header wrapper div: replace the incorrect "shadouw-outer-1" with
"shadow-outer-1" in the className string so Tailwind applies the intended
shadow; locate the div in EntityInfoPanel.tsx that currently contains
'bg-neutral-2 pointer-events-auto rounded-lg shadouw-outer-1' and update that
token to 'shadow-outer-1'.

---

Nitpick comments:
In `@packages/javascript/bh-shared-ui/src/components/VirtualizedNodeList.tsx`:
- Line 87: The CSS utility for the border color is still using
border-y-neutral-light-5 while the markup only applies a bottom border via
border-b; in VirtualizedNodeList (the JSX element with class string
'bg-neutral-light-2 dark:bg-neutral-dark-2 flex items-center pl-2 border-b
border-y-neutral-light-5') replace border-y-neutral-light-5 with
border-b-neutral-light-5 so the border color utility matches the active border
width utility and documents the intent.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/Details.tsx`:
- Around line 60-65: The outer wrapper using the magic height
h-[calc(100%-10rem)] is brittle — replace the current static-height approach by
making the container a column flex (e.g., add flex flex-col and
overflow-hidden), let PageDescription and InfoHeader remain natural flow (remove
the hard-coded height dependency), and convert the main content row (the div
with class 'flex gap-6 my-4 h-full') into a flex-grow area by giving it flex-1
and min-h-0 (and remove h-full) so it correctly takes remaining space and allows
internal scrolling; update class names on the outer wrapper, the InfoHeader
container (mt-6 w-2/3) if needed, and the inner flex row to implement this
layout change.

In
`@packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/RuleForm/SeedSelection.tsx`:
- Line 115: In SeedSelection.tsx, the Card component's className includes a
redundant "pl-4" alongside "px-4"; remove "pl-4" from the className on the Card
(the JSX element using Card in the RuleForm) so padding-left isn't
duplicated—leave "px-4 py-2 mb-5 rounded-lg" (and any other existing classes)
intact.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx (1)

68-68: Typo fix confirmed — shadow-outer-1 is now correctly spelled.

The previously flagged shadouw-outer-1 misspelling has been resolved, restoring the intended shadow to the header wrapper.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx`
at line 68, The class name typo has been fixed in the EntityInfoPanel component
but please verify and replace any remaining occurrences of the misspelling
"shadouw-outer-1" with the correct "shadow-outer-1" inside the EntityInfoPanel
JSX (the div with className containing 'bg-neutral-2 pointer-events-auto
rounded-lg shadow-outer-1') and run a quick build/test to ensure the intended
shadow style is applied everywhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In
`@packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx`:
- Line 68: The class name typo has been fixed in the EntityInfoPanel component
but please verify and replace any remaining occurrences of the misspelling
"shadouw-outer-1" with the correct "shadow-outer-1" inside the EntityInfoPanel
JSX (the div with className containing 'bg-neutral-2 pointer-events-auto
rounded-lg shadow-outer-1') and run a quick build/test to ensure the intended
shadow style is applied everywhere.

ℹ️ Review info

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a8253f and 158e3be.

📒 Files selected for processing (3)
  • packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/DynamicDetails.tsx
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/ObjectCountPanel.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/DynamicDetails.tsx


return (
<div className='h-full max-h-[75vh]'>
<div className='h-[calc(100%-10rem)]'>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows table to grow as a user zooms in and out

<div className='flex items-center' title={name}>
{glyph && <ZoneIcon zone={tagData} persistGlyph size={20} />}
<span className='text-xl font-bold truncate'>{name}</span>
<span className='text-xl font-bold text-wrap'>{name}</span>
Copy link
Contributor Author

@KillahDillah KillahDillah Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this to wrap instead of truncate due to the 'basis' classing, allowing it to grow as the window grows / accommodate for larger screens. If a Zone title is long, instead of being truncated, the entire title will show.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-02-25 at 10 11 48 AM Screenshot 2026-02-25 at 10 11 58 AM

Copy link
Contributor Author

@KillahDillah KillahDillah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments left to indicate reasoning of why classes were updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working user interface A pull request containing changes affecting the UI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant