Skip to content

Preserve generative session folder state when navigating - #746

Merged
cristian-tamblay merged 1 commit into
developfrom
fix/generative-session-folders-state
Jul 6, 2026
Merged

Preserve generative session folder state when navigating#746
cristian-tamblay merged 1 commit into
developfrom
fix/generative-session-folders-state

Conversation

@Creylay

@Creylay Creylay commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Session folders in the generative module sidebar were collapsing whenever the user navigated to the "create session" flow or returned from it. This happened because GenerativeContent conditionally wrapped its layout in CreateSessionProvider, causing React to unmount and remount the entire tree (including SessionBar) on every isCreating toggle. A secondary bug also reset all folder states when a session with a new task type was added.


Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/front/src/pages/generative/GenerativeContent.jsx: always wrap the layout with CreateSessionProvider so the component tree stays stable across route changes, preventing SessionBar from remounting.
  • DashAI/front/src/components/generative/SessionBar.jsx: when the set of task display names changes, preserve existing open/close states and only initialize newly added folders as closed.

@Creylay Creylay added bug Something isn't working front Frontend work labels Jun 30, 2026
@Creylay
Creylay changed the base branch from production to develop June 30, 2026 17:07
@cristian-tamblay
cristian-tamblay merged commit 4e74fff into develop Jul 6, 2026
20 checks passed
@cristian-tamblay
cristian-tamblay deleted the fix/generative-session-folders-state branch July 6, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working front Frontend work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants