fix(playground): expand session checkbox click target to full row height
Summary
Clicking 8 px above or below the visible session checkbox icon in the playground sidebar triggered the row's toggleVisibility (i.e. navigated to that session) instead of toggling its selection. The checkbox wrapper was w-4 h-4 (16×16 px) sitting inside an h-8 (32 px) row — the 8 px bands above and below the icon were dead zones that bubbled to the row's click handler.
This PR expands the click target to the full row height so any click in the checkbox column toggles selection, no matter the vertical offset.
Test plan
- [x]
cd src/frontend && npm start, open playground for any flow. - [x] Hover a session row → checkbox appears.
- [x] Click at the top edge of the row, directly above the checkbox icon → row does NOT navigate; checkbox toggles.
- [x] Click at the bottom edge of the row, directly below the icon → same: selection toggles, no navigation.
- [x] Click the icon itself → selection toggles (unchanged).
- [x] Click the session name → row navigates (unchanged).
- [ ] Click empty area to the right of the name (before the
⋮) → row navigates (unchanged). - [x] Keyboard: tab through the rows → focus order unchanged (no new tab-stops introduced).
Summary by CodeRabbit
- Style
- Updated the session selector checkbox container height for improved visual proportions.
[!IMPORTANT]
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID:
850710ce-6f15-4799-b987-bf05427c7990You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
Walkthrough
The session selector checkbox container's height is increased from h-4 to h-8 via a single Tailwind class update, expanding the vertical clickable area without altering component logic or layout behavior.
Changes
Session Selector Checkbox Height Update
| Layer / File(s) | Summary |
|---|---|
Checkbox height styling update src/frontend/src/components/core/playgroundComponent/chat-view/chat-header/components/session-selector.tsx |
Checkbox wrapper element increments height from h-4 to h-8 to provide a larger click target. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~1 minute
Possibly related PRs
- langflow-ai/langflow#13313: Aligns playground chat header session-selector and chat-sidebar sizing with coordinated
h-4→h-8height adjustments and padding changes.
Suggested labels
lgtm
Suggested reviewers
- Cristhianzl
[!IMPORTANT]
Pre-merge checks failed
Please resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 3 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Test Coverage For New Implementations | ❌ Error | Bug fix PR lacks regression tests. The code changes h-4 to h-8 for checkbox wrapper to fix click target, but the test file covering this functionality was removed in Commit 2. | Restore or create regression tests for checkbox click target behavior, specifically testing that clicks on wrapper edges toggle selection without navigating. |
| 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. |
| Test Quality And Coverage | ⚠️ Warning | Tests for checkbox click-target expansion were removed. Current tests only validate styling, not the core bug fix preventing unwanted navigation on checkbox clicks. | Restore or add tests covering checkbox wrapper click behavior, event stopPropagation, and clicks at edges toggling selection without navigation. |
| Excessive Mock Usage Warning | ⚠️ Warning | Test has 5 mocks for 4 tests. Child components mocked as divs prevent integration testing of real parent-child interactions and functional behavior. | Render real child components; add behavior tests for event handlers instead of only CSS class assertions. |
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: expanding the session checkbox click target from h-4 to h-8 to cover the full row height, which directly matches the file modification and resolves the reported bug. |
| 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. |
| Test File Naming And Structure | ✅ Passed | Frontend test file follows *.test.tsx naming, uses Jest/React Testing Library with proper setup, mocks, descriptive test names, and covers both positive and negative styling scenarios. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Commit unit tests in branch
fix/playground-checkbox-click-target
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
✅ Test Coverage Advisor
No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
Advisory check only — never blocks merge.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 57.22%. Comparing base (e9514f5) to head (ffc9487).
:warning: Report is 13 commits behind head on release-1.10.0.
Additional details and impacted files
@@ Coverage Diff @@
## release-1.10.0 #13349 +/- ##
==================================================
+ Coverage 56.45% 57.22% +0.76%
==================================================
Files 2208 2268 +60
Lines 209281 216226 +6945
Branches 29701 30487 +786
==================================================
+ Hits 118158 123743 +5585
- Misses 89762 91068 +1306
- Partials 1361 1415 +54
| Flag | Coverage Δ | |
|---|---|---|
| backend | 62.94% <ø> (+1.41%) |
:arrow_up: |
| frontend | 56.86% <100.00%> (+0.60%) |
:arrow_up: |
| lfx | 52.83% <ø> (+0.62%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...t-view/chat-header/components/session-selector.tsx | 78.84% <100.00%> (ø) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.