Skip to content

feat(ui): add Lighthouse side panel#11872

Merged
alejandrobailo merged 37 commits into
masterfrom
feat/lighthouse-side-panel
Jul 16, 2026
Merged

feat(ui): add Lighthouse side panel#11872
alejandrobailo merged 37 commits into
masterfrom
feat/lighthouse-side-panel

Conversation

@alejandrobailo

@alejandrobailo alejandrobailo commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Context

This PR is the second iteration of the Lighthouse AI experience. It makes the existing chat available from the global right side panel and unifies finding and resource details on the same side-panel shell.

The shared Details side panel is available in both OSS and Cloud. The Lighthouse AI launcher and tab remain Cloud-only.

No additional changelog entry is included for the side-panel iteration.

Description

  • Extract the Lighthouse v2 chat behavior into a reusable Zustand store and shared chat view for the full-page and side-panel surfaces.
  • Preserve the live panel conversation when opening full-page chat, including the draft, messages, active session, streaming state, and EventSource connection.
  • Use the existing shared Tabs, TabsList, TabsTrigger, and TabsContent presentation for switching between Details and Lighthouse AI. No panel-specific tabs variant is introduced.
  • Reuse the global side-panel shell for finding and resource details in OSS and Cloud while keeping the Lighthouse AI tab and navbar trigger Cloud-only.
  • Make lazy content retryable by creating a fresh React.lazy instance after a rejected chunk import.
  • Prevent stale async session creation from replacing a session selected or reset while the request is pending.
  • Reload Lighthouse models after transient partial-loading failures instead of caching incomplete configuration data.
  • Add semantic design-system APIs for compact comboboxes and constrained tooltips instead of visual className overrides at call sites.
  • Keep responsive containers and fixed overlays scoped correctly inside the global panel.
  • Integrate the latest master changes, including Overview prompt prefill without automatic submission and the shared sidebar navigation-mode synchronizer.

Steps to review

  1. Run cd ui && pnpm run healthcheck.
  2. Run cd ui && pnpm exec vitest run.
  3. In Cloud mode, open a finding or resource detail and verify that Details and Lighthouse AI use the standard shared tabs presentation.
  4. Start a Lighthouse conversation in the panel, enter a draft or keep a response streaming, then open full-page chat and verify that the same live state continues.
  5. Verify New chat is disabled before the conversation has messages and explains why through its tooltip.
  6. Verify a failed lazy chunk stays inside the panel and Retry invokes the loader again.
  7. Open Lighthouse from the Overview banner and verify that the remediation prompt is prefilled but not automatically submitted.
  8. In OSS mode, open finding and resource details and verify that the shared side panel works without rendering the Lighthouse AI tab or launcher.

Checklist

Community Checklist
  • This feature or issue is listed in the public issue tracker or roadmap.
  • It is assigned to the contributor.
  • Are there new checks included in this PR? No
  • Review if the code is covered by tests.
  • Review if the code is documented where needed.
  • Review if a backport is needed.
  • Review if the README needs changes.

UI

  • All task requirements work as expected on the UI.
  • Screenshots or video - Mobile.
  • Screenshots or video - Tablet.
  • Screenshots or video - Desktop.
  • Changelog fragment reviewed. No additional side-panel fragment is required.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alejandrobailo
alejandrobailo requested a review from a team as a code owner July 7, 2026 15:18
@alejandrobailo alejandrobailo added the no-changelog Skip including change in changelog/release notes label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

No Conflicts

No conflict markers, and the branch merges cleanly into its base.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a shared Lighthouse chat store used by full-page and panel chat surfaces, introduces a global side panel with detail portals and routing/layout wiring, and updates finding titles, the floating mute button, and table toolbar layout.

Changes

Lighthouse chat store and side panel

