Skip to content

fix(dashboard): prevent stale evolution proposals after employee switch - #201

Open
yuzhiyang1 wants to merge 1 commit into
OpenBMB:mainfrom
yuzhiyang1:codex/fix-evolution-agent-switch
Open

fix(dashboard): prevent stale evolution proposals after employee switch#201
yuzhiyang1 wants to merge 1 commit into
OpenBMB:mainfrom
yuzhiyang1:codex/fix-evolution-agent-switch

Conversation

@yuzhiyang1

Copy link
Copy Markdown

Summary

  • keep evolution proposals scoped to the currently selected employee before rendering
  • invalidate superseded loads so an older employee response cannot overwrite the current employee data
  • add regression coverage for both the loading-window leak and out-of-order response race
  • fix the dashboard test mock so the evolution endpoint returns the correct response shape

Reproduction

  1. Open employee A and wait for its evolution proposals to load.
  2. Switch to employee B while B's proposal request is still pending.
  3. Employee A's proposals remain visible and actionable during the load.
  4. With overlapping requests, a late response for employee A can overwrite employee B's already loaded proposals.

Because proposal actions are issued by proposal ID, stale rows could lead an administrator to act on the previous employee's proposal from the current employee view.

Validation

  • npm test — 46 test files, 202 tests passed
  • npm run build
  • npm run i18n:check
  • npm run config:check

@yuzhiyang1
yuzhiyang1 marked this pull request as ready for review August 21, 2026 05:21
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