Skip to content

fix(frontend): KBSearchResultPanel uses as-any cast + duplicates KnowledgeRepository instance #3940

@mrveiss

Description

@mrveiss

Summary

Merged in #3920 (feat(frontend): KB full-text search result viewer).

Bug 1: KBSearchResultPanel.vue line ~315 casts the getDocument() result as (full as any)?.content. getDocument() already returns KnowledgeDocument with a non-optional content: string field — the cast removes TypeScript safety with no justification. Fix: use full?.content directly.

Bug 2: KBSearchResultPanel.vue line ~226 creates its own new KnowledgeRepository() instance while the parent KnowledgeSearch.vue already owns one. This causes redundant HTTP requests on every document selection. Fix: accept repository as a prop from the parent and pass the parent's existing instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions