Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEN-2187]: notify in UI about expiring/expired token #2208

Merged
merged 5 commits into from
Jan 13, 2025

Conversation

BenElferink
Copy link
Contributor

@BenElferink BenElferink commented Jan 13, 2025

This pull request introduces several changes to enhance the token tracking system, improve connection status handling, and refactor the notification system. The most important changes include adding a new hook for token tracking, updating the connection store, and modifying the status component to handle different notification types.

Token Tracking Enhancements:

  • Added useTokenTracker hook to monitor token expiration and trigger notifications (frontend/webapp/hooks/tokens/useTokenTracker.ts).
  • Updated useTokenCRUD import to include useTokenTracker (frontend/webapp/hooks/tokens/index.ts).

Connection Store Updates:

  • Refactored useConnectionStore to include new state values and setters for SSE and token statuses (frontend/webapp/store/useConnectionStore.ts).
  • Modified useSSE hook to use the new setSseStatus method for updating connection status (frontend/webapp/hooks/notification/useSSE.ts) [1] [2] [3].

Notification System Improvements:

  • Updated Status component to handle different notification types and statuses (frontend/webapp/reuseable-components/status/index.tsx) [1] [2] [3] [4].
  • Added constants and utility functions for time calculations (frontend/webapp/utils/constants/numbers.ts, frontend/webapp/utils/functions/resolvers/is-over-time/index.ts, frontend/webapp/utils/functions/resolvers/is-within-time/index.ts) [1] [2] [3].

Miscellaneous Changes:

  • Added useTokenTracker to MainPage component to initialize token tracking (frontend/webapp/app/(overview)/overview/page.tsx) [1] [2].
  • Updated various components to use the new notification types and token tracking logic (frontend/webapp/components/main/header/index.tsx, frontend/webapp/components/overview/all-drawers/cli-drawer.tsx) [1] [2] [3] [4] [5].

These changes collectively improve the robustness of the token management system and enhance the user experience by providing timely notifications about token statuses.


In header and in notification manager:
Screenshot 2025-01-13 at 11 30 30

In CLI drawer:
Screenshot 2025-01-13 at 11 30 39

Copy link

@BenElferink BenElferink added enhancement New feature or request frontend labels Jan 13, 2025
@BenElferink BenElferink enabled auto-merge (squash) January 13, 2025 10:11
@BenElferink BenElferink merged commit 7cc914b into odigos-io:main Jan 13, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants