Conversation
Replace hardcoded server-side prompt files with a database-backed prompt configuration system fully manageable from the web UI. Key changes: - New PromptConfigService backed by SQLAlchemy model + Alembic migration - REST endpoints: GET/PUT/DELETE /api/extended/prompts, POST /api/extended/reprocess-all - PromptLoader refactored to resolve prompts from DB with hardcoded constants as fallback - ProcessorService gains reprocess_all() and per-page prompt-hash staleness tracking - New PromptsModal.js: tabbed OCR/Summary editor with custom type support, inline cost-warning confirmation before "Reprocess All Notes" - FileViewer.js: per-page stale badge + individual reprocess button; amber header icon when note has stale pages - Removed 11 hardcoded prompt .md files from supernote/server/resources/prompts/ - §VIII Frontend UI Conventions added to project constitution (v1.2.0); all button styles audited and normalised across ApiKeysPanel, MoveModal, RenameModal, FileViewer, and index.html to match the canonical SystemPanel reference palette - Full test coverage: route security, service unit, processor hash, model completeness
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Cover user-not-found branches, exception handlers, invalid file_id paths, reprocess-all handler, stale page reprocessing with page_ids filtering, already-processing 409, page-level reprocess success/failure, and PromptConfigService edge cases (no-content ValueError, unknown prompt_id skip, make_prompt_resolver).
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.
Summary
.mdfiles with a database-backedPromptConfigtable (Alembic migration included)PromptConfigServiceand REST endpoints (GET/PUT/DELETE /api/extended/prompts,POST /api/extended/reprocess-all) served via a dedicatedpromptsrouterPromptLoaderrefactored to resolve prompts from DB with hardcoded string constants as fallback (no more filesystem reads at runtime)ProcessorServicegainsreprocess_all()and per-page prompt-hash staleness tracking; stale pages surface in the UIPromptsModal.jscomponent: tabbed OCR / Summary editor, custom note-type support, protected built-in layers (ocr/default,summary/default,summary/common), and an inline cost-warning confirmation before "Reprocess All Notes"FileViewer.jsupdated: per-page stale badge, individual page reprocess button, amber header icon when the note has stale pagesApiKeysPanel,MoveModal,RenameModal,FileViewer, andindex.htmlaudited and normalised to the canonicalSystemPanelpaletteTest plan
./script/test— all existing + new tests pass./script/lint— ruff, mypy, codespell clean./script/server(ephemeral) and open the web UIdefault/commonlayers — Remove button should be absent.notefile, verify stale-page badge + per-page Reprocess button appear after prompt change