[PR #880] [MERGED] fix(client): prevent text selection when dragging chat folders #4815

Closed
opened 2026-10-22 04:10:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/880
Author: @ghost
Created: 5/15/2026
Status: ✅ Merged
Merged: 5/15/2026
Merged by: @Romuromylus

Base: staging ← Head: chat_folder_reorder_text_selected


📝 Commits (3)

  • 8f0e803 Merge pull request #874 from Pasta-Devs/staging
  • 6b9637d fix(client): prevent text selection when dragging chat folders
  • bcba3c3 Merge branch 'staging' into chat_folder_reorder_text_selected

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 packages/client/src/components/layout/ChatSidebar.tsx (+4 -1)

📄 Description

Linked issue

Closes #879

Why this change

When reordering chat folders in the sidebar by dragging, the folder name text incorrectly gets selected/highlighted as if the user manually selected the text. This is a usability bug that provides confusing visual feedback during drag operations.

What changed

  • Added e.preventDefault() on the drag handle's onPointerDown event in the FolderRow component to prevent the browser from initiating text selection during folder drag operations

Validation

  • pnpm check passes locally
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode)
  • Above manual verification completed (describe below)

Manual verification notes

  1. Open the chat sidebar
  2. Create or locate multiple chat folders
  3. Click and hold on a folder's drag handle (grip icon)
  4. Drag the folder to a new position (moving upward and downward)
  5. Verified folder name text is not selected during drag
  6. Verified folder name text can still be selected manually when not dragging
  7. Tested with light and dark mode

Docs and release impact

  • No docs changes needed

UI evidence (if applicable)

https://github.com/user-attachments/assets/ece810c5-cf2e-49cc-9829-badbb34e9e0f

Summary by CodeRabbit

  • Bug Fixes
    • Improved folder drag behavior in the chat sidebar to prevent unintended interactions when dragging folders.

Review Change Stack


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/880 **Author:** [@ghost](https://github.com/ghost) **Created:** 5/15/2026 **Status:** ✅ Merged **Merged:** 5/15/2026 **Merged by:** [@Romuromylus](https://github.com/Romuromylus) **Base:** `staging` ← **Head:** `chat_folder_reorder_text_selected` --- ### 📝 Commits (3) - [`8f0e803`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f0e803eec4b6976caec8133c2a1f2cc78d3c67a) Merge pull request #874 from Pasta-Devs/staging - [`6b9637d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6b9637d5afe1b80a51df534b86c2b9fdefea69c5) fix(client): prevent text selection when dragging chat folders - [`bcba3c3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bcba3c358287dc32fb5461ff75590039fc7d04a3) Merge branch 'staging' into chat_folder_reorder_text_selected ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/layout/ChatSidebar.tsx` (+4 -1) </details> ### 📄 Description ## Linked issue Closes #879 ## Why this change When reordering chat folders in the sidebar by dragging, the folder name text incorrectly gets selected/highlighted as if the user manually selected the text. This is a usability bug that provides confusing visual feedback during drag operations. ## What changed - Added `e.preventDefault()` on the drag handle's `onPointerDown` event in the `FolderRow` component to prevent the browser from initiating text selection during folder drag operations ## Validation - [x] `pnpm check` passes locally - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode) - [x] Above manual verification completed (describe below) ### Manual verification notes 1. Open the chat sidebar 2. Create or locate multiple chat folders 3. Click and hold on a folder's drag handle (grip icon) 4. Drag the folder to a new position (moving upward and downward) 5. Verified folder name text is not selected during drag 6. Verified folder name text can still be selected manually when not dragging 7. Tested with light and dark mode ## Docs and release impact - [x] No docs changes needed ## UI evidence (if applicable) https://github.com/user-attachments/assets/ece810c5-cf2e-49cc-9829-badbb34e9e0f <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved folder drag behavior in the chat sidebar to prevent unintended interactions when dragging folders. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/880) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4815
No description provided.