Layer / File(s) Summary
Chat store and config loading
ui/app/(prowler)/lighthouse/_lib/chat-store.ts, ui/app/(prowler)/lighthouse/_components/chat/lighthouse-chat-store-provider.tsx, ui/app/(prowler)/lighthouse/_lib/panel-chat-store.ts, ui/app/(prowler)/lighthouse/_lib/testing/event-source-mock.ts, ui/app/(prowler)/lighthouse/_lib/load-chat-config.ts, ui/app/(prowler)/lighthouse/_lib/session-events.ts
Defines the shared Lighthouse chat store, provider, panel singleton, EventSource test mock, chat-config loader, and session/configuration event helpers.
Full-page chat and panel chat composition
ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-page.tsx, ui/app/(prowler)/lighthouse/page.tsx, ui/app/(prowler)/lighthouse/_components/config/configuration-form.tsx, ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.tsx, ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat-skeleton.tsx, ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.test.tsx, ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-page.test.tsx
Refactors the full-page chat to use the shared store, loads cloud config through the new loader, adds the cached panel chat state machine and session history, and emits config-change notifications from configuration CRUD.
Chat view and empty state
ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-view.tsx, ui/app/(prowler)/lighthouse/_components/chat/empty-state.tsx, ui/app/(prowler)/lighthouse/_components/chat/composer.tsx, ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-page.test.tsx
Adds the store-backed chat view, compact/footer empty-state options, and the composer gating change, with supporting tests.
Side panel store and sizing
ui/store/side-panel.ts, ui/store/__tests__/side-panel.test.ts, ui/lib/ui-layout.ts, ui/hooks/use-media-query.ts, ui/styles/globals.css
Defines the persisted side-panel store, resize clamping and viewport sizing constants, the media-query hook, and the container-query Tailwind variants.
Global side panel and trigger
ui/components/shadcn/side-panel/side-panel.tsx, ui/components/side-panel/global-side-panel.tsx, ui/components/side-panel/global-side-panel.test.tsx, ui/components/side-panel/side-panel-tabs.tsx, ui/components/side-panel/side-panel-trigger.tsx, ui/components/side-panel/side-panel-error-boundary.tsx, ui/components/side-panel/index.ts, ui/components/ui/nav-bar/navbar-client.tsx, ui/components/ui/nav-bar/navbar-client.test.tsx, ui/app/(prowler)/lighthouse/_components/navigation/lighthouse-v2-navigation-mode-sync.tsx, ui/lib/lighthouse-routes.ts, ui/app/(prowler)/layout.tsx, ui/app/(auth)/layout.tsx, ui/components/ui/main-layout/main-layout.tsx, ui/components/ui/table/data-table.tsx
Adds the side-panel primitive, global panel renderer, lazy AI chat tab registry, navbar trigger, error boundary, route gating, layout mounting, push behavior, and supporting UI tests.
Detail side panel migration
ui/components/side-panel/detail-side-panel.tsx, ui/components/side-panel/detail-side-panel.test.tsx, ui/components/findings/table/resource-detail-drawer/resource-detail-drawer.tsx, ui/components/resources/resource-details-sheet.tsx
Adds the detail side-panel portal and migrates drawer/sheet consumers to it.
Finding title tooltips
ui/components/findings/table/column-finding-groups.tsx, ui/components/findings/table/column-finding-groups.test.tsx, ui/components/findings/table/column-standalone-findings.tsx
Changes finding title cells to truncated single-line text with tooltips and updates the related assertion.

Estimated code review effort: 5 (Critical) | ~120 minutes

Findings and table UI polish

Layer / File(s) Summary
Floating mute button portal
ui/components/findings/floating-mute-button.tsx
Moves the floating mute button into a portal mounted on document.body with an SSR-safe null return.
DataTable toolbar wrapping
ui/components/ui/table/data-table.tsx, ui/components/ui/table/data-table.test.tsx
Switches the toolbar right-side container to a wrapping flex layout and updates the matching test expectations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SidePanelTrigger
  participant SidePanelStore as useSidePanelStore
  participant GlobalSidePanel
  participant DetailSidePanel
  participant LighthousePanelChat

  User->>SidePanelTrigger: click
  SidePanelTrigger->>SidePanelStore: openPanel(AI_CHAT)
  SidePanelStore-->>GlobalSidePanel: selectedTab and isOpen
  GlobalSidePanel->>LighthousePanelChat: mount lazy tab content
  DetailSidePanel->>SidePanelStore: registerContextTab("Details")
  GlobalSidePanel-->>DetailSidePanel: context outlet available
Loading

Possibly related PRs

  • prowler-cloud/prowler#11860: Both PRs change Lighthouse v2 session-archived handling in the chat page and session event flow.
  • prowler-cloud/prowler#11690: Both PRs touch the Lighthouse v2 cloud entry path in ui/app/(prowler)/lighthouse/page.tsx and related config loading.

