Skip to content

Persist file explorer layout and sort across tab switches - #32256

Open
PopDaph wants to merge 7 commits into
mainfrom
persist-file-explorer-layout
Open

Persist file explorer layout and sort across tab switches#32256
PopDaph wants to merge 7 commits into
mainfrom
persist-file-explorer-layout

Conversation

@PopDaph

@PopDaph PopDaph commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

To fix: https://github.com/dust-tt/tasks/issues/8226

The file explorer kept its layout (grid/list) and sort mode in local component state, so leaving the Pod Files tab (or closing the conversation files panel) and coming back reset them to the defaults. Radix tabs unmount inactive content, so the state died on every switch.

Both are now stored through the existing useScopedPodUiPreferences localStorage hook, under a new fileExplorer scope. One preference for the whole app: the Pod Files tab and the conversation files panel share it.

Tests

  • Added two tests in FileExplorer.test.tsx: preferences survive an unmount/remount when a key is set, and stay in memory when none is set.
  • Manually on a Pod: switched to Grid + Name Z → A, went to Conversations and back, then reloaded the page. Both settings held.

Risk

Worst case, a stored blob fails to parse and the explorer falls back to the defaults. Front-end only, safe to rollback.

Deploy Plan

  • Deploy front

@PopDaph
PopDaph marked this pull request as ready for review September 10, 2026 15:16
@PopDaph

PopDaph commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

r? @aubin-tchoi

@github-actions github-actions Bot 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.

cc-verify: LGTM

@aubin-tchoi aubin-tchoi 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.

LGTM

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