fix(ai-outfit): preview sample rows ignore Excel status (§19.9)
Add excel_service.read_all_rows (every valid data row, status-independent) and use it in _reload_sample_rows for the preview dropdown, so previewing still works after the whole sheet is 完成. Generation still uses load_outfit_tasks. +1 excel test (read_all_rows includes 完成/失败, skips incomplete); offscreen all-完成 sheet now yields sample rows; full suite (12) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -636,17 +636,20 @@ class AiOutfitPanel(QWidget):
|
||||
self._refresh_preview()
|
||||
|
||||
def _reload_sample_rows(self):
|
||||
"""Best-effort: read the chosen Excel to fill the sample dropdown."""
|
||||
"""Best-effort: read the chosen Excel to fill the sample dropdown.
|
||||
|
||||
Uses read_all_rows (status-independent) so preview still works after the
|
||||
whole sheet is 完成 (docs/11 §10.3); generation still uses load_outfit_tasks.
|
||||
"""
|
||||
excel = self._excel_edit.text().strip()
|
||||
tasks = []
|
||||
rows = []
|
||||
if excel:
|
||||
try:
|
||||
from services.excel_service import load_outfit_tasks
|
||||
tasks = load_outfit_tasks(
|
||||
excel, retry_failed=self._retry_failed_chk.isChecked())
|
||||
from services.excel_service import read_all_rows
|
||||
rows = read_all_rows(excel)
|
||||
except Exception as exc: # noqa: BLE001 - silent for preview
|
||||
logger.info("Sample rows unavailable: %s", exc)
|
||||
self._fill_sample_combo(tasks)
|
||||
self._fill_sample_combo(rows)
|
||||
|
||||
def _refresh_preview(self):
|
||||
if not hasattr(self, "_preview_view"):
|
||||
|
||||
Reference in New Issue
Block a user