Repository navigation
fix(org-workbench): align card actions with selected employee (#420) - #421
Merged
Merged
Conversation
Stale-while-revalidate (#413) may keep A's PositionCard on screen after selectedId is already B. Edit/dismiss now bind only when card.data.id matches selectedId, so the dismiss dialog cannot name A and delete B. task_ref: #420 verify: - node scripts/run-renderer-tests.mjs apps/desktop/renderer/test/App.test.tsx - 88 passed, 0 failed
waterbro-8
approved these changes
Sep 21, 2026
waterbro-8
left a comment
Collaborator
There was a problem hiding this comment.
Code review APPROVE (not product 验收), head 174d1eb54374ed1612bd800bfe6c4860b408f6f1.
对照 roleweave #420:#413 SWR 仍用 card.data 画岗位卡,mutating 的 编辑 / 裁撤改走 actionPosition = card.data?.id === selectedId ? card.data : null,dismiss/edit 都绑 actionPosition.id。A→B 在途窗口不会再出现「弹窗写 A、orgApply 删 B」。#413 的 skeleton/thread 行为没动。
测试覆盖 issue repro(hold B 的 position()、裁撤键不出现、B 到达后确认删 docs-writer)。CI 11/11 green。
非产品验收。不自动合。胡奕舟 can merge.
8 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #420: switching employees no longer lets the stale
PositionCardname A while edit/dismiss fire B.#417 / #413 keep the previous card on screen while
position()is in flight. That is the right visual behavior. The header actions mixedcard.data(A) withselectedId(B), so the dismiss dialog could show A's name and delete B.What changed
card.data.id === selectedId.actionPosition.id, not a mismatchedselectedId.Tests
#420 does not dismiss B under A's name while B's position fetch is in flight#413switch tests and the dismiss+restore IPC test still pass.node scripts/run-renderer-tests.mjs apps/desktop/renderer/test/App.test.tsx→ 88 passed, 0 failed.Acceptance (#420)
orgApplydeletes BI am not merging. Please review current head.