Update dataset editor file browser modal to use spx theme css#292
Update dataset editor file browser modal to use spx theme css#292klpoland wants to merge 7 commits into
Conversation
Changed Files
|
a430e87 to
8e6ebdb
Compare
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a4a87c7. Configure here.
| handleSelectAllFiles(checked) { | ||
| const checkboxes = document.querySelectorAll( | ||
| '#file-tree-table input[name="files"]', | ||
| '#file-tree-root input[name="files"]', |
There was a problem hiding this comment.
Modal selection still expects table
High Severity
The file browser's structure changed to li elements, but handleModalFileSelection and getFileDataFromRow still expect tr and td elements. This mismatch causes getFileDataFromRow to throw an error when processing file selections, including 'select all', breaking file selection in dataset creation.
Reviewed by Cursor Bugbot for commit a4a87c7. Configure here.
| datasetForm.addEventListener("keypress", (e) => { | ||
| if (e.key === "Enter") { | ||
| e.preventDefault() | ||
| } |
There was a problem hiding this comment.
Enter guard blocks textarea lines
Medium Severity
The new datasetForm keypress handler calls preventDefault on every Enter key, including Enter pressed inside multiline fields such as the dataset description, so users cannot insert new lines while editing.
Reviewed by Cursor Bugbot for commit a4a87c7. Configure here.
| if (expandable) { | ||
| toggle.textContent = isExpanded ? "▶" : "▼" | ||
| li.appendChild(rowSpan) | ||
| li.appendChild(childUl) |
There was a problem hiding this comment.
Expanded folders stay hidden
High Severity
Folder rows set aria-expanded on the li and nest child lists as li > ul, but theme CSS hides every .file-browser li > ul and only shows ul as a sibling of [aria-expanded="true"]. Nested lists never become visible, so expanding folders in the modal does not reveal files or subfolders.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a4a87c7. Configure here.


Note
Medium Risk
Large front-end change to dataset file picking (selection state, folder bulk select, and DOM structure); regression risk in create/edit flows, though API auth test change is low risk.
Overview
Replaces the dataset file browser modal table (
#file-tree-table) with a SpectrumX.file-browser-modaltree (#file-tree-root), including new theme CSS for click-to-select rows, visually hidden checkboxes, and folder expand/collapse.AssetSearchHandlernow builds the tree with DOM APIs (not HTML strings), adds folder selection mode (toggle to select/deselect all selectable files under a folder), Clear selections, guarded one-time event binding, and Enter-key handling on file search. Call sites (PageLifecycleManager, create/edit handlers) point at#file-tree-root; edit mode blocks accidental form submit on Enter.The
file_browser.htmlpartial gains folder-mode controls and help text. Minor test fix: unauthenticated dataset-files test uses a freshAPIClientinstead offorce_authenticate(None). Cursor rules document preferring safe DOM construction for user-controlled text.Reviewed by Cursor Bugbot for commit a4a87c7. Bugbot is set up for automated code reviews on this repo. Configure here.