feat(reins): port knowledge base UX and index-state work from the Mazda fork (CLEAN-60) - #57
Merged
Merged
Conversation
…da fork (CLEAN-60)
…hance API schemas - Added 'worktrees/' to .gitignore to exclude worktree files. - Bumped package version from 0.3.41 to 0.3.42. - Extended KnowledgeListItemDtoSchema and related types with new properties: sourceCount, indexedCount, failedCount, and processingCount. - Introduced SourceDtoSchema, SourcePageDtoSchema, and ImportJobDtoSchema to enhance API data structures. - Updated KnowledgeSourcesService with new methods for handling source imports and exports.
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.
Brings the
reins(knowledge) slice of the Mazda fork back upstream, sochore/catch-up-upstream-5can land on a base that already contains it instead of carrying it as a merge.Jira: CLEAN-60
What is in it
Knowledge detail screen (admin)
/health, so it reflects the container, not Settings), setup checks (URL / model / bucket / reachable), editable name and description.NuxtLink'sactive-classappends rather than replaces, soborder-primarylost toborder-transparentby stylesheet order; the class set is now bound on an explicit route match.SidebarInsetwas a flex item withoutmin-w-0, so one long unbreakable index error widened the whole inset past the viewport. One class, plus a width cap on the Status column and icon row actions./graph/label/listis unbounded (8,806 entities on a 79-document base) and the old<Select>mounted a node per entry. The picker renders at most 50 rows, filtered as you type.Sources (api + admin)
Index state (api)
indexedAt/indexErroron the row are the only proof of success; alightragDocIdalone means "handed to LightRAG", never "searchable".POST /documents/reprocess_failedis the only endpoint that re-queues (its name lies: it takes PENDING and PROCESSING too);/documents/scanlooks right and is not, it globs only the top level of the input directory and enqueued files have already been moved into__enqueued__.How it was assembled
Source of truth is the fork's
chore/catch-up-upstream-5, which already reconciles all of this with upstream's instance isolation (#44, #46, #50). Its reins andaws/s3paths were lifted ontoupstream/main, then the fork's two reins commits newer than that merge (pipeline restart, poll pacing) were applied three-way. The two conflicts were the newgetPipelineStatus/restartPipelineclient methods, which now take the same optionalknowledgeIdthe rest of the client uses, and a dead poll constant.Also carried:
S3Repository.getObjectStream(the source gateway streams file content through it),multer/@types/multerdeclared explicitly (upstream only had multer transitively via@nestjs/platform-express), and one migration for theSource(knowledgeId, createdAt)index. Every column this slice reads already exists upstream since20260827135035.Deliberately not ported: the fork's global
APP_GUARD(worth its own PR: 21 of 34 controllers there answered anonymous callers), the analytics and leads slices, Mazda ingress and CORS specifics.Verification
bun run buildclean;bunx jest36/36 suites, 307 tests.api/swagger-spec.jsonregenerated from the freshdist, admin client regenerated from it (bun run build:api).Follow-ups
/documents/pipeline_statuscould feed the Overview tab, so a stalled pipeline is visible instead of inferred from a counter that stopped moving.