-
-
Notifications
You must be signed in to change notification settings - Fork 1
bug(frontend): KBSearchResultPanel still creates duplicate KnowledgeRepository instance #3969
Copy link
Copy link
Closed
Labels
Description
Description
KBSearchResultPanel doesn't accept the repository prop passed from parent, and still creates its own instance. This defeats #3940's goal of eliminating duplicate repository creation.
Current state:
- KnowledgeSearch.vue creates:
const knowledgeRepo = new KnowledgeRepository() - KnowledgeSearch.vue passes:
<KBSearchResultPanel :repository="knowledgeRepo" ... /> - KBSearchResultPanel ignores it: No
repositoryprop defined - KBSearchResultPanel creates its own: line 220
const knowledgeRepo = new KnowledgeRepository() - KBSearchResultPanel uses its own: line 308
await knowledgeRepo.getDocument(document.id)
Result: Two KnowledgeRepository instances in memory (parent's + child's)
Fix required:
- Add
repository: KnowledgeRepositoryto KBSearchResultPanel props (line 199-203) - Replace local
const knowledgeRepo = new KnowledgeRepository()with the prop - Update line 308 to use passed-in repository
Type: bug
Priority: medium
Reactions are currently unavailable