Skip to content

Conversation

@JammingBen
Copy link
Contributor

Bumps the libre graph sdk and fixes #802.

@JammingBen JammingBen self-assigned this Jun 10, 2025
Copilot AI review requested due to automatic review settings June 10, 2025 12:14

This comment was marked as outdated.

@JammingBen JammingBen requested a review from Copilot June 10, 2025 12:17
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

Adds support for fetching and displaying the total number of space members by extending the permissions API and updating the SpaceHeader component.

  • Extend GraphPermissions to request count and top, and surface @odata.count in the response
  • Update factory and permissions client to propagate and return the count
  • Modify SpaceHeader to call listPermissions for member count, remove old drive fallback, and display the result
  • Add unit tests for the new member-count display

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

File Description
packages/web-client/src/graph/permissions/types.ts Added optional count and top to request/response types
packages/web-client/src/graph/permissions/permissions.ts Forwarded count and top to underlying APIs and returned @odata.count
packages/web-app-files/src/components/Spaces/SpaceHeader.vue Replaced drive fallback with listPermissions call and bound memberCount
packages/web-app-files/tests/unit/components/Spaces/SpaceHeader.spec.ts Introduced test for rendering the correct member count
Comments suppressed due to low confidence (3)

packages/web-app-files/src/components/Spaces/SpaceHeader.vue:111

  • Remove unused imports (nextTick, unref) to keep the code clean and avoid lint warnings.
import { computed, inject, nextTick, onBeforeUnmount, onMounted, Ref, ref, unref, watch } from 'vue'

packages/web-client/src/graph/permissions/permissions.ts:66

  • Using || 0 forces a default of 0 even when options.top is undefined; consider using nullish coalescing (options?.top ?? undefined) or omitting the parameter when not provided.
options?.top || 0,

packages/web-app-files/tests/unit/components/Spaces/SpaceHeader.spec.ts:93

  • Add a test case for when the API returns a zero member count to ensure 0 is displayed correctly.
expect(wrapper.find('.space-header-people-count').text()).toContain('5')

@JammingBen JammingBen merged commit 9d11957 into main Jun 10, 2025
19 checks passed
@JammingBen JammingBen deleted the fix/space-header-member-count branch June 10, 2025 13:03
@openclouders openclouders mentioned this pull request Jun 10, 2025
1 task
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.

Members count is "1" in the space view

3 participants