fix cdp login flow and ui config persistence#13
Open
shmilyty wants to merge 4 commits into
Open
Conversation
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.
This pull request introduces several important improvements to configuration, logging, and robustness for CitationClaw, focusing on better handling of sensitive keys, dynamic configuration reloads, advanced logging controls, and enhanced user experience for browser-based publisher logins. The changes ensure that sensitive credentials are never silently wiped, configuration changes on disk are respected without restarts, and users can control log verbosity for a calmer UI. Additionally, the new publisher login checkpoint features are fully integrated and protected from accidental resets.
Configuration robustness and sensitive data handling:
field_validatortoAppConfigto automatically strip leading/trailing whitespace from all sensitive key/token fields (e.g.,openai_api_key,core_api_key) at load/save time, preventing subtle authentication failures due to copy-paste errors. [1] [2]main.pyto preserve existing sensitive values (API keys, tokens, feature flags) when the UI POST body omits or blanks them, avoiding accidental overwrites from incomplete UI forms.Dynamic configuration reload:
ConfigManagernow auto-reloadsconfig.jsonif it is modified on disk, so changes take effect without requiring a server restart.Advanced logging controls:
log_min_level) in both config andLogManager, allowing users to filter out INFO-level "noise" and see only SUCCESS, WARNING, or ERROR messages. [1] [2] [3]__main__.pyandlog_manager.py), and Unicode errors are gracefully handled to prevent crashes on Windows GBK consoles. [1] [2] [3]LogManager, including log rotation and safe file I/O handling.Publisher login checkpoint support:
These changes collectively make the system more reliable, user-friendly, and maintainable, especially for advanced users and those running the service in production or non-English environments.