Skip to content

Refactor database handling, enhance metrics tracking, and improve UI#10

Merged
shmukit merged 9 commits into
mainfrom
fix/kit-mixin-type-stubs
Jun 8, 2026
Merged

Refactor database handling, enhance metrics tracking, and improve UI#10
shmukit merged 9 commits into
mainfrom
fix/kit-mixin-type-stubs

Conversation

@shmukit

@shmukit shmukit commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Unit Tests
  • Integration Tests
  • Manual UI Verification

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

shmukit added 9 commits May 7, 2026 22:55
… job repository

- Replaced direct psycopg2 connection calls with a centralized connect_real_dict function for improved connection management.
- Added a new JobRepository interface with in-memory and SQLite implementations for better job tracking in async extract jobs.
- Updated various services to utilize the new job repository and handle job states more effectively.
- Introduced media encoding utilities for PNG images to streamline data URI generation.
- Enhanced question mapping and schema definitions for better integration with the extraction pipeline.
…ce budget checks

- Split the content generation process into smaller, private methods for better readability and maintainability.
- Introduced `_enforce_budget`, `_select_model`, `_build_messages`, and `_completion_kwargs` methods to encapsulate specific functionalities.
- Updated the `generate_content` method to utilize the new modular structure while maintaining existing functionality.
- Enhanced error handling and logging for budget enforcement and response processing in the content generation workflow.
…e file handling

- Introduced a new `RedisMetricsTracker` class for optional Redis-backed metrics aggregation.
- Refactored existing `FileMetricsTracker` and `MemoryMetricsTracker` to improve thread safety and data handling.
- Updated `create_metrics_tracker` factory function to support different backend options (file, memory, redis).
- Added tests for metrics tracking functionality, ensuring correct behavior across different backends.
- Enhanced documentation to clarify architecture and usage of metrics tracking.
Sanitize UI, improve edit persistence, and refine API handling
@shmukit
shmukit merged commit af4b544 into main Jun 8, 2026
1 check passed
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.

1 participant