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 8 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 cbee2db. Configure here.
| } | ||
|
|
||
| this.updateSelectAllCheckboxState() | ||
| this.updateSelectedFilesList() |
There was a problem hiding this comment.
Clear selections wipes confirmed files
High Severity
In dataset create mode, clicking "Clear selections" in the file tree modal incorrectly removes newly selected files from the main form's selection. This happens because updateSelectedFilesList is called, overwriting formHandler.selectedFiles with the modal's temporary state, discarding new choices made before the modal was opened.
Reviewed by Cursor Bugbot for commit cbee2db. Configure here.
| }) | ||
| this.syncFileCheckboxVisual(file.id, true) | ||
| } | ||
| } |
There was a problem hiding this comment.
Folder select desyncs modal state
Medium Severity
Folder selection mode updates the search handler map and checkbox visuals via toggleDirectorySelection / syncFileCheckboxVisual without firing checkbox change events, so DatasetCreationHandler.modalSelectedFiles is not updated. On Confirm, the handler still merges modalSelectedFiles into the main set, which can re-add files that were deselected in folder mode or omit folder-only picks depending on handler order.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cbee2db. Configure here.
| } | ||
|
|
||
| this.updateSelectAllCheckboxState() | ||
| this.updateSelectedFilesList() |
There was a problem hiding this comment.
Clear leaves stale modal set
Medium Severity
clearModalFileSelections resets checkboxes and the search handler map but never clears DatasetCreationHandler.modalSelectedFiles. On Confirm Selection, the creation handler still merges that set into selectedFiles, so files the user cleared in the UI can be added back after confirm.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cbee2db. Configure here.


Note
Medium Risk
Large front-end change to dataset create/edit file selection (DOM rendering, folder bulk select, and form Enter handling); backend impact is limited to a test fix.
Overview
Replaces the dataset editor file browser modal table (
#file-tree-table) with a SpectrumX-themed accessible tree (#file-tree-rootinside.file-browser-modal), including new modal controls and styling.UI & markup:
file_browser.htmldrops the striped table for arole="tree"list, adds Select folders mode, Clear selections, and help text.spectrumx_theme.cssadds modal-specific row/hover/selection styles, visually hidden checkboxes, and folder expand chevrons when folder mode is on;components.cssretargets the scroll container to#file-tree-root.Behavior (
AssetSearchHandler):renderFileTreenow builds folders/files with DOM APIs andtextContentinstead of HTML strings; supports keyboard activation, click-to-select rows, lazy folder expand, bulk folder selection (all descendant files),getFileSelectionDataByIdfor metadata/relative_path, and guards against duplicate event binding. Empty states no longer callrender-htmlfor table rows.Wiring: Create/edit handlers,
PageLifecycleManager, and tests switch selectors from#file-tree-tableto#file-tree-root; creation modal file metadata comes from the search handler/tree when possible. Edit mode blocks accidental submit on Enter (except textareas).Other: Cursor rule documents prefer programmatic DOM over JS template literals for user data. API test uses a fresh unauthenticated
APIClientinstead offorce_authenticate(None).Reviewed by Cursor Bugbot for commit cbee2db. Bugbot is set up for automated code reviews on this repo. Configure here.