fix(ui): sections 17 and 18 were checked against the wrong text

check_design_parity read its checklist from build_audit_page.ANALYSIS. Eight
sections of the audit page are hand-written, and for those the generator's
text is NOT what the page says — so Settings and the Task editor were reported
as matching a design they had never been compared against. The Task editor was
in fact built backwards.

  * The checker now reads the "Thay đổi" bullets straight out of
    docs/ui-audit.html, and reports how many bullets on the page still have no
    probe (57 on the page, 32 probed) instead of implying full coverage.

  * Task editor: reverted from three step tabs to a left list + right panel,
    five rows matching the five real group boxes — which is what the page asks
    for, in as many words ("thay vì chia tab"), for consistency with Settings.

  * Settings now switches panels rather than scrolling, so both dialogs are
    navigated identically and neither is a long scroll any more.

  * Settings field presentation, as the page's second bullet asks: the six
    checkboxes became switches, and Language/Theme became segmented controls.
    ToggleSwitch subclasses QCheckBox and SegmentedControl exposes the slice
    of the QComboBox API this dialog uses, so no save/load path changed —
    verified by round-tripping language/theme/tray through _save().

All 22 task-editor fields and 14 settings fields verified present after the
move; 7 suites green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
NamPDT
2026-08-17 12:49:52 +09:00
co-authored by Claude Opus 5
parent cb68f87b35
commit 62bec1f984
7 changed files with 365 additions and 132 deletions
+10 -7
View File
@@ -34,17 +34,20 @@ def hscroll(dlg, app):
"""
from PySide6.QtWidgets import QListWidget, QScrollArea
over_area = False
tabs = getattr(dlg, "step_tabs", None)
if tabs is not None:
keep = tabs.currentIndex()
for i in range(tabs.count()):
tabs.setCurrentIndex(i)
stack = getattr(dlg, "section_stack", None)
if stack is not None:
# One scroll area per section; a page that is not current has stale
# geometry, so bring each to the front before measuring it.
idx = dlg.section_list
keep = idx.currentRow()
for i in range(stack.count()):
idx.setCurrentRow(i)
for _ in range(3):
app.processEvents()
sa = tabs.widget(i)
sa = stack.widget(i)
if sa.widget().sizeHint().width() > sa.viewport().width():
over_area = True
tabs.setCurrentIndex(keep)
idx.setCurrentRow(keep)
else:
sa = dlg.findChildren(QScrollArea)[0]
over_area = sa.widget().sizeHint().width() > sa.viewport().width()