refactor(webui): replace real-time polling with click-to-check version updates
- Remove background PyPI polling loop and WebSocket broadcast - Remove UpdateBanner from ThreadHeader (keep main page clean) - Add on-demand version check endpoint (GET /api/settings/version-check) - Add 'About' section in Settings > Overview with check-for-updates button - Design: no auto-fetch, user initiates check explicitly via button click
This commit is contained in:
@@ -34,9 +34,18 @@ from nanobot.webui.workspaces import (
|
||||
write_webui_default_access_mode,
|
||||
)
|
||||
|
||||
from nanobot import __version__
|
||||
|
||||
QueryParams = dict[str, list[str]]
|
||||
RuntimeSurface = Literal["browser", "native"]
|
||||
|
||||
|
||||
def _version_payload() -> dict[str, Any]:
|
||||
"""Return version info for the settings payload."""
|
||||
return {
|
||||
"current": __version__,
|
||||
}
|
||||
|
||||
_RUNTIME_CAPABILITIES = {
|
||||
"can_restart_engine": False,
|
||||
"can_pick_folder": False,
|
||||
@@ -805,6 +814,7 @@ def settings_payload(
|
||||
"exec_path_append_set": bool(exec_config.path_append),
|
||||
},
|
||||
"requires_restart": requires_restart,
|
||||
"version": _version_payload(),
|
||||
}
|
||||
return decorate_settings_payload(
|
||||
payload,
|
||||
|
||||
Reference in New Issue
Block a user