Skip to content

Conversation

@AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Oct 2, 2025

Description

Related Issue

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear requested review from Copilot and kulmann October 2, 2025 12:19
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

Globalizes folder view mode selection across routes and introduces a condensed table view for project spaces.

  • Standardizes view mode query key usage (removes per-route prefix) to make selection global.
  • Adds condensed table view extension to project spaces.
  • Updates Projects view and related composables to consume the new global view mode.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/web-pkg/src/components/ViewOptions.vue Removes route-scoped query key for view mode persistence.
packages/web-app-files/tests/unit/views/spaces/Projects.spec.ts Adjusts test mocking for view mode (introduces duplicate mock).
packages/web-app-files/src/views/spaces/Projects.vue Switches to globally provided viewMode and passes it to the folder view component.
packages/web-app-files/src/composables/resourcesViewDefaults/useResourcesViewDefaults.ts Uses unscoped global query key for view mode.
packages/web-app-files/src/composables/extensions/useFolderViews.ts Exposes condensed table view to project spaces extension point.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}
})

vi.mocked(queryItemAsString).mockImplementation(() => includeDisabled.toString())
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

The second mockImplementation call immediately overrides the first, making the includeDisabled.toString() return path untestable. If you intended different sequential return values, use mockImplementationOnce twice or mockReturnValueOnce chain; if not, remove the first line.

Suggested change
vi.mocked(queryItemAsString).mockImplementation(() => includeDisabled.toString())

Copilot uses AI. Check for mistakes.
})

vi.mocked(queryItemAsString).mockImplementation(() => includeDisabled.toString())
vi.mocked(queryItemAsString).mockImplementation(() => 'resource-table')
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

[nitpick] The literal 'resource-table' should use the corresponding constant/enumeration (e.g. FolderViewModeConstants.name.table or similar) to prevent drift if the identifier changes. This keeps tests aligned with production definitions.

Copilot uses AI. Check for mistakes.
@kulmann kulmann merged commit 50b64e9 into main Oct 6, 2025
29 of 30 checks passed
@kulmann kulmann deleted the view-mode-use-global-setting branch October 6, 2025 03:55
@openclouders openclouders mentioned this pull request Oct 6, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants