Repository navigation
Conversation
…base tag management section should be hidden
shaohuzhang1
commented
Nov 30, 2026
| v-if="knowledgeDocPermission('docTag')" | ||
| @click="handleLinkDocuments([row.id])" | ||
| /> | ||
| </template> |
Contributor
Author
There was a problem hiding this comment.
Key observations:
-
Logic change:
disabled→v-if(intentional? verify UX)- Previously, the button was rendered but disabled during
loadingand withoutdocEditpermission. Now it's hidden entirely whendocTagpermission is absent. - Hiding vs. disabling is a UX decision — disabling is usually preferred so users know the action exists but is unavailable. Confirm this is intended.
- Previously, the button was rendered but disabled during
-
Loss of
loadingguard- The old condition included
loading(prevent double-clicks / actions mid-load). The new:disabled="!selectedDocuments.length"drops the loading check on the toolbar button, so the user can triggerhandleBatchLinkDocumentswhile data is still loading. Likely a regression. Re-add::disabled="!selectedDocuments.length || loading"
- Same for the per-row dropdown item (line ~209): old had
:disabled="loading && ...", now gone entirely. Consider restoring aloadingguard.
- The old condition included
-
Attribute order / mixing
v-ifwith other bindings- In the second diff,
v-ifis placed after:icon, which works but is inconsistent style. Also note:v-if+@click+ disabled bindings — fine functionally, but keep a consistent ordering (place structural directives first). - Better practice: use
v-iffirst in the tag.
- In the second diff,
-
Permission naming consistency
knowledgeDocPermissionis "document" scoped, but you're introducingdocTag. If tagging is a distinct capability, consider whether it belongs under this function or a separate guard/namespace (e.g.,docTagsemantics vs.docEdit). IfdocTagshould imply link/unlink rights, ensure backend perm definitions align.
-
Inconsistent gating between toolbar and inline action
- Toolbar uses
v-if="knowledgeDocPermission('docTag')"; inline row action also now gates on'docTag'. Good — they match. But previously both allowed viewing the control regardless of edit perms. Double-check that read-only users don't legitimately need to see these buttons (e.g., greyed out with tooltip).
- Toolbar uses
-
isSystemResource()branch- Verify
perm.knowledge.system['docTag']actually exists; adding a method to the union type without a corresponding runtime permission likely throwsundefined is not a function. Ensure both system and non-system perm objects definedocTag.
- Verify
-
Minor optimization
knowledgeDocPermission(...)is called in template; if used in multiple places consider a computed (e.g.,canTag) to avoid repeated evaluation and keep template clean:const canTag = computed(() => knowledgeDocPermission('docTag'))
Summary of actionable issues: (a) dropped loading guard on both buttons — likely unintended regression; (b) confirm hide-vs-disable UX intent; (c) ensure docTag exists at runtime in all perm branches; (d) consider a computed and consistent directive ordering.
peslyn
deleted the
pr@v3@fix_the_button_for_associated_documents_within_the_shared_knowledge_base_tag_management_section_shoule_be_hidden
branch
November 30, 2026 09:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: the button for associated documents within the shared knowledge base tag management section should be hidden