Skip to content

fix(task-board): retire a drag override when its card leaves the list - #6950

Closed
pedrofrxncx wants to merge 1 commit into
mainfrom
fix/lanes-overrides-leak-w1
Closed

fix(task-board): retire a drag override when its card leaves the list#6950
pedrofrxncx wants to merge 1 commit into
mainfrom
fix/lanes-overrides-leak-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Bug. Lanes' render-time override-retirement loop (apps/web/src/layouts/task-board/index.tsx) only removes a card's drag-placement override from the overrides Map once the server's copy of that card reports the same status/sortOrder. If the card instead leaves items (the already filter-narrowed visibleItems — deleted, archived, or filtered out by an assignee/project change while the drop's optimistic patch hadn't landed yet), items.find(...) returns undefined, the equality check can never pass, and the override sits in the Map forever. Each such drop leaks one entry for the rest of the session.

Why it matters: on a long-lived board session with routine drags + filter changes, this Map only grows — a real (if slow) memory leak in a component that stays mounted for the life of the tab.

Fix: treat a card missing from items as settled too (nothing left to preview/bridge for it), so its override is dropped in the same retirement pass.

How to verify: bunx tsc --noEmit in apps/web (clean) and bunx oxlint apps/web/src/layouts/task-board/index.tsx (0 warnings/errors) — both run locally. No behavior change for the normal settle path (still requires status+sortOrder match when the card is present); full CI covers the rest.


Summary by cubic

Fixes a memory leak in the task board where drag placement overrides stayed in the overrides Map forever after a card left the visible list (deleted, archived, or filtered out). The retirement pass now treats a missing card as settled, so its override is dropped in the same pass. No behavior change for visible cards; they still require status and sort order to match.

Written for commit bde1035. Summary will update on new commits.

Review in cubic

@pedrofrxncx

Copy link
Copy Markdown
Collaborator Author

Closing as stale: this PR sat past the bot's 48h merge window, main has moved on, and its CI results no longer reflect the current base. This is a housekeeping close, not a rejection of the change — if the underlying problem still exists, the bot will find it again and open a fresh, rebased PR.

[studio-bot:stale-close]

@pedrofrxncx pedrofrxncx closed this Sep 8, 2026
@pedrofrxncx
pedrofrxncx deleted the fix/lanes-overrides-leak-w1 branch September 8, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant