Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/components/studio/right-panel-close-button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { X } from 'lucide-react'

export const CLOSE_PANEL_LABEL = 'Close panel'

export const PanelCloseButton = ({ onClose }: { onClose: () => void }) => (
export const PanelCloseButton = ({

Check warning on line 5 in src/components/studio/right-panel-close-button.tsx

View check run for this annotation

nexus-check / GitNexus

PanelCloseButton signature changed — callers not verified

`PanelCloseButton` changed its signature (a destructured parameter changed; compatibility: uncertain). **Unverified** — no call site was confirmed to break: GitNexus could not decide whether this change is compatible with existing callers. Before: `export const PanelCloseButton = ({ onClose }: { onClose: () => void }) => (` After: `export const PanelCloseButton = ({ onClose, title = CLOSE_PANEL_LABEL, }: { onClose: () => void title?: string }) => (` Files the indexed graph records as calling it: ``, `s`. _Dependents come from the indexed base-branch graph; check whether they still match the new signature._

Check warning on line 5 in src/components/studio/right-panel-close-button.tsx

View check run for this annotation

nexus-check / GitNexus

PanelCloseButton signature changed — callers not verified

`PanelCloseButton` changed its signature (a destructured parameter changed; compatibility: uncertain). **Unverified** — no call site was confirmed to break: GitNexus could not decide whether this change is compatible with existing callers. Before: `export const PanelCloseButton = ({ onClose }: { onClose: () => void }) => (` After: `export const PanelCloseButton = ({ onClose, title = CLOSE_PANEL_LABEL, }: { onClose: () => void title?: string }) => (` Files the indexed graph records as calling it: ``, `s`. _Dependents come from the indexed base-branch graph; check whether they still match the new signature._

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning — PanelCloseButton signature changed — callers not verified

PanelCloseButton changed its signature (a destructured parameter changed; compatibility: uncertain). Unverified — no call site was confirmed to break: GitNexus could not decide whether this change is compatible with existing callers.

Before: export const PanelCloseButton = ({ onClose }: { onClose: () => void }) => (
After: export const PanelCloseButton = ({ onClose, title = CLOSE_PANEL_LABEL, }: { onClose: () => void title?: string }) => (

Files the indexed graph records as calling it: ``, s.

Dependents come from the indexed base-branch graph; check whether they still match the new signature.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/studio/right-panel-close-button.tsx, line 5:

<comment>'PanelCloseButton' changed its signature (a destructured parameter changed; compatibility: uncertain). **Unverified** — no call site was confirmed to break: GitNexus could not decide whether this change is compatible with existing callers. Before: 'export const PanelCloseButton = ({ onClose }: { onClose: () => void }) => (' After: 'export const PanelCloseButton = ({ onClose, title = CLOSE_PANEL_LABEL, }: { onClose: () => void title?: string }) => (' Files the indexed graph records as calling it: ', 's'. _Dependents come from the indexed base-branch graph; check whether they still match the new</comment>

<context>Enclosing symbol: PanelCloseButton.</context>

Why this matters: GitNexus proved this from your code graph — a caller or contract relies on what changed here. · contract-drift

onClose,
title = CLOSE_PANEL_LABEL,
}: {
onClose: () => void
title?: string
}) => (
<button

Check notice on line 12 in src/components/studio/right-panel-close-button.tsx

View check run for this annotation

nexus-check / GitNexus

Changed symbol: PanelCloseButton

`PanelCloseButton` (Function) is directly changed by this PR. PR-wide downstream impact: 3 direct dependent(s), 2 indirect. See the check summary for the impacted-file breakdown.

Check notice on line 12 in src/components/studio/right-panel-close-button.tsx

View check run for this annotation

nexus-check / GitNexus

Changed symbol: PanelCloseButton

`PanelCloseButton` (Function) is directly changed by this PR. PR-wide downstream impact: 3 direct dependent(s), 2 indirect. See the check summary for the impacted-file breakdown.
onClick={onClose}
className="flex min-h-[44px] min-w-[44px] items-center justify-center text-ink-faint transition-colors hover:text-ink focus-ring"
title={title}
aria-label={CLOSE_PANEL_LABEL}
>
<X className="h-4 w-4" />
Expand Down
5 changes: 4 additions & 1 deletion src/components/studio/right-panel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ describe('RightPanel', () => {
it('closes SearchPanel via its close button', () => {
rightPanelOpen = true
render(<RightPanel />)
fireEvent.click(screen.getByRole('button', { name: 'Close panel' }))
const closeBtn = screen.getByRole('button', { name: 'Close panel' })
expect(closeBtn.getAttribute('title')).toBe('Close panel')
expect(closeBtn.getAttribute('aria-label')).toBe('Close panel')
fireEvent.click(closeBtn)
expect(mockSetRightPanelOpen).toHaveBeenCalledWith(false)
})

Expand Down
Loading