Skip to content

[FEAT] Show project sync status (creating/deleting) with tooltip#3722

Open
arturrybalskyy-dev wants to merge 2 commits into
mlrun:developmentfrom
arturrybalskyy-dev:feat/ML-12526/project-sync-status-indicator
Open

[FEAT] Show project sync status (creating/deleting) with tooltip#3722
arturrybalskyy-dev wants to merge 2 commits into
mlrun:developmentfrom
arturrybalskyy-dev:feat/ML-12526/project-sync-status-indicator

Conversation

@arturrybalskyy-dev

Copy link
Copy Markdown
Contributor

📝 Description

Dim project cards while status.state is creating/deleting and show a tooltip: in progress, auto-retrying (failed background task), or system sync issue (admin action needed).

🛠️ Changes Made

  • useProjectsSyncStatus hook: polls background-task (op_id) + Orca events API every 10s while any project is transitional
  • New events-api.js, getBackgroundTask in tasks-api.js
  • ProjectCard: dim + tooltip, replaces old session-local delete spinner
  • New constants for transitional states / tooltip text / poll interval
  • fetchProjects: added silent flag so background polling doesn't show the full-page loader
  • Delete flow: refetch project list immediately after delete request (was only refreshing on task completion)
  • Mock server: sync test fixtures + events endpoint

✅ Checklist

  • I have given the PR a well-structured title describing the domain and the specific change that was made
  • I tested the changes in the browser (locally, using the mock server fixtures)
  • I confirmed that existing tests pass
  • I added or updated unit / integration tests (if needed)
  • I checked that this change doesn’t introduce new console warnings or lint / formatting errors
  • I updated the relevant Jira ticket with the appropriate details and status

🔗 References

🚨 Breaking Changes

  • No

Includes DRC change

  • No

@Taras-Hlukhovetskyi

Copy link
Copy Markdown
Collaborator

@arturrybalskyy-dev pls remove logs:
src/hooks/useProjectsSyncStatus.hook.js
45:5 warning Unexpected console statement no-console
57:5 warning Unexpected console statement no-console

And I wanna review it with you on call

@Taras-Hlukhovetskyi Taras-Hlukhovetskyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

create and delete are not working as per documentation. Pls fix it

return PROJECT_SYNC_ISSUE_TOOLTIP
}

const { noun, gerund } = projectSyncStateWords[state]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if we will have some state that not listed in projectSyncStateWords then page will crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants