Repository navigation
fix(platform): keep hidden picks when clearing the Microsoft header box - #5082
Closed
tale-code-bot wants to merge 2 commits into
Closed
tale-code-bot wants to merge 2 commits into
tale-code-bot wants to merge 2 commits into
Conversation
Move the Google Drive picker's header-box handlers into onedrive-import/visible-selection.ts, beside the table and types the pickers already share, so the Microsoft 365 picker can follow the same rule, under which the box speaks for the rows on screen alone. Google's behaviour is unchanged; a component test now holds it (a file selected before a search survives clearing the box and is imported).
On the OneDrive and SharePoint tabs, checking the file table's header box added only the rows the search shows, but clearing it emptied the whole selection. A file selected before the search was dropped unseen and Import fell to 0. Both tabs now use the pickers' shared rule, so clearing the box removes the rows on screen alone, as a row's own box and the Google Drive picker always did. A component test on each tab locks it.
tale-review-bot
approved these changes
Oct 29, 2026
tale-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
Approve at 77752709b3612ad396b127afab1b666d9773df03 (task TALE-42, Closes #3921).
- Scope matches the triage's "done means" and the plan.
fb5ffbd6(refactor(platform)) moves Google Drive's header-box rule intoonedrive-import/visible-selection.ts, unchanged:visibleSelectionStateandtoggleVisibleSelection.77752709(fix(platform)) makes both Microsoft tabs use that rule. The olddeselectAll(setSelectedItems(new Map())) is gone, so clearing the header removes only the rows on screen.- The deliberate full resets and the row handlers are untouched.
- Correctness.
- The shared functions are line for line the Google logic they replace.
- The one behavioural difference for Microsoft, a mixed (
'indeterminate') value now clearing instead of selecting, is unreachable by a click. Radix's checkbox turns a click on a mixed box intotrue, as the plan checked in@radix-ui/react-checkbox1.3.3. OneDrivePickerStageandOneDriveFileTableonly pass the two handlers through, with unchanged signatures.
- Tests.
- There is a regression test per tab (OneDrive and SharePoint): check Alpha, search Bravo, check then clear the header, clear the search. Alpha stays checked, and the import sends Alpha alone.
- The SHA-anchored
regression-proof.logshows both cases failing at:484(Alpha.txtnot checked) with the dialog fromfb5ffbd6, and passing on the clean head. - A Google flow test holds the refactor, and the module has unit tests.
- Contract.
- Branch
fix/microsoft-picker-search-deselect, offmain9be5cadac. - Commit headers are 71 and 65 characters, and the PR title is 71 (commitlint-shaped, squash).
- One row is added to
tests/manual/reference/automation.md. - No strings, locales, docs, API or backend change is owed.
- Branch
- Security: no secret, permission, dependency or workflow change.
- Required checks at this head: all seven
CI ready (...)contexts passed. The runs are Commitlint 40917635790, SAST 40917636046, Security 40917636023, CLI 40917636061, E2E 40917635988, Build 40917636171 and Checks 40917636173. - Not run by me: the UI test files. They are queue-only in CI; the Coder ran the 8 cloud-picker files locally (164 passed), and the merge queue's UI check runs them again.
tale-review-bot
added this pull request to the merge queue
Oct 29, 2026
yannickmonney
removed this pull request from the merge queue due to a manual request
Oct 29, 2026
tale-review-bot
enabled auto-merge (squash)
October 29, 2026 20:19
tale-review-bot
disabled auto-merge
October 29, 2026 20:27
Collaborator
|
Reviewer: not landing yet. The approved head
|
Contributor
|
Reopened so the checks run again. The 20:13–20:15 UTC reopen started its runs from a test merge into |
Contributor
|
Landed on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the Microsoft 365 import dialog (the OneDrive and SharePoint tabs), checking the file table's header box (Select all) added only the rows the search shows, but clearing it emptied the whole selection. A file selected before the search was dropped unseen, and Import (n) fell to 0.
The Google Drive picker already removed only the rows on screen. Its two header-box handlers now live in
onedrive-import/visible-selection.ts, next to the table and types both pickers already share, and both dialogs use them. Clearing the box now removes only the rows on screen on every tab, the same as a row's own checkbox.onedrive-import-dialog.tsx'sdeselectAll()ransetSelectedItems(new Map()), whileselectAllVisible()and the header state counted onlyfilteredItems(the active tab's rows, narrowed by the search).@radix-ui/react-checkbox1.3.3) reports it astrue, so it selects the rest of the rows on screen. That was already Google's rule.refactor(platform): share the cloud pickers' header-box selection(no behaviour change; a Google component test now locks the behaviour), thenfix(platform): keep hidden picks when clearing the Microsoft header box.Closes #3921
Checklist
bun run check: not run in full locally. The sandbox host refused a heavy-phase lease for the whole-platform typecheck, type-aware lint and knip because it was under load (2026-10-29, around 12:00 and 17:00 UTC). CI's fast tier runs them. What ran locally at77752709b3612ad396b127afab1b666d9773df03, on a clean tree:oxfmt --checkon the changed filesoxlint(not type-aware) on the 6 changed source and test files: 0 warnings, 0 errorstsc --noEmit --stricton the new module and its unit test alonebun run lint:manual,commitlinton both commits and on this title, and the conflict-marker check on the changed filesbun run lint:sast: not run locally. Opengrep is not cached on the worker, and the commit hook skipped it. CI's SAST job runs it.docs/{en,de,fr}/platform/knowledge/documents.md("Import from Microsoft 365 or Google Drive") says to select files or folders. It does not describe the header box or the search, and the fix makes the Microsoft box behave as the Google Drive box already did.README.md/README.de.md/README.fr.md: N/A. No setup, environment variable or command changed.Test plan
Regression, both Microsoft tabs:
onedrive-import-dialog.test.tsx›keeps a {onedrive,sharepoint} file selected before a search when the header box is cleared.expect(fileBox('Alpha.txt')).toBeChecked().Google Drive: the same flow in
google-drive-import-dialog.test.tsx. The behaviour is unchanged and is now locked.Unit:
onedrive-import/visible-selection.test.ts, 7 cases:Command:
cd services/platform && bunx vitest --run --config vitest.ui.config.tson these files:google-drive-import-dialog,onedrive-import-dialog,onedrive-import/visible-selection,onedrive-import/onedrive-file-table,cloud-import-dialogs.{import-outcome,lapsed-session,listing-failure}andcloud-import-connect-dialog.app-status. Result: 8 files, 164 tests passed.Manual check:
The first file stays checked, and Import (1) stays enabled.
Not tested:
cloud-picker-accent.browser.test.tsxcovers the picker's accent colours, not selection, and no Chromium is cached on the workerThe merge queue runs UI and Browser.