Skip to content

Commit 3df8169

Browse files
committed
fix: describe thread hygiene controls
1 parent ee4a751 commit 3df8169

4 files changed

Lines changed: 57 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Accessibility: The three thread-hygiene settings now expose localized labels, tooltips, accessible names, and descriptions for screen-reader users.
56
- Maintenance (2026-07-29): Pfad B Discoverability, README & SEO audit. Updated `llms.txt` header metadata (`Last-checked: 2026-07-29`), synced Pytest badge to 345 passing tests, added System Architecture Mermaid diagram to `README.md` & `README.de.md`, and logged marketing recommendations.
67
- Added direct normal-start worker regressions for renderer success, launcher failure,
78
process-inventory failure, and renderer timeout. Timeout feedback now includes the

src/codex_logdatenbank_wartung/i18n.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,27 @@
3434
"de": "off = ignorieren, notify = bei Fund benachrichtigen, auto = plattform-inkompatible Plugins automatisch deaktivieren",
3535
"en": "off = ignore, notify = notify when found, auto = disable platform-incompatible plugins automatically",
3636
},
37+
"settings_empty_threads": {"de": "Leere Threads:", "en": "Empty threads:"},
38+
"settings_empty_threads_tooltip": {
39+
"de": "off = ignorieren, notify = bei Fund benachrichtigen, auto = leere Threads beim nächsten sicheren Wartungslauf archivieren",
40+
"en": "off = ignore, notify = notify when found, auto = archive empty threads during the next safe maintenance run",
41+
},
42+
"settings_auto_archive_days": {
43+
"de": "Threads automatisch archivieren nach:",
44+
"en": "Automatically archive threads after:",
45+
},
46+
"settings_auto_archive_days_tooltip": {
47+
"de": "Alter in Tagen für die automatische Archivierung. 0 deaktiviert diese Regel.",
48+
"en": "Age in days for automatic archiving. 0 disables this rule.",
49+
},
50+
"settings_auto_mark_read_days": {
51+
"de": "Threads automatisch als gelesen markieren nach:",
52+
"en": "Automatically mark threads as read after:",
53+
},
54+
"settings_auto_mark_read_days_tooltip": {
55+
"de": "Alter in Tagen zum automatischen Markieren ungelesener Threads. 0 deaktiviert diese Regel.",
56+
"en": "Age in days for automatically marking unread threads. 0 disables this rule.",
57+
},
3758
"settings_audit_now": {"de": "Audit jetzt ausführen", "en": "Run audit now"},
3859
"settings_audit_now_tooltip": {
3960
"de": "Audit sofort starten: prüft Konfiguration, Plugins, CLI und bereinigt sicher erkannte alte Runtime-MCP-Prozessbäume.",

src/codex_logdatenbank_wartung/tray.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ def __init__(self) -> None:
715715
settings_layout.addLayout(plugin_row)
716716

717717
empty_threads_row = QHBoxLayout()
718-
self.empty_threads_label = QLabel("Leere Threads")
718+
self.empty_threads_label = QLabel()
719719
empty_threads_row.addWidget(self.empty_threads_label)
720720
self.empty_threads_combo = QComboBox()
721721
self.empty_threads_combo.addItems(["off", "notify", "auto"])
@@ -727,7 +727,7 @@ def __init__(self) -> None:
727727
self.empty_threads_combo.currentTextChanged.connect(self.empty_threads_mode_changed.emit)
728728

729729
thread_archive_row = QHBoxLayout()
730-
self.thread_archive_label = QLabel("Threads automatisch archivieren nach")
730+
self.thread_archive_label = QLabel()
731731
self.thread_archive_days = QSpinBox()
732732
self.thread_archive_days.setRange(0, 3650)
733733
self.thread_archive_days.setSuffix(" Tagen")
@@ -738,7 +738,7 @@ def __init__(self) -> None:
738738
settings_layout.addLayout(thread_archive_row)
739739

740740
thread_read_row = QHBoxLayout()
741-
self.thread_read_label = QLabel("Threads automatisch als gelesen markieren nach")
741+
self.thread_read_label = QLabel()
742742
self.thread_read_days = QSpinBox()
743743
self.thread_read_days.setRange(0, 3650)
744744
self.thread_read_days.setSuffix(" Tagen")
@@ -841,7 +841,7 @@ def _on_language_index_changed(self, index: int) -> None:
841841
def _accessible_label_text(label: QLabel) -> str:
842842
return label.text().rstrip("::").strip()
843843

844-
def _set_accessible_context(self, widget: QComboBox, label: QLabel, description: str) -> None:
844+
def _set_accessible_context(self, widget: QWidget, label: QLabel, description: str) -> None:
845845
widget.setAccessibleName(self._accessible_label_text(label))
846846
widget.setAccessibleDescription(description)
847847

@@ -890,8 +890,14 @@ def retranslate(self) -> None:
890890
self.language_combo.blockSignals(False)
891891
self.mcp_label.setText(t("settings_mcp_duplicates"))
892892
self.plugin_label.setText(t("settings_unused_plugins"))
893+
self.empty_threads_label.setText(t("settings_empty_threads"))
894+
self.thread_archive_label.setText(t("settings_auto_archive_days"))
895+
self.thread_read_label.setText(t("settings_auto_mark_read_days"))
893896
self.mcp_combo.setToolTip(t("settings_audit_mode_tooltip"))
894897
self.plugin_combo.setToolTip(t("settings_plugin_mode_tooltip"))
898+
self.empty_threads_combo.setToolTip(t("settings_empty_threads_tooltip"))
899+
self.thread_archive_days.setToolTip(t("settings_auto_archive_days_tooltip"))
900+
self.thread_read_days.setToolTip(t("settings_auto_mark_read_days_tooltip"))
895901
self._set_accessible_context(
896902
self.loop_interval_combo,
897903
self.loop_interval_label,
@@ -912,6 +918,21 @@ def retranslate(self) -> None:
912918
self.plugin_label,
913919
t("settings_plugin_mode_tooltip"),
914920
)
921+
self._set_accessible_context(
922+
self.empty_threads_combo,
923+
self.empty_threads_label,
924+
t("settings_empty_threads_tooltip"),
925+
)
926+
self._set_accessible_context(
927+
self.thread_archive_days,
928+
self.thread_archive_label,
929+
t("settings_auto_archive_days_tooltip"),
930+
)
931+
self._set_accessible_context(
932+
self.thread_read_days,
933+
self.thread_read_label,
934+
t("settings_auto_mark_read_days_tooltip"),
935+
)
915936
self.audit_button.setText(t("settings_audit_now"))
916937
self.audit_button.setToolTip(t("settings_audit_now_tooltip"))
917938
self.close_button.setText(t("window_close"))

tests/test_accessibility.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ def test_status_window_comboboxes_expose_accessible_context(monkeypatch) -> None
3030
assert window.mcp_combo.accessibleDescription() == t("settings_audit_mode_tooltip")
3131
assert window.plugin_combo.accessibleName() == "Ungenutzte Plugins"
3232
assert window.plugin_combo.accessibleDescription() == t("settings_plugin_mode_tooltip")
33+
assert window.empty_threads_combo.accessibleName() == "Leere Threads"
34+
assert window.empty_threads_combo.accessibleDescription() == t("settings_empty_threads_tooltip")
35+
assert window.thread_archive_days.accessibleName() == "Threads automatisch archivieren nach"
36+
assert window.thread_archive_days.accessibleDescription() == t("settings_auto_archive_days_tooltip")
37+
assert window.thread_read_days.accessibleName() == "Threads automatisch als gelesen markieren nach"
38+
assert window.thread_read_days.accessibleDescription() == t("settings_auto_mark_read_days_tooltip")
3339

3440
set_language("en")
3541
window.retranslate()
@@ -40,6 +46,10 @@ def test_status_window_comboboxes_expose_accessible_context(monkeypatch) -> None
4046
assert window.language_combo.accessibleDescription() == t("settings_language_tooltip")
4147
assert window.mcp_combo.accessibleName() == "MCP duplicates"
4248
assert window.plugin_combo.accessibleName() == "Unused plugins"
49+
assert window.empty_threads_combo.accessibleName() == "Empty threads"
50+
assert window.empty_threads_combo.accessibleDescription() == t("settings_empty_threads_tooltip")
51+
assert window.thread_archive_days.accessibleName() == "Automatically archive threads after"
52+
assert window.thread_read_days.accessibleName() == "Automatically mark threads as read after"
4353

4454
window.close()
4555
app.processEvents()

0 commit comments

Comments
 (0)