Skip to content

feat(web-pkg, web-app-files, web-app-search): [OCISDEV-853] add vault:true token to search payload in vault context#13769

Merged
mzner merged 1 commit into
feat/OCISDEV-524/mode-switchfrom
feat/OCISDEV-853/add-vault-to-search
May 12, 2026
Merged

feat(web-pkg, web-app-files, web-app-search): [OCISDEV-853] add vault:true token to search payload in vault context#13769
mzner merged 1 commit into
feat/OCISDEV-524/mode-switchfrom
feat/OCISDEV-853/add-vault-to-search

Conversation

@mzner
Copy link
Copy Markdown
Contributor

@mzner mzner commented May 11, 2026

Description

Implements vault search separation by appending the vault:true query token to the <oc:pattern> search payload when the user is in the vault context.

The token is injected in both All files and Current folder search scenarios:

<!-- All files -->
<oc:pattern>(name:"*foo*" OR content:"foo") vault:true</oc:pattern>

<!-- Current folder -->
<oc:pattern>(name:"*foo*" OR content:"foo") vault:true scope:&lt;space-id&gt;</oc:pattern>

Related Issue

Motivation and Context

Without this token, searching in the vault context would return results from all spaces. The vault:true token ensures the backend scopes the search correctly to vault content only.

How Has This Been Tested?

  • test environment: oCIS local + Docker
  • test case 1: Search in vault context — verify vault:true appears in the request payload and results are scoped to vault
  • test case 2: Search outside vault context — verify vault:true is NOT included in the request payload

@mzner mzner requested a review from LukasHirt May 11, 2026 10:57
@mzner mzner force-pushed the feat/OCISDEV-853/add-vault-to-search branch from b0d1054 to 1485b6f Compare May 11, 2026 10:58
Copy link
Copy Markdown
Collaborator

@LukasHirt LukasHirt left a comment

Choose a reason for hiding this comment

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

Could you add some small unit test confirming the change please?

…:true token to search payload in vault context

Appends vault:true to the oc:pattern search query when the current route
scope is vault. The isVault flag is introduced in the useSearch composable
and passed from the Search List component. SearchBar also checks the route
scope independently, ensuring vault:true is included in both All files and
Current folder search requests.
@mzner mzner force-pushed the feat/OCISDEV-853/add-vault-to-search branch from 1485b6f to 5bc73c8 Compare May 12, 2026 09:03
@mzner mzner merged commit 010458c into feat/OCISDEV-524/mode-switch May 12, 2026
1 check passed
@mzner mzner deleted the feat/OCISDEV-853/add-vault-to-search branch May 12, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants