Skip to content

Conversation

@oscarlund121
Copy link
Contributor

@oscarlund121 oscarlund121 commented Oct 1, 2025

Introduces a refreshProjects method to the ProjectsContext, enabling manual and programmatic refresh of project data. Updates the ProjectsContextProvider to include this method and refactors the initial refresh logic.

Integrates the refresh functionality into the ProjectListItem component to trigger a refresh when a project is selected. Also includes minor code style improvements for consistency.

Description

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Introduces a `refreshProjects` method to the ProjectsContext, enabling manual and programmatic refresh of project data. Updates the ProjectsContextProvider to include this method and refactors the initial refresh logic.

Integrates the refresh functionality into the ProjectListItem component to trigger a refresh when a project is selected. Also includes minor code style improvements for consistency.
Copilot AI review requested due to automatic review settings October 1, 2025 08:45
Copy link
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 adds project refresh functionality by introducing a refreshProjects method to the ProjectsContext and integrating it into the UI. The changes enable manual project data refresh when projects are selected and include code style improvements for consistency.

  • Added refreshProjects method to ProjectsContext interface and provider
  • Integrated refresh functionality into ProjectListItem to trigger on project selection
  • Applied consistent code formatting with semicolons and proper JSX formatting

Reviewed Changes

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

File Description
src/common/context/ProjectsContext.ts Added refreshProjects method to context interface and default value
src/features/projects/view/ProjectsContextProvider.tsx Exposed refreshProjects method and refactored initial refresh logic
src/features/sidebar/view/internal/sidebar/projects/ProjectListItem.tsx Integrated refresh functionality and applied code style improvements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Simplifies the useEffect dependency array by removing the
unneeded dependency on the refreshProjects function.

This prevents unnecessary re-renders and ensures the effect
runs only once, improving performance and maintaining expected
behavior. No functional changes introduced.
@ulrikandersen ulrikandersen merged commit dd24356 into develop Oct 1, 2025
8 checks passed
@ulrikandersen ulrikandersen deleted the refresh-project-navigation branch October 1, 2025 12: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.

2 participants