Skip to content

[Feature]: Knowledge Base Rework & Unified Artifact Integration #235

Description

@daniilperkin

User Story

As a project member,
I want to view all ingested project files (including GitHub repositories and manual uploads) in a unified Knowledge Base and generate AI summaries for them,
so that I can easily discover project context and quickly understand long documents without reading them in full.

Context & Motivation

Currently, the Knowledge Base only displays manually uploaded files, and the file upload UI is exposed to all users. Following a new architectural decision, data ingestion (file uploads, GitHub syncing) is being moved to an Admin-only flow.
The Knowledge Base must now be refactored into a read-only, unified viewer for all artifacts (GitHub files, Uploads, Jira tickets, etc.) by leveraging the backend's new unified artifact registry. Additionally, to support the Knowledge Layer (Epic #53), we are introducing an AI summarization feature so users can get rapid, streamed insights on any artifact directly from the local LLM.

Acceptance Criteria

  • Given a user navigates to the Knowledge Base, when the page loads, then the UI fetches and displays a unified list of all artifacts using GET /api/v1/projects/{projectId}/artifacts.
  • Given the Knowledge Base UI renders, when a user looks for upload functionality, then the Drag & Drop file upload zone (FileUploadZone.tsx) is completely absent (Note: frontend upload API services remain intact for the Admin data ingestion page).
  • Given a user selects an artifact from the table, when the artifact viewer opens, then the frontend fetches and renders the file content using GET /api/v1/projects/{projectId}/artifacts/{artifactId}/content.
  • Given an artifact is open in the viewer, when the user clicks the "Summarise" action, then a request is made to POST /api/v1/projects/{projectId}/artifacts/{artifactId}/summary.
  • Given the summary request is sent, when the AI backend responds, then the frontend streams the SSE (Server-Sent Events) response to the UI in real-time, concluding with a citation link.
  • Edge case: Given the AI is processing a summary, when the connection drops or times out, then the UI displays a graceful error message allowing the user to retry.

Technical Notes

  • Affected Components:
    • DocumentTable.tsx: Must be updated to map the new unified artifact DTO instead of the old upload-specific models.
    • FileUploadZone.tsx: Must be unmounted/removed from the Knowledge Base page.
  • API Integration:
    • Read Content: GET /api/v1/projects/{projectId}/artifacts/{artifactId}/content (Requires Bearer token; frontend must handle binary/text appropriately based on the returned Content-Type).
    • Summarise: POST /api/v1/projects/{projectId}/artifacts/{artifactId}/summary (SSE streaming integration required. Recommend reusing or adapting the streaming utility pattern currently used in useChat.ts / chatService).
  • Design Constraints: The summarization UI must handle streaming text dynamically (e.g., using react-markdown in a scrolling container).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions