mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4420] [MERGED] OK fix(chat): chat resource drop review follow-ups #6370
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6370
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4420
Author: @Gunterlie
Created: 8/1/2026
Status: ✅ Merged
Merged: 8/1/2026
Merged by: @Gunterlie
Base:
staging← Head:fix/chat-resource-drop-review📝 Commits (3)
52fbf05fix(chat): harden the chat resource assignment event boundary1e63559fix(agents): remove the duplicate drag handle on agent cards5d7750bfix(chat): run both drop entry points through one assignment runner📊 Changes
5 files changed (+26 additions, -28 deletions)
View changed files
📝
packages/client/src/components/chat/ChatArea.tsx(+5 -1)📝
packages/client/src/components/chat/ChatResourceDropOverlay.tsx(+19 -7)📝
packages/client/src/components/panels/AgentsPanel.tsx(+1 -18)📝
packages/client/src/lib/chat-resource-drag.ts(+1 -1)📝
packages/client/src/localization/locales/en.json(+0 -1)📄 Description
Review follow-ups to #4413. Supersedes #4419, which is folded in here.
Why
Unhandled rejection at the event boundary.
applyActionis kicked off from awindowevent listener withvoid ... .finally(...). Its owntry/catchonly wraps the mutations, so a rejection fromshowConfirmDialogor the available-resource lookups escaped as an unhandled rejection and the user saw nothing.Agent handoff was not scoped to a chat. The setup handoff fired regardless of whether the drop's chat was still active. Switching chats between the drop and the metadata write dispatched a request that
ChatAreaacted on for the new chat, opening its settings drawer even thoughtakePendingChatAgentSetupIdshad nothing for it.Two drag handles on agent cards. #4413 added a
TouchDragHandleto agent cards, which already carried their own decorative grip — hover-revealed,[@media(pointer:coarse)]:hidden, no handler. Hovering an agent card on desktop showed both.What
failedtoast, keeping thesetAssigning(false)cleanup infinally.requestChatAgentSetupwhile the drop's chat is still active.chatIdonCHAT_RESOURCE_AGENT_SETUP_EVENTand have theChatArealistener ignore handoffs for other chats.TouchDragHandle, which already covers fine and coarse pointers like the other six library panels. The handle reuses the existingui.panels.agentcard.dragAgentkey, so the duplicate key added in #4413 is dropped.One small behavior difference from that last point: the old grip was hidden in selection mode, the shared handle is not — again matching the other panels.
Skipped from the review
!onTouchStart. The button is removed outright instead, which is less code and matches the other panels.Validation
pnpm checkpnpm localization:checkpnpm regression:chat-resource-dropTest plan
Summary by CodeRabbit
Bug Fixes
UI Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.