Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Conversation

alex-mcgovern
Copy link
Contributor

@alex-mcgovern alex-mcgovern commented Jan 20, 2025

  • adds a "mutation" hook to the workspace selection component, which allows toggling workspaces
  • wraps the app a custom react-query QueryClientProvider, which subscribes to events in the query cache to enable the following
    • when the cached value for GET /api/v1/workspaces/active is updated, the provider will compare the active workspace ID — if it is new, it will invalidate the query cache and post a toast notification with the newly activated workspace name
  • a useActiveWorkspaces hook is implemented, which polls the server on an interval, as well as every time the window is focused, or it reconnects — this should ensure that it is always up to date
Screen.Recording.2025-01-20.at.1.14.09.PM.mov

Closes #126
Closes #124

@coveralls
Copy link
Collaborator

coveralls commented Jan 20, 2025

Pull Request Test Coverage Report for Build 12869250854

Details

  • 12 of 35 (34.29%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.2%) to 66.696%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/workspace/components/workspaces-selection.tsx 6 11 54.55%
src/components/react-query-provider.tsx 0 18 0.0%
Totals Coverage Status
Change from base Build 12868779870: -1.2%
Covered Lines: 507
Relevant Lines: 679

💛 - Coveralls

@alex-mcgovern alex-mcgovern merged commit 8904d8b into main Jan 20, 2025
9 of 10 checks passed
@alex-mcgovern alex-mcgovern deleted the feat/enable-toggling-workspaces branch January 20, 2025 13:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tuen workspace dropdown dark mode on item hover Set workspace id globally available in the app
3 participants