mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8788] [MERGED] fix(client): keep item drags out of their folder and trust only the real host global #8805
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#8805
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/8788
Author: @SpicyMarinara
Created: 11/3/2026
Status: ✅ Merged
Merged: 11/3/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/client-folder-drag-host-global📝 Commits (1)
864ec80fix(client): keep item drags out of their folder and trust only the real host global📊 Changes
4 files changed (+74 additions, -17 deletions)
View changed files
📝
e2e/drag-list-scroll.e2e.ts(+52 -12)📝
e2e/marinara-host-namespace.e2e.ts(+17 -0)📝
packages/client/src/hooks/use-library-folder-drag.ts(+1 -4)📝
packages/client/src/lib/marinara-host.ts(+4 -1)📄 Description
Linked issue
Closes #8787
Why this change
Two problems found in the release-prep audit. (1) #8456 narrowed the folder-drag guard. Since then, pressing a Connection card (Group by folder) or an agent card inside an expanded folder also starts a drag of the folder around it. You see two drag previews, and on drop the folder order changes and Connections switches to Custom sort, which the user never asked for. (2) ensureMarinaraHost accepted any truthy globalThis.MARINARA_HOST. Chat and card HTML keep element ids, and the browser exposes an element's id as a named property of window. So a crafted
<div id=\"__MARINARA_HOST__\">on screen when the first package client loads gets cached as the host, and package clients fail until reload. No linked issue exists yet; one should be opened before the PR is submitted.What changed
__MARINARA_HOST__is on the page, for example from chat or card HTML.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run checks (for reference; each regression was shown to fail without its fix):
node ./scripts/pnpm-runner.mjs build:shared: exit 0playwright test e2e/drag-list-scroll.e2e.ts e2e/marinara-host-namespace.e2e.ts --grep "connection cards sort|does not stand in" --workers=1 (all projects, custo: 3 passed, 2 skipped, 1 failed. The new host test passed on desktop-chromium; the other projects skip it by design. The connection test passed on desktop-chromium and mobile-chromium. It failed on mobiSame command with the two source files stashed (fail-before): 4 failed, 2 skipped. desktop-chromium and mobile-chromium failed at the new check, drag-list-scroll.e2e.ts:641 (folder A had data-drag-source="true"). The host test failed with version null instead ofClean staging (all changes stashed): playwright mobile-webkit, connection cards sort test: Fails at line 548 the same way, so the mobile-webkit failure already exists on staging and is unrelated to this change.playwright test drag-list-scroll, marinara-host-namespace, handleless-library-drag, agent-apps-category, sprite-library --project=desktop-chromium --project=mob: 34 passed, 6 skipped, 4 failed. The failures were 'standalone apps get their own group...' (agent-apps-category:115, Apps card not found) and 'connection row picks up without a handle...' (handleless-Clean staging (all changes stashed): those two failing tests on desktop-chromium: Both fail the same way on clean staging, so they also existed before this change and are unrelated.packages/client: eslint src/hooks/use-library-folder-drag.ts src/lib/marinara-host.ts: exit 0packages/client: tsc --noEmit -p tsconfig.json: exit 0tsc -p scripts/regressions/tsconfig.client-lanes.json (second half of the client lint script): exit 0node ./scripts/pnpm-runner.mjs check:e2e-types: exit 0prettier --write, then prettier --check on the 4 changed files: All files use Prettier stylenode ./scripts/run-regressions.mjs --filter marinara-host-namespace / command-center / connection-groups / capability-integrations: Each 1/1 passedIndependent adversarial review: approve.
Known limits and risks:
Low. The folder guard is now exactly main's version, which every other caller (Chats, Characters, Sprites, Lorebooks, Personas, Presets, Backgrounds, Agents) used before #8456. The host change only changes behaviour when the global is not an own property. Failures that already happen on clean staging and are not caused by this change: the connection-folder e2e on mobile-webkit (line 548, the test's first card drag), agent-apps-category 'standalone apps get their own group' (Apps card not found), and handleless-library-drag 'connection row picks up without a handle' (selector [data-touch-drag-card="connection"] not found), the last two on desktop- and mobile-chromium. I did not do the relayed user request about Otome Hearth (outfit shown to a love interest should give +5 affection instead of +20). It was outside this step's assigned findings and worktree, and this repo has no outfit-affection rule. Per AGENTS.md, Otome Hearth (otome-forge) is a downloadable package, so the change belongs in Pasta-Devs/Marinara-Agents and still needs to be made there.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.