Skip to content

Regression test: driveMimeType state doesn't leak across Dropbox/local paths #2314

@aalemayhu

Description

@aalemayhu

Context

Shipped in #2311. `UploadForm.tsx` adds a `driveMimeType` state to drive the Doc-aware empty-deck copy. It defaults to `null` and is set inside the Google Drive picker flow.

The risk

`driveMimeType` is not reset in the Dropbox or local-upload paths. If a user picks a Google Doc → cancels mid-conversion → uploads a Notion zip in the same session, the stale `driveMimeType` could theoretically fire the Doc-specific empty-state copy on a Notion failure.

Engineer asserted in #2311 that the Notion empty-state path doesn't read `driveMimeType`, so the bug is latent. Worth a regression test before the assumption rots.

What to do

Add a vitest case in `UploadForm.test.tsx` that:

  1. Sets active source to "google_drive" and picks a Doc
  2. Switches to the local panel
  3. Triggers a Notion empty-deck state
  4. Asserts the empty-deck copy is the Notion copy, not the Doc copy

If the test fails, reset `driveMimeType` to `null` in `resetForm` and on tab switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions