Skip to content

Google Drive folder selections follow the connected account - #1502

Merged
WaylandYang merged 2 commits into
deeplethe:devfrom
Maya-Kid:codex/reset-drive-folder-draft-on-account-change
Nov 16, 2026
Merged

WaylandYang merged 2 commits into
deeplethe:devfrom
Maya-Kid:codex/reset-drive-folder-draft-on-account-change

Conversation

@Maya-Kid

Copy link
Copy Markdown
Contributor

Why

Switching Google accounts in an open Drive settings dialog clears the saved folders on the server. The dialog keeps the old account's local selection. Clicking Save folders and sync can then write those old folder IDs back. Disconnecting and reconnecting with the dialog still open has the same problem.

What changes

Keep unsaved selections with the verified account that owns them. A different account or a disconnect discards that draft and uses the current source configuration. Reconnecting to the same verified account preserves unsaved selections. The folder browser starts at the root of a new connection, and the save button is unavailable while the dialog is changing the connection.

How it was checked

  • Linux Chromium 145 with mocked Drive and source APIs. Both account switch and disconnect/reconnect regressions failed against dev (f33f9fc9). All three scenarios passed on ec2fe1d2, including source refresh and reconnect with the same verified email. The tests check folder queries and the exact payload sent by Save.
  • Linux Node 20. All 342 Vitest tests, the bench helper tests, and the web production build passed.

Before review

  • The commit is signed off (git commit -s).
  • Web build and tests pass.

Signed-off-by: Maya Kid <BinjunYann@gmail.com>

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — account identity mirrors same_account on the server. Merging.

@WaylandYang
WaylandYang merged commit 7ed7fcb into deeplethe:dev Nov 16, 2026
6 checks passed
@Maya-Kid
Maya-Kid deleted the codex/reset-drive-folder-draft-on-account-change branch November 29, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants