Skip to content

Models view dont wait for backend data to show the page.#525

Merged
cristian-tamblay merged 3 commits intodevelopfrom
fix/models-scope-fetch
Apr 8, 2026
Merged

Models view dont wait for backend data to show the page.#525
cristian-tamblay merged 3 commits intodevelopfrom
fix/models-scope-fetch

Conversation

@Felipedino
Copy link
Copy Markdown
Collaborator

This pull request improves the user experience when loading tasks in the models section by introducing a loading state and skeleton placeholders. Instead of blocking the entire page with a spinner, the UI now displays skeleton cards while tasks are being fetched, making the interface feel more responsive and polished. The loading state is managed via a new loadingTasks variable, which is propagated through context and component props.

Loading state management and UI improvements:

  • Added a loadingTasks state to the useSessions hook, set to true while tasks are being fetched and false once loading completes. This state is now included in the context and passed down to relevant components. [1] [2] [3] [4] [5] [6] [7]
  • Updated SelectOptionMenu to accept a loading prop and render six skeleton cards in place of options when loading is true, providing a smoother and more modern loading experience. [1] [2] [3] [4]

Simplification of initial loading logic:

  • Removed the global loading spinner and associated state from ModelsContent.jsx. The initial data fetching is now handled without blocking the entire page, relying on the new skeleton-based loading indicators for tasks. [1] [2] [3] [4]

Copilot AI review requested due to automatic review settings April 6, 2026 12:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves perceived responsiveness in the Models section by introducing a task-level loading state and showing skeleton placeholders while tasks are fetched, instead of blocking the entire page behind a fullscreen spinner.

Changes:

  • Added a loadingTasks state to the models useSessions hook and propagated it through ModelsContext.
  • Updated SelectOptionMenu to accept a loading prop and render skeleton cards when loading.
  • Removed the initial fullscreen loading spinner from ModelsContent and switched to non-blocking initial fetch calls.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
DashAI/front/src/pages/models/ModelsContent.jsx Removes initial fullscreen spinner and triggers initial fetches on mount.
DashAI/front/src/hooks/models/useSessions.js Introduces loadingTasks state toggled during fetchTasks().
DashAI/front/src/components/threeSectionLayout/SelectOptionMenu.jsx Adds loading prop and skeleton-card rendering for loading state.
DashAI/front/src/components/models/ModelsContext.jsx Exposes loadingTasks via Models context provider.
DashAI/front/src/components/models/ModelCenterContent.jsx Passes loadingTasks to SelectOptionMenu for task selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DashAISoftware DashAISoftware deleted a comment from Felipedino Apr 8, 2026
@cristian-tamblay cristian-tamblay merged commit 876fe3c into develop Apr 8, 2026
19 checks passed
@cristian-tamblay cristian-tamblay deleted the fix/models-scope-fetch branch April 8, 2026 14:56
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.

3 participants