Skip to content

Conversation

@UlysseFG
Copy link
Collaborator

No description provided.

@UlysseFG UlysseFG requested a review from nafiz1001 January 12, 2026 22:53
@UlysseFG UlysseFG changed the title Remove the refresh from store. Get fresh datasets. Fix issue with broken comment refresh. Jan 12, 2026
Comment on lines 165 to +172
useEffect(() => {
Promise.all(lane.datasets.map(async (dataset) => {
const response = await dispatch(api.datasets.get(dataset.datasetID))
return response.data
}))
.then((values) => {
setDatasets(values as Dataset[])})
}, [dispatch, lane.datasets])
}, [dispatch, lane.datasets, datasetsById])
Copy link
Collaborator

Choose a reason for hiding this comment

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

datasetsById isn't even being directly accessed in this function. So it's a magical and suspicious fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It used to be that way before i separated that part away during an attempt at optimization 11 months ago ...
The idea is to keep an eye on the store for updated datasets (when adding a comment you update the local store version of the dataset. Not very magic ... The fix tried to only use the local store version for the refresh ... but for some reason only the changed dataset was being set.

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