[Bug] Import taxonomy wizard: "Continue" button on the Upload step silently no-ops after reopening the wizard with a previously used file
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với src/generic/loading-button/index.tsx và kiểm tra cách callback click theo dõi trạng thái bị vô hiệu hóa, sau đó lần theo việc sử dụng nó từ src/taxonomy/import-tags/ImportTagsWizard.tsx và hành vi cache trong src/taxonomy/data/apiHooks.ts. Tái hiện bằng cách mở lại wizard và chọn cùng một tệp; được xem là hoàn tất khi Continue chuyển sang Populate Taxonomy Information trong mọi lần thử mà không cần tải lại trang.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment: Master Sandbox, https://apps.master.openedx.io/authoring/home
Steps to reproduce
- Studio → Taxonomies → "+ Import".
- Upload any valid CSV/JSON file, click Continue — works, advances to the "Populate Taxonomy Information" step.
- Close the modal without completing the import.
- Reopen "+ Import", upload the same file again.
- Click Continue.
- Repeat step 4-5 on a subsequent reopen with a previously used file.
Expected result
Each time a valid file is uploaded and Continue is clicked on the Upload step, the wizard advances to the "Populate Taxonomy Information" step, regardless of whether that file was already used in an earlier session of the wizard.
Actual result
The first time through, Continue works as expected. On every subsequent reopen of the wizard where a previously used file is uploaded again, clicking Continue does nothing: no step change occurs and no error is shown. The button remains visually enabled. Only a full page reload restores normal behavior.
Observations
- The button appears visually enabled (not disabled).
- No console errors or warnings tied to this click.
- Neither the successful nor the stuck click fires any network request — the Upload→Populate transition is purely client-side (
setCurrentStep('populate')), so the network layer isn't involved.
Likely root cause (established by reading the code, not by a separate live test on the old version)
-
src/generic/loading-button/index.tsx— the click handler:const loadingOnClick = useCallback(async (e) => { if (disabled) { return; } ... }, [componentMounted, onClick]);disabledis missing from theuseCallbackdependency array, so the closure can capture a staledisabledvalue if the component itself isn't recreated. -
src/taxonomy/import-tags/ImportTagsWizard.tsx— the Continue button is rendered through this ternary:{importPlanResult.isLoading ? <LoadingSpinner /> : ( <LoadingButton disabled={!file || importPlanResult.isLoading || !!importPlanResult.error} onClick={reimport ? generatePlan : populateData} /> )}While
isLoadingtransitions fromtruetofalse, React unmounts and remountsLoadingButton, and the closure refreshes correctly — that's why the first attempt always works. -
src/taxonomy/data/apiHooks.ts(useImportPlan) — the react-query cache key is built astaxonomyId + file.name + file.lastModified + file.size. If a later session uploads the same file, the key matches an already-cached entry,isLoadingnever transitions totrueagain, andLoadingButtonnever remounts. The click then keeps hitting thedisabled=truevalue frozen from the earlier render, even though the button looks enabled (its visual state is updated separately, by auseEffectthat does watch the currentdisabled/isLoadingvalues). -
src/index.jsx— theQueryClientis created once for the whole app, so the cache persists for the entire page session, which is why reloading the page fixes the behavior: it clears that cache.
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 33
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openedx/openedx-core
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
openedx/openedx-core#831 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
openedx/openedx-core#843 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BE] Course search: accept ISO 8601 datetimes in the start date filterCó thể đã có người làm @alezconsultant đã nhận 2 ngày trước. Đang mở
openedx/openedx-core#842 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
openedx/openedx-core#841 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
openedx/openedx-core#840 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openedx/openedx-core
Issue tương tự
-
repo-audit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
scverse/repo-health#20 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
/context/prime scope override double-prefixes an entity-ref project and drops its scoped memoriesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
phasespace-labs/palinode#232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
collective/icalendar#1858 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
lfx-mcp cannot supply global variables: LangflowClient drops X-LANGFLOW-GLOBAL-VAR-* from envĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
langflow-ai/langflow#15496 ·
Maintainer thường phản hồi trong vòng 1 ngày