Skip to content

Conversation

@bghira
Copy link
Owner

@bghira bghira commented Nov 10, 2025

Closes #1838

This pull request introduces a new feature for managing validation prompt libraries, including backend API endpoints, service logic, and frontend integration. It also includes minor CSS adjustments and UI enhancements for modal overlays. The most significant changes are the addition of a prompt library management service and API, updates to the environments tab to support prompt library operations, and improvements to the overall user interface.

Prompt Library Management (Backend):

  • Added a new PromptLibraryService in prompt_library_service.py to handle CRUD operations for prompt library JSON files, including validation, normalization, and metadata extraction.
  • Introduced a new API router in routes/prompt_libraries.py providing endpoints to list, read, and save prompt libraries, with error handling and data validation.
  • Registered the new router in the main FastAPI application setup to expose the endpoints. [1] [2]

Integration with Tab Service and UI Context:

  • Updated tab_service.py to load prompt library metadata for the validation and environments tabs, making the data available to the frontend and handling errors gracefully. [1] [2] [3]

Frontend Enhancements (Environments Tab):

  • Injected prompt library data into the environments tab template and initialized it for Alpine.js components. [1] [2]
  • Added UI logic to load, refresh, and display prompt libraries, including event listeners and modal opening for editing libraries. [1] [2] [3] [4]
  • Added a new button and panel in the environments tab for managing validation prompt libraries, improving accessibility and user workflow. [1] [2]

UI and CSS Improvements:

  • Updated modal backdrop CSS classes for dataset and training wizards to avoid conflicts and improve z-index stacking. [1] [2] [3]

Other Minor Changes:

  • Added a custom_component field for prompt library path selection in validation field registration.
  • Minor import adjustments for asdict to support serialization of dataclasses.

These changes collectively enable robust management of validation prompt libraries within the application, enhancing both backend flexibility and frontend usability.

@bghira bghira force-pushed the feature/prompt-library-creator-editor branch from b250a53 to dfa8685 Compare November 10, 2025 17:32
@bghira bghira merged commit 40016b8 into main Nov 10, 2025
1 check passed
@bghira bghira deleted the feature/prompt-library-creator-editor branch November 10, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] User prompt library creator/editor

2 participants