Skip to content

[_] bugfix/ fix workspace folder reload - #2084

Open
TamaraFinogina wants to merge 2 commits into
masterfrom
fix_workspace_folder_reload
Open

[_] bugfix/ fix workspace folder reload#2084
TamaraFinogina wants to merge 2 commits into
masterfrom
fix_workspace_folder_reload

Conversation

@TamaraFinogina

@TamaraFinogina TamaraFinogina commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Reloading the page while being inside a folder in a business workspace was showing fetch folder errors and temporarily showed individual workspace folders.

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Navigate to a folder in a business workspace and do reload, then go back to the workspace.

Additional Notes

P.S. Still way too many requests for the server, not sure why

@TamaraFinogina TamaraFinogina self-assigned this Jul 30, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6442872
Status: ✅  Deploy successful!
Preview URL: https://3b019a05.drive-web.pages.dev
Branch Preview URL: https://fix-workspace-folder-reload.drive-web.pages.dev

View logs

@TamaraFinogina
TamaraFinogina marked this pull request as ready for review July 30, 2026 17:05
@TamaraFinogina TamaraFinogina changed the title Bugfix: fix workspace folder reload [_] bugfix/ fix workspace folder reload Jul 30, 2026
Comment on lines 122 to 124
await dispatch(fetchWorkspaces());
}
const workspace = state.workspaces.workspaces.find((workspace) => workspace.workspace.id === workspaceId);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would say that this state will not be up to date after the fetch, as the state was retrieved earlier. You should use getState instead of the state retrieved previously.
Add tests to detect this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? This if should be accessed only if the first fetch workspace is in progress to prevent null/underfined workspace id

Comment on lines +202 to +208
{isDriveContextReady ? (
<DriveExplorer title={<BreadcrumbsDriveView namePath={namePath} />} isLoading={isLoading} items={items} />
) : (
<div className="flex h-full w-full items-center justify-center">
<Loader />
</div>
)}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this change has design dept. approvement? As this is a bug, we can merge it, but it will need to be reviewed to ensure a sound design solution is found

@TamaraFinogina TamaraFinogina Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without it, we get folders from the individual workspace for a split-second

@TamaraFinogina
TamaraFinogina requested a review from CandelR July 31, 2026 10:55
@sonarqubecloud

Copy link
Copy Markdown

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