zmuxuny opened a new issue, #4489:
URL: https://github.com/apache/rocketmq-dashboard/issues/4489

   ## Problem
   
   The Topic page no longer resets instance-scoped mutation state when the 
selected managed instance changes. A Topic edit opened on instance A stays 
mounted after switching the page selector to instance B, while `handleCreate` 
resolves the write target from the *current* `selectedInstanceId`.
   
   Deterministic reproduction on current `master` 
(`987b748e8f4f421c5cd3c4c4e51a064cc7e59f18`):
   
   1. Select instance A and open **Configure** for `topic-a`.
   2. Leave the edit dialog open and switch the page selector to instance B.
   3. Instance B's inventory loads, but the `Edit Topic` dialog still contains 
A's values.
   4. Saving now builds `updateTopic({...values, instanceId: 
selectedInstanceId})`, so the stale A form is submitted against B. If B has the 
same topic name, this can silently modify the wrong Broker-side Topic 
configuration.
   
   The same component also owns send-message, import, sync-to-Broker, detail 
and selection state, so stale instance-scoped targets can survive the same 
selector boundary.
   
   ## Regression history
   
   This lifecycle boundary was previously tracked in #1720 and implemented by 
#1722, then consolidated into merged PR #2308 using an instance-keyed Topic 
content component. Current `master` no longer has that keyed remount, so this 
is a regression of previously merged behavior rather than a new design.
   
   ## Expected behavior
   
   Changing the selected instance invalidates all Topic-page state derived from 
the previous instance before the new inventory becomes actionable. An 
edit/send/sync target from A must never be reusable while B is selected.
   
   ## Test evidence
   
   A red-first Vitest regression opens A's edit dialog, switches to B, waits 
for `topic-b`, and requires the old `Edit Topic` dialog to be gone. On the 
unmodified baseline it fails because the dialog remains mounted. Restoring the 
instance-keyed Topic content remount makes the same test pass.
   
   ## Proposed scope
   
   Restore the instance-keyed Topic content boundary only; do not change Topic 
APIs or Broker semantics. This matches the pattern already used by the Consumer 
and ACL pages.
   
   AI-assisted analysis and regression authoring; red/green test executed 
locally against the current `master` baseline.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to