Skip to content

Fix side panel closing issue when clicking inside the panel content area#1016

Merged
egorikftp merged 1 commit into
mainfrom
bug/idea/side_panel
Jun 5, 2026
Merged

Fix side panel closing issue when clicking inside the panel content area#1016
egorikftp merged 1 commit into
mainfrom
bug/idea/side_panel

Conversation

@egorikftp

@egorikftp egorikftp commented Jun 5, 2026

Copy link
Copy Markdown
Member

📝 Changelog

If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs:

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Worried about impact? Review this PR in Change Stack to explore blast radius before you approve or request changes.

Review Change Stack

Walkthrough

This PR fixes an issue where the Web Import side panel in the IntelliJ plugin would close when clicking inside the panel's content area. The fix adds pointer input event handling to the side panel's Compose modifier chain, specifically by appending a pointerInput(Unit) {} block after the background modifier. The changelog is updated to document this fix in the Unreleased section.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: fixing the side panel closing issue when clicking inside the panel content area.
Description check ✅ Passed The pull request description includes the required changelog checklist template with the IntelliJ Plugin checkbox marked as completed, matching the actual changes made to CHANGELOG.md.
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.

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

✨ 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 bug/idea/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 and usage tips.

@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.

🧹 Nitpick comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt (1)

60-61: ⚡ Quick win

Replace empty pointerInput(Unit) {} with an explicit tap/consume handler

In tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt (around line 61), the interception relies on a no-op handler:

.background(JewelTheme.overlay)
.pointerInput(Unit) {},

A repo-wide search shows this is the only occurrence of an empty pointerInput(Unit) {} pattern, so the intent is hard to reason about; use detectTapGestures(onTap = {}) (or another explicit consume/intercept approach) instead to make the behavior self-documenting.

🤖 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
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt`
around lines 60 - 61, Replace the no-op pointerInput(Unit) {} in the SidePanel
modifier chain with an explicit tap-consume handler so the interception intent
is clear: change the Modifier that currently ends with
.background(JewelTheme.overlay).pointerInput(Unit) {} to use pointerInput with
detectTapGestures(onTap = {}) (or an equivalent explicit consume gesture
detector) to consume taps; import
androidx.compose.foundation.gestures.detectTapGestures and call
detectTapGestures inside the pointerInput scope to make the behavior
self-documenting (refer to the pointerInput(Unit) {} occurrence in SidePanel.kt
and the surrounding Modifier chain).
🤖 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.

Nitpick comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt`:
- Around line 60-61: Replace the no-op pointerInput(Unit) {} in the SidePanel
modifier chain with an explicit tap-consume handler so the interception intent
is clear: change the Modifier that currently ends with
.background(JewelTheme.overlay).pointerInput(Unit) {} to use pointerInput with
detectTapGestures(onTap = {}) (or an equivalent explicit consume gesture
detector) to consume taps; import
androidx.compose.foundation.gestures.detectTapGestures and call
detectTapGestures inside the pointerInput scope to make the behavior
self-documenting (refer to the pointerInput(Unit) {} occurrence in SidePanel.kt
and the surrounding Modifier chain).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ee95bec7-b012-4ee9-9359-f67a7f46755f

📥 Commits

Reviewing files that changed from the base of the PR and between 4ffa681 and 9c89077.

📒 Files selected for processing (2)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt

@egorikftp egorikftp merged commit 531f582 into main Jun 5, 2026
5 checks passed
@egorikftp egorikftp deleted the bug/idea/side_panel branch June 5, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant