diff --git a/locales/de.json b/locales/de.json index d2ffa18f..63abc26c 100644 --- a/locales/de.json +++ b/locales/de.json @@ -332,7 +332,7 @@ "extraFolderPaths": "Zusätzliche Ordnerpfade", "downloadPathTemplates": "Download-Pfad-Vorlagen", "priorityTags": "Prioritäts-Tags", - "updateFlags": "Update-Markierungen", + "versionScope": "Update-Markierungen", "exampleImages": "Beispielbilder", "autoOrganize": "Auto-Organisierung", "metadata": "Metadaten", @@ -595,7 +595,7 @@ "download": "Herunterladen", "restartRequired": "Neustart erforderlich" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "Strategie für Update-Markierungen", "help": "Entscheide, ob Update-Badges nur dann erscheinen, wenn eine neue Version dasselbe Basismodell wie deine lokalen Dateien verwendet, oder sobald es irgendein neueres Release für dieses Modell gibt.", "options": { diff --git a/locales/en.json b/locales/en.json index 36b5aacd..e924fea5 100644 --- a/locales/en.json +++ b/locales/en.json @@ -332,7 +332,7 @@ "extraFolderPaths": "Extra Folder Paths", "downloadPathTemplates": "Download Path Templates", "priorityTags": "Priority Tags", - "updateFlags": "Update Flags", + "versionScope": "Version Scope", "exampleImages": "Example Images", "autoOrganize": "Auto-organize", "metadata": "Metadata", @@ -595,12 +595,12 @@ "download": "Download", "restartRequired": "Requires restart" }, - "updateFlagStrategy": { - "label": "Update Flag Strategy", - "help": "Decide whether update badges should only appear when a new release shares the same base model as your local files or whenever any newer version exists for that model.", + "versionGrouping": { + "label": "Version Grouping", + "help": "Decide how versions are grouped for display: by base model or all together. Also controls update badge logic and the VLM version list filtering.", "options": { - "sameBase": "Match updates by base model", - "any": "Flag any available update" + "sameBase": "Group by base model (same_base)", + "any": "Show all versions (any)" } }, "hideEarlyAccessUpdates": { diff --git a/locales/es.json b/locales/es.json index 7a6f9289..b799357f 100644 --- a/locales/es.json +++ b/locales/es.json @@ -332,7 +332,7 @@ "extraFolderPaths": "Rutas de carpetas adicionales", "downloadPathTemplates": "Plantillas de rutas de descarga", "priorityTags": "Etiquetas prioritarias", - "updateFlags": "Indicadores de actualización", + "versionScope": "Indicadores de actualización", "exampleImages": "Imágenes de ejemplo", "autoOrganize": "Organización automática", "metadata": "Metadatos", @@ -595,7 +595,7 @@ "download": "Descargar", "restartRequired": "Requiere reinicio" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "Estrategia de indicadores de actualización", "help": "Decide si las insignias de actualización deben mostrarse solo cuando una nueva versión comparte el mismo modelo base que tus archivos locales o siempre que exista cualquier versión más reciente de ese modelo.", "options": { diff --git a/locales/fr.json b/locales/fr.json index 8226802c..73b07221 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -332,7 +332,7 @@ "extraFolderPaths": "Chemins de dossiers supplémentaires", "downloadPathTemplates": "Modèles de chemin de téléchargement", "priorityTags": "Étiquettes prioritaires", - "updateFlags": "Indicateurs de mise à jour", + "versionScope": "Indicateurs de mise à jour", "exampleImages": "Images d'exemple", "autoOrganize": "Organisation automatique", "metadata": "Métadonnées", @@ -595,7 +595,7 @@ "download": "Télécharger", "restartRequired": "Redémarrage requis" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "Stratégie des indicateurs de mise à jour", "help": "Choisissez si les badges de mise à jour doivent apparaître uniquement lorsqu’une nouvelle version partage le même modèle de base que vos fichiers locaux, ou dès qu’il existe une version plus récente pour ce modèle.", "options": { diff --git a/locales/he.json b/locales/he.json index cf4a4a86..23020f5a 100644 --- a/locales/he.json +++ b/locales/he.json @@ -332,7 +332,7 @@ "extraFolderPaths": "נתיבי תיקיות נוספים", "downloadPathTemplates": "תבניות נתיב הורדה", "priorityTags": "תגיות עדיפות", - "updateFlags": "תגי עדכון", + "versionScope": "תגי עדכון", "exampleImages": "תמונות דוגמה", "autoOrganize": "ארגון אוטומטי", "metadata": "מטא-נתונים", @@ -595,7 +595,7 @@ "download": "הורד", "restartRequired": "דורש הפעלה מחדש" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "אסטרטגיית תגי עדכון", "help": "בחרו אם תוויות העדכון יוצגו רק כאשר גרסה חדשה חולקת את אותו דגם בסיס כמו הקבצים המקומיים שלכם או בכל מקרה שבו קיימת גרסה חדשה עבור אותו דגם.", "options": { diff --git a/locales/ja.json b/locales/ja.json index 24f8c689..0e20e311 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -332,7 +332,7 @@ "extraFolderPaths": "追加フォルダーパス", "downloadPathTemplates": "ダウンロードパステンプレート", "priorityTags": "優先タグ", - "updateFlags": "アップデートフラグ", + "versionScope": "アップデートフラグ", "exampleImages": "例画像", "autoOrganize": "自動整理", "metadata": "メタデータ", @@ -595,7 +595,7 @@ "download": "ダウンロード", "restartRequired": "再起動が必要" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "アップデートフラグの表示戦略", "help": "新リリースがローカルファイルと同じベースモデルを共有する場合にのみ更新バッジを表示するか、そのモデルに新しいバージョンがあれば常に表示するかを決めます。", "options": { diff --git a/locales/ko.json b/locales/ko.json index 12eaa3c2..9fd5773b 100644 --- a/locales/ko.json +++ b/locales/ko.json @@ -332,7 +332,7 @@ "extraFolderPaths": "추가 폴다 경로", "downloadPathTemplates": "다운로드 경로 템플릿", "priorityTags": "우선순위 태그", - "updateFlags": "업데이트 표시", + "versionScope": "업데이트 표시", "exampleImages": "예시 이미지", "autoOrganize": "자동 정리", "metadata": "메타데이터", @@ -595,7 +595,7 @@ "download": "다운로드", "restartRequired": "재시작 필요" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "업데이트 표시 전략", "help": "새 릴리스가 로컬 파일과 동일한 베이스 모델을 공유할 때만 업데이트 배지를 표시할지, 또는 해당 모델에 사용 가능한 새 버전이 있으면 항상 표시할지 결정합니다.", "options": { diff --git a/locales/ru.json b/locales/ru.json index 15078501..d52b0625 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -332,7 +332,7 @@ "extraFolderPaths": "Дополнительные пути к папкам", "downloadPathTemplates": "Шаблоны путей загрузки", "priorityTags": "Приоритетные теги", - "updateFlags": "Метки обновлений", + "versionScope": "Метки обновлений", "exampleImages": "Примеры изображений", "autoOrganize": "Автоорганизация", "metadata": "Метаданные", @@ -595,7 +595,7 @@ "download": "Загрузить", "restartRequired": "Требует перезапуска" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "Стратегия меток обновлений", "help": "Выберите, отображать ли значки обновления только когда новая версия имеет тот же базовый модель, что и локальные файлы, или всегда при наличии любого нового релиза для этой модели.", "options": { diff --git a/locales/zh-CN.json b/locales/zh-CN.json index e7212976..94f6e56a 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -332,7 +332,7 @@ "extraFolderPaths": "额外文件夹路径", "downloadPathTemplates": "下载路径模板", "priorityTags": "优先标签", - "updateFlags": "更新标记", + "versionScope": "版本范围", "exampleImages": "示例图片", "autoOrganize": "自动整理", "metadata": "元数据", @@ -595,12 +595,12 @@ "download": "下载", "restartRequired": "需要重启" }, - "updateFlagStrategy": { - "label": "更新标记策略", - "help": "决定更新徽章是否仅在新版本与本地文件共享相同基础模型时显示,或只要该模型有任何更新版本就显示。", + "versionGrouping": { + "label": "版本分组", + "help": "控制版本在 UI 中的分组方式:按基础模型分组或合并显示。同时影响更新徽章逻辑和版本列表的筛选行为。", "options": { - "sameBase": "按基础模型匹配更新", - "any": "显示任何可用更新" + "sameBase": "按基础模型分组", + "any": "显示所有版本" } }, "hideEarlyAccessUpdates": { diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 5760d932..a164da52 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -332,7 +332,7 @@ "extraFolderPaths": "額外資料夾路徑", "downloadPathTemplates": "下載路徑範本", "priorityTags": "優先標籤", - "updateFlags": "更新標記", + "versionScope": "版本範圍", "exampleImages": "範例圖片", "autoOrganize": "自動整理", "metadata": "中繼資料", @@ -595,7 +595,7 @@ "download": "下載", "restartRequired": "需要重新啟動" }, - "updateFlagStrategy": { + "versionGrouping": { "label": "更新標記策略", "help": "決定更新徽章是否僅在新版本與本地檔案共享相同基礎模型時顯示,或只要該模型有任何更新版本就顯示。", "options": { diff --git a/py/services/base_model_service.py b/py/services/base_model_service.py index 016a9d76..5f757d75 100644 --- a/py/services/base_model_service.py +++ b/py/services/base_model_service.py @@ -116,11 +116,11 @@ class BaseModelService(ABC): dedup_lost = 0 if kwargs.get("group_by_model") and civitai_model_id is None: # Determine whether to further sub-group by base model - # When update_flag_strategy is "same_base", versions with different + # When version_grouping is "same_base", versions with different # base models are effectively different groups — the dedup key # needs to include base_model so the version count and VLM flow # stay consistent (card shows correct count for its base model). - ufs = self.settings.get("update_flag_strategy", "same_base") + ufs = self.settings.get("version_grouping", "same_base") group_by_base = ufs == "same_base" dedup_map = {} # (modelId [,base_model]) -> (item, version_id) @@ -551,7 +551,7 @@ class BaseModelService(ABC): if not ordered_ids: return annotated - strategy_value = self.settings.get("update_flag_strategy") + strategy_value = self.settings.get("version_grouping") if isinstance(strategy_value, str) and strategy_value.strip(): strategy = strategy_value.strip().lower() else: diff --git a/py/services/settings_manager.py b/py/services/settings_manager.py index d5d671b5..c76270bb 100644 --- a/py/services/settings_manager.py +++ b/py/services/settings_manager.py @@ -98,7 +98,7 @@ DEFAULT_SETTINGS: Dict[str, Any] = { "lora_syntax_format": "legacy", "model_card_footer_action": "replace_preview", "show_version_on_card": True, - "update_flag_strategy": "same_base", + "version_grouping": "same_base", "auto_organize_exclusions": [], "metadata_refresh_skip_paths": [], "skip_previously_downloaded_model_versions": False, @@ -745,6 +745,7 @@ class SettingsManager: "includeTriggerWords": "include_trigger_words", "compactMode": "compact_mode", "modelCardFooterAction": "model_card_footer_action", + "update_flag_strategy": "version_grouping", } updated = False diff --git a/static/js/components/shared/ModelCard.js b/static/js/components/shared/ModelCard.js index 9233400f..b2bda7ce 100644 --- a/static/js/components/shared/ModelCard.js +++ b/static/js/components/shared/ModelCard.js @@ -275,8 +275,8 @@ function handleViewLocalVersionsFromCard(card, modelType) { const modelId = card.dataset.modelId; const modelName = card.dataset.name; if (!modelId) return; - // Respect update_flag_strategy: only filter by base model when the strategy says so - const strategy = state.global?.settings?.update_flag_strategy; + // Respect version_grouping: only filter by base model when the strategy says so + const strategy = state.global?.settings?.version_grouping; const shouldFilterByBase = strategy === 'same_base'; const baseModel = shouldFilterByBase && card.dataset.base_model !== 'Unknown' ? card.dataset.base_model diff --git a/static/js/components/shared/ModelVersionsTab.js b/static/js/components/shared/ModelVersionsTab.js index 002045fb..ba56e6e4 100644 --- a/static/js/components/shared/ModelVersionsTab.js +++ b/static/js/components/shared/ModelVersionsTab.js @@ -307,7 +307,7 @@ function getToggleTooltipText(mode) { } function getDefaultDisplayMode() { - const strategy = state?.global?.settings?.update_flag_strategy; + const strategy = state?.global?.settings?.version_grouping; return strategy === DISPLAY_FILTER_MODES.SAME_BASE ? DISPLAY_FILTER_MODES.SAME_BASE : DISPLAY_FILTER_MODES.ANY; @@ -339,7 +339,7 @@ function resolveUpdateAvailability(record, baseModel, currentVersionId) { return false; } - const strategy = state?.global?.settings?.update_flag_strategy; + const strategy = state?.global?.settings?.version_grouping; const sameBaseMode = strategy === DISPLAY_FILTER_MODES.SAME_BASE; const hideEarlyAccess = state?.global?.settings?.hide_early_access_updates; diff --git a/static/js/managers/SettingsManager.js b/static/js/managers/SettingsManager.js index 6152080f..fc74c721 100644 --- a/static/js/managers/SettingsManager.js +++ b/static/js/managers/SettingsManager.js @@ -917,9 +917,9 @@ export class SettingsManager { modelNameDisplaySelect.value = state.global.settings.model_name_display || 'model_name'; } - const updateFlagStrategySelect = document.getElementById('updateFlagStrategy'); - if (updateFlagStrategySelect) { - updateFlagStrategySelect.value = state.global.settings.update_flag_strategy || 'same_base'; + const versionGroupingSelect = document.getElementById('versionGrouping'); + if (versionGroupingSelect) { + versionGroupingSelect.value = state.global.settings.version_grouping || 'same_base'; } // Set hide early access updates setting @@ -2070,7 +2070,7 @@ export class SettingsManager { if ( settingKey === 'model_name_display' || settingKey === 'model_card_footer_action' - || settingKey === 'update_flag_strategy' + || settingKey === 'version_grouping' || settingKey === 'mature_blur_level' ) { this.reloadContent(); diff --git a/static/js/state/index.js b/static/js/state/index.js index a62f3c26..738f21f7 100644 --- a/static/js/state/index.js +++ b/static/js/state/index.js @@ -44,7 +44,7 @@ const DEFAULT_SETTINGS_BASE = Object.freeze({ include_trigger_words: false, compact_mode: false, priority_tags: { ...DEFAULT_PRIORITY_TAG_CONFIG }, - update_flag_strategy: 'same_base', + version_grouping: 'same_base', hide_early_access_updates: false, auto_organize_exclusions: [], metadata_refresh_skip_paths: [], diff --git a/templates/components/modals/settings_modal.html b/templates/components/modals/settings_modal.html index ee67ca66..3de1daa7 100644 --- a/templates/components/modals/settings_modal.html +++ b/templates/components/modals/settings_modal.html @@ -1100,23 +1100,23 @@ - +
-

{{ t('settings.sections.updateFlags') }}

+

{{ t('settings.sections.versionScope') }}

-
- + +
diff --git a/tests/frontend/components/modelVersionsTab.media.test.js b/tests/frontend/components/modelVersionsTab.media.test.js index b3630d21..0c7ab553 100644 --- a/tests/frontend/components/modelVersionsTab.media.test.js +++ b/tests/frontend/components/modelVersionsTab.media.test.js @@ -33,7 +33,7 @@ const stateMock = { global: { settings: { autoplay_on_hover: false, - update_flag_strategy: 'any', + version_grouping: 'any', }, }, }; @@ -67,7 +67,7 @@ describe('ModelVersionsTab media rendering', () => {
`; stateMock.global.settings.autoplay_on_hover = false; - stateMock.global.settings.update_flag_strategy = 'any'; + stateMock.global.settings.version_grouping = 'any'; ({ getModelApiClient } = await import(API_FACTORY_MODULE)); fetchModelUpdateVersions = vi.fn(); getModelApiClient.mockReturnValue({ @@ -157,7 +157,7 @@ describe('ModelVersionsTab media rendering', () => { }); it('shows a stable label with a short state indicator', async () => { - stateMock.global.settings.update_flag_strategy = 'any'; + stateMock.global.settings.version_grouping = 'any'; fetchModelUpdateVersions.mockResolvedValue({ success: true, record: { @@ -192,7 +192,7 @@ describe('ModelVersionsTab media rendering', () => { }); it('filters versions to the current base model when strategy is same_base', async () => { - stateMock.global.settings.update_flag_strategy = 'same_base'; + stateMock.global.settings.version_grouping = 'same_base'; fetchModelUpdateVersions.mockResolvedValue({ success: true, record: { @@ -235,7 +235,7 @@ describe('ModelVersionsTab media rendering', () => { }); it('toggle button can switch to display all versions', async () => { - stateMock.global.settings.update_flag_strategy = 'same_base'; + stateMock.global.settings.version_grouping = 'same_base'; fetchModelUpdateVersions.mockResolvedValue({ success: true, record: { @@ -286,7 +286,7 @@ describe('ModelVersionsTab media rendering', () => { }); it('shows a newer version badge when viewing same-base results', async () => { - stateMock.global.settings.update_flag_strategy = 'same_base'; + stateMock.global.settings.version_grouping = 'same_base'; fetchModelUpdateVersions.mockResolvedValue({ success: true, record: { diff --git a/tests/services/test_base_model_service.py b/tests/services/test_base_model_service.py index 27fc83ff..876941dd 100644 --- a/tests/services/test_base_model_service.py +++ b/tests/services/test_base_model_service.py @@ -482,7 +482,7 @@ async def test_get_paginated_data_annotates_update_flags_with_bulk_dedup(): @pytest.mark.asyncio -async def test_update_flag_strategy_same_base_prefers_matching_base(): +async def test_version_grouping_same_base_prefers_matching_base(): items = [ { "model_name": "Pony Version", @@ -551,7 +551,7 @@ async def test_update_flag_strategy_same_base_prefers_matching_base(): should_ignore_model=False, ) update_service = StubUpdateServiceWithRecords({1: record}) - settings = StubSettings({"update_flag_strategy": "same_base"}) + settings = StubSettings({"version_grouping": "same_base"}) service = DummyService( model_type="stub", @@ -579,7 +579,7 @@ async def test_update_flag_strategy_same_base_prefers_matching_base(): @pytest.mark.asyncio -async def test_update_flag_strategy_same_base_honors_latest_local_version(): +async def test_version_grouping_same_base_honors_latest_local_version(): items = [ { "model_name": "Pony v0.1", @@ -648,7 +648,7 @@ async def test_update_flag_strategy_same_base_honors_latest_local_version(): should_ignore_model=False, ) update_service = StubUpdateServiceWithRecords({1: record}) - settings = StubSettings({"update_flag_strategy": "same_base"}) + settings = StubSettings({"version_grouping": "same_base"}) service = DummyService( model_type="stub",