Suggested reviewers: jfagoagas, pedrooot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding the Lighthouse side panel.
Description check ✅ Passed The description includes the required Context, Description, Steps to review, Checklist, and License sections and is sufficiently detailed.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/lighthouse-side-panel

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.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🔒 Container Security Scan

Image: prowler-ui:d58fe47
Last scan: 2026-07-16 12:58:41 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

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

⚠️ Outside diff range comments (1)
ui/app/(prowler)/lighthouse/_components/panel/index.ts (1)

1-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Verify resetPanelChatConfigCacheForTests re-export is actually consumed via this barrel.

The corresponding test (lighthouse-panel-chat.test.tsx) imports resetPanelChatConfigCacheForTests directly from ./lighthouse-panel-chat, not from this index. If nothing else imports the test helper via this public barrel, re-exporting it here needlessly widens the module's public surface with a test-only utility.

#!/bin/bash
rg -n "resetPanelChatConfigCacheForTests" ui --type=ts --type=tsx
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/app/`(prowler)/lighthouse/_components/panel/index.ts around lines 1 - 5,
The barrel in LighthousePanel’s index is re-exporting
resetPanelChatConfigCacheForTests even though the only known usage imports it
directly from LighthousePanelChat, so this unnecessarily expands the public API
with a test-only helper. Check whether any production or external consumer
imports the helper through this index, and if not, remove the
resetPanelChatConfigCacheForTests export from the index barrel while keeping
LighthousePanelChat exported.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/app/`(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.tsx:
- Around line 149-174: The panel chat currently listens for
LIGHTHOUSE_V2_SESSION_ARCHIVED_EVENT but does not refresh the session list, so
an archived chat can remain visible in Recent chats until another refresh
occurs. Update the useMountEffect setup in lighthouse-panel-chat.tsx so that
archiving also triggers refreshSessions, either by calling it inside
handleSessionArchived in addition to
store.getState().handleSessionArchived(archivedId) or by dispatching/handling
LIGHTHOUSE_V2_SESSIONS_CHANGED_EVENT from the archive flow. Keep the existing
refresh and listener wiring aligned with handleArchiveSession and the session
archive handling logic.
- Around line 81-134: The READY cache in LighthousePanelChat is not invalidated
when provider config changes, so reopen can reuse stale config/models or a stale
modelsError. Update the config mutation flows to emit a config-changed/session
event or explicitly clear cachedReadyState and refresh the panel state after
add/update/delete operations. Use LighthousePanelChat, cachedReadyState,
resetPanelChatConfigCacheForTests, and loadPanelChatState to keep the cached
READY state in sync.

In `@ui/app/`(prowler)/lighthouse/_lib/chat-store.ts:
- Around line 313-339: The sendLighthouseV2Message response handling in the
chat-store needs two fixes: add a staleness guard before any set() calls so the
block only updates state when sessionId still matches get().activeSessionId, and
reconcile optimistic messages on all non-409 errors. In the post-send
success/error path, use the existing sendMessage/refreshMessages flow around the
sendLighthouseV2Message call to avoid stale updates, and make sure non-409
failures also trigger a refresh or equivalent rollback so the optimistic bubble
does not remain in messages. Keep the existing blockedByConflict behavior for
409, but extend the error handling so every failure path leaves streamState,
feedback, and messages consistent with the active session.

In `@ui/app/`(prowler)/lighthouse/_lib/panel-chat-store.ts:
- Around line 17-29: `getOrCreatePanelChatStore` currently returns the existing
`panelChatStore` even when the incoming `config` changes, so the panel can keep
stale provider/model settings. Update the singleton logic in
`panel-chat-store.ts` to detect when `LighthouseChatConfig` differs from the
cached store config and either recreate the store or add a refresh path that
reapplies the new config. Use the `getOrCreatePanelChatStore` and
`createLighthouseChatStore` flow to ensure later `LighthousePanelChat` renders
always use the latest settings.

In `@ui/components/side-panel/detail-drawer-tab-strip.tsx`:
- Around line 19-23: The lazy-loaded Ask AI chat in LazyLighthousePanelChat is
only wrapped in Suspense, so chunk-load failures can bubble up and take down the
whole drawer/page. Add a local error boundary around the LazyLighthousePanelChat
rendering in DetailDrawerTabStrip (where the Suspense wrapper is used) and
provide a tab-scoped fallback so import() rejections are contained to the Ask AI
tab instead of relying on a higher-level route boundary.

---

Outside diff comments:
In `@ui/app/`(prowler)/lighthouse/_components/panel/index.ts:
- Around line 1-5: The barrel in LighthousePanel’s index is re-exporting
resetPanelChatConfigCacheForTests even though the only known usage imports it
directly from LighthousePanelChat, so this unnecessarily expands the public API
with a test-only helper. Check whether any production or external consumer
imports the helper through this index, and if not, remove the
resetPanelChatConfigCacheForTests export from the index barrel while keeping
LighthousePanelChat exported.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0758af4a-1817-4e2f-837d-fbb0c06ff79c

📥 Commits

Reviewing files that changed from the base of the PR and between 76a2d7b and d88d066.

📒 Files selected for processing (24)
  • ui/app/(prowler)/layout.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/empty-state.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-chat-store-provider.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-page.test.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-page.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-view.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/index.ts
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.test.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.tsx
  • ui/app/(prowler)/lighthouse/_lib/chat-store.test.ts
  • ui/app/(prowler)/lighthouse/_lib/chat-store.ts
  • ui/app/(prowler)/lighthouse/_lib/panel-chat-store.ts
  • ui/app/(prowler)/lighthouse/_lib/testing/event-source-mock.ts
  • ui/components/side-panel/detail-drawer-tab-strip.tsx
  • ui/components/side-panel/global-side-panel.test.tsx
  • ui/components/side-panel/global-side-panel.tsx
  • ui/components/side-panel/index.ts
  • ui/components/side-panel/side-panel-tabs.tsx
  • ui/components/side-panel/side-panel-trigger.tsx
  • ui/components/ui/nav-bar/navbar-client.test.tsx
  • ui/components/ui/nav-bar/navbar-client.tsx
  • ui/lib/ui-layout.ts
  • ui/store/__tests__/side-panel.test.ts
  • ui/store/side-panel.ts

Comment thread ui/app/(prowler)/lighthouse/_lib/chat-store.ts
Comment thread ui/app/(prowler)/lighthouse/_lib/panel-chat-store.ts
Comment thread ui/components/side-panel/detail-drawer-tab-strip.tsx Outdated
Redefine Tailwind's sm..2xl variants as @container queries so content
squeezed by the global side panel adopts its tablet/mobile forms without
the viewport changing. The <body> is the fallback query container for
chrome and portaled overlays. Portal the findings floating mute button to
body so layout containment on <main> no longer captures its fixed position.
Introduce a single non-modal push side panel available from any view: a
navbar trigger opens Lighthouse AI (cloud-only), and finding/resource
detail views register a Details context tab and portal their content into
the same panel, so the AI and the detail share one surface (PostHog-style).
The panel is user-resizable, pushes the page instead of covering it, and is
mutually exclusive with the full-page chat route. Chat state lives in a
store factory whose EventSource survives panel close and navigation.
Cap finding group and standalone titles at a min width, truncate the
overflow with an ellipsis and surface the full name in a tooltip, so rows
stay single-line when the side panel narrows the table.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/app/`(prowler)/lighthouse/_components/chat/empty-state.tsx:
- Around line 65-70: Refactor the heading and subheading className logic in the
empty-state component to use cn() with shared base styles plus the compact-only
size variant, instead of duplicating nearly identical full class strings in each
branch. Update the h1 and the subheading in empty-state.tsx so the base text
color/weight/italic classes stay shared and only the size class changes based on
compact, using the existing cn() helper.

In `@ui/components/findings/table/column-finding-groups.test.tsx`:
- Around line 411-415: The assertion in the table test is too loose and can miss
a broken rendering path because “Fallback IaC Check” is expected twice due to
the inline TooltipContent mock. Update the expectation in
column-finding-groups.test.tsx to use the same getAllByText result from the
current test and assert an exact length of 2 so both the title and tooltip copy
are verified.

In `@ui/components/shadcn/side-panel/side-panel.tsx`:
- Around line 71-105: The SidePanelResizeHandle component only supports pointer
interactions, so keyboard users cannot resize the panel. Update
SidePanelResizeHandle to follow the splitter/separator pattern by making the
separator focusable, exposing the current size via ARIA value attributes, and
handling arrow-key resizing in the same resizing flow used by
handlePointerDown/handlePointerMove/endResize. Keep the existing pointer
behavior intact while adding keyboard support and state updates through
onResize, onResizeStart, and onResizeEnd.

In `@ui/components/side-panel/global-side-panel.tsx`:
- Around line 163-170: The `SidePanelBody` in `GlobalSidePanel` is using an
inline callback ref that changes on every render and causes `contextOutlet` to
be reset, remounting the portaled content and losing state/scroll position.
Update the `ref` on `SidePanelBody` to use the stable `setContextOutlet` action
from `useSidePanelStore` directly instead of wrapping it in a new callback each
render.

In `@ui/components/ui/main-layout/main-layout.tsx`:
- Around line 19-28: The three separate subscriptions in main-layout’s
useSidePanelStore usage should be consolidated into one selector. Update
main-layout so sidePanelOpen, sidePanelWidth, and sidePanelResizing are read
from a single useStore(useSidePanelStore, ...) call instead of three, keeping
the same values but reducing extra mount/update render passes.
- Around line 25-36: The push margin in MainLayout can use a persisted
sidePanelWidth that is no longer valid for the current viewport, causing the
main content to collapse on smaller screens. Update the pushWidth calculation in
main-layout.tsx to reuse clampSidePanelWidth(...) before assigning the width,
while keeping the existing sidePanelOpen, isPushViewport, and pathname checks
intact.

In `@ui/lib/ui-layout.ts`:
- Around line 16-25: clampSidePanelWidth currently assumes viewportCap will
always stay above SIDE_PANEL_MIN_WIDTH, which only holds because of the current
media-query/constant coupling. Update the logic in clampSidePanelWidth to
explicitly enforce the minimum before applying the upper cap, so the returned
width can never fall below SIDE_PANEL_MIN_WIDTH even if window.innerWidth or the
related constants change later.

In `@ui/styles/globals.css`:
- Around line 17-21: The Tailwind v4 `@custom-variant` rules in `globals.css`
are being flagged as invalid by Biome and Stylelint even though they are valid
CSS-first syntax. Update the lint configuration or file-level allowlist to treat
`@custom-variant` and the container-query range syntax as accepted, matching how
`@theme` and `@import "tailwindcss"` are already handled. Use the existing CSS
lint setup and any relevant ignore/allow patterns to prevent false-positive
parse/unknown-at-rule errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 27dbf1ba-9543-435d-92b5-fd8ad3b3cafb

📥 Commits

Reviewing files that changed from the base of the PR and between d88d066 and 0c335ac.

📒 Files selected for processing (29)
  • ui/app/(auth)/layout.tsx
  • ui/app/(prowler)/layout.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/empty-state.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-view.tsx
  • ui/app/(prowler)/lighthouse/_components/navigation/lighthouse-v2-navigation-mode-sync.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat-skeleton.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.tsx
  • ui/components/findings/floating-mute-button.tsx
  • ui/components/findings/table/column-finding-groups.test.tsx
  • ui/components/findings/table/column-finding-groups.tsx
  • ui/components/findings/table/column-standalone-findings.tsx
  • ui/components/findings/table/resource-detail-drawer/resource-detail-drawer.tsx
  • ui/components/resources/resource-details-sheet.tsx
  • ui/components/shadcn/side-panel/side-panel.tsx
  • ui/components/side-panel/detail-side-panel.test.tsx
  • ui/components/side-panel/detail-side-panel.tsx
  • ui/components/side-panel/global-side-panel.test.tsx
  • ui/components/side-panel/global-side-panel.tsx
  • ui/components/side-panel/index.ts
  • ui/components/side-panel/side-panel-tabs.tsx
  • ui/components/side-panel/side-panel-trigger.tsx
  • ui/components/ui/main-layout/main-layout.tsx
  • ui/components/ui/table/data-table.test.tsx
  • ui/components/ui/table/data-table.tsx
  • ui/hooks/use-media-query.ts
  • ui/lib/ui-layout.ts
  • ui/store/__tests__/side-panel.test.ts
  • ui/store/side-panel.ts
  • ui/styles/globals.css

Comment thread ui/app/(prowler)/lighthouse/_components/chat/empty-state.tsx Outdated
Comment thread ui/components/findings/table/column-finding-groups.test.tsx Outdated
Comment thread ui/components/shadcn/side-panel/side-panel.tsx
Comment thread ui/components/side-panel/global-side-panel.tsx Outdated
Comment thread ui/components/layout/main-layout/main-layout.tsx
Comment thread ui/components/layout/main-layout/main-layout.tsx
Comment thread ui/lib/ui-layout.ts
Comment thread ui/styles/globals.css Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/components/side-panel/detail-side-panel.tsx`:
- Around line 43-50: The `useMountEffect` in `detail-side-panel.tsx` stores an
`onRequestClose` callback that can capture a stale `onOpenChange` from the first
render. Update the `DetailSidePanel` registration flow so the stored close
handler always invokes the latest `onOpenChange` (for example via a ref), and
verify the callers in `resource-detail-drawer` and `resource-details-sheet` to
confirm whether they pass stable setters or inline callbacks before deciding if
the fix is required.

In `@ui/components/side-panel/global-side-panel.tsx`:
- Around line 186-197: Add a stable key to SidePanelErrorBoundary so it remounts
when the active tab changes; in global-side-panel.tsx, update the render around
hasBeenOpened and activeRegistryTab to pass key={activeRegistryTab.id} to
SidePanelErrorBoundary, ensuring a previous hasError state does not persist
across tab switches and block the new tab’s SidePanelErrorBoundary/Suspense
content from rendering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 83ffcabb-8a71-48cc-9c92-9f4607b3ac6e

📥 Commits

Reviewing files that changed from the base of the PR and between 0c335ac and 882c8ef.

📒 Files selected for processing (26)
  • ui/app/(prowler)/lighthouse/_components/chat/empty-state.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-page.tsx
  • ui/app/(prowler)/lighthouse/_components/chat/lighthouse-v2-chat-view.tsx
  • ui/app/(prowler)/lighthouse/_components/config/configuration-form.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat-skeleton.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.test.tsx
  • ui/app/(prowler)/lighthouse/_components/panel/lighthouse-panel-chat.tsx
  • ui/app/(prowler)/lighthouse/_lib/chat-store.test.ts
  • ui/app/(prowler)/lighthouse/_lib/chat-store.ts
  • ui/app/(prowler)/lighthouse/_lib/load-chat-config.ts
  • ui/app/(prowler)/lighthouse/_lib/panel-chat-store.ts
  • ui/app/(prowler)/lighthouse/_lib/session-events.ts
  • ui/app/(prowler)/lighthouse/page.tsx
  • ui/components/shadcn/side-panel/side-panel.tsx
  • ui/components/side-panel/detail-side-panel.test.tsx
  • ui/components/side-panel/detail-side-panel.tsx
  • ui/components/side-panel/global-side-panel.test.tsx
  • ui/components/side-panel/global-side-panel.tsx
  • ui/components/side-panel/side-panel-error-boundary.tsx
  • ui/components/side-panel/side-panel-trigger.tsx
  • ui/components/ui/main-layout/main-layout.tsx
  • ui/components/ui/table/data-table.tsx
  • ui/lib/lighthouse-routes.ts
  • ui/lib/ui-layout.ts
  • ui/store/__tests__/side-panel.test.ts
  • ui/store/side-panel.ts
💤 Files with no reviewable changes (1)
  • ui/components/ui/table/data-table.tsx

Comment thread ui/components/side-panel/detail-side-panel.tsx
Comment thread ui/components/side-panel/global-side-panel.tsx Outdated
@github-actions github-actions Bot added the has-conflicts The PR has conflicts that needs to be resolved. label Jul 8, 2026
@github-actions github-actions Bot removed the has-conflicts The PR has conflicts that needs to be resolved. label Jul 10, 2026
@alejandrobailo alejandrobailo self-assigned this Jul 10, 2026
@github-actions github-actions Bot removed the has-conflicts The PR has conflicts that needs to be resolved. label Jul 14, 2026
@github-actions github-actions Bot added the has-conflicts The PR has conflicts that needs to be resolved. label Jul 16, 2026
@github-actions github-actions Bot removed the has-conflicts The PR has conflicts that needs to be resolved. label Jul 16, 2026
@alejandrobailo
alejandrobailo merged commit e0ddc0d into master Jul 16, 2026
41 of 42 checks passed
@alejandrobailo
alejandrobailo deleted the feat/lighthouse-side-panel branch July 16, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ui no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants