Loyal-Young opened a new pull request, #6069:
URL: https://github.com/apache/rocketmq-dashboard/pull/6069

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6059
   
   ### Brief Description
   
   Clear the previous CSV preview before awaiting the next file's contents. 
Previously the new filename appeared while the old valid rows remained 
importable, so clicking Start import during the read could submit the wrong 
file's rows.
   
   Scope each file read to its selection. Cancellation, a newer selection, and 
unmount invalidate it; stale successes and failures cannot overwrite the 
current preview. Reset the input immediately so the same file can be chosen 
again. Both Topic and Consumer Group imports receive the same fix in this PR.
   
   ### How Did You Test This Change?
   
   - Six new regressions fail before the fix and pass afterward: each page 
covers the loading window, a cancelled read's late success, and its late 
failure.
   - Tests verify that import is disabled while reading and that a later 
successful submission contains only the current file's resource name and 
selected instance.
   - Full TopicPage + ConsumerPage run: **93 passed, 1 failed**. The failure is 
the existing `highlights inconsistent subscriptions and refreshes the check 
result` timing case tracked in #5625.
   - Targeted rerun of import cases plus that subscription case: **11 passed**, 
83 skipped. The previously failing subscription case passes in this smaller 
run; the known real-timer race is outside this change.
   - ESLint on all four changed files, full app TypeScript check (`--noEmit 
--composite false --incremental false`), and `git diff --check`: passed.
   
   ### Checklist
   
   - [x] One coherent fix spanning the two CSV import consumers.
   - [x] Regression test names end in Test.
   - [x] No new UI strings or API contracts.
   - [ ] Backend architecture tests not rerun (frontend-only change).
   
   ### Verification scope
   
   Local tests used snapshot 29fe48abc. The intervening upstream changes 
through 5e4c39b do not change the touched files; the published commit preserves 
that newer upstream tree. PR CI remains the integration check.
   
   ### AI assistance
   
   AI assistance was used to inspect CSV selection and submission, implement 
read ownership, and write deferred-file component tests. The diff and test 
results were reviewed in this contribution session.
   
   


-- 
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