feat(mid-section-defect): full-line bidirectional defect trace center with dual query mode

Transform /mid-section-defect from TMTT-only backward analysis into a full-line
bidirectional defect traceability center supporting all detection stations.

Key changes:
- Parameterized station detection: any workcenter group as detection station
- Bidirectional tracing: backward (upstream attribution) + forward (downstream reject rates)
- Dual query mode: date range OR LOT/工單/WAFER container-based seed resolution
- Multi-select filters for upstream station, equipment model (RESOURCEFAMILYNAME), and loss reasons
- Progressive 3-stage trace pipeline (seed-resolve → lineage → events) with streaming UI
- Equipment model lookup via resource cache instead of SPECNAME
- Session caching, auto-refresh, searchable MultiSelect with fuzzy matching
- Remove legacy tmtt-defect module (fully superseded)
- Archive openspec change artifacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
egg
2026-02-24 16:16:33 +08:00
parent bb58a0e119
commit f14591c7dc
67 changed files with 2957 additions and 2931 deletions

View File

@@ -85,7 +85,6 @@ def _route_css_targets() -> dict[str, list[Path]]:
"/resource-history": [ROOT / "frontend/src/resource-history/style.css"],
"/qc-gate": [ROOT / "frontend/src/qc-gate/style.css"],
"/job-query": [ROOT / "frontend/src/job-query/style.css"],
"/tmtt-defect": [ROOT / "frontend/src/tmtt-defect/style.css"],
"/admin/pages": [ROOT / "src/mes_dashboard/templates/admin/pages.html"],
"/admin/performance": [ROOT / "src/mes_dashboard/templates/admin/performance.html"],
"/tables": [ROOT / "frontend/src/tables/style.css"],

View File

@@ -131,15 +131,6 @@ TARGET_ROUTE_CONTRACTS: list[dict[str, Any]] = [
"owner": "frontend-mes-reporting",
"rollback_strategy": "fallback_to_legacy_route",
},
{
"route": "/tmtt-defect",
"page_name": "TMTT Defect",
"render_mode": "native",
"required_query_keys": [],
"source_dir": "frontend/src/tmtt-defect",
"owner": "frontend-mes-reporting",
"rollback_strategy": "fallback_to_legacy_route",
},
]
@@ -180,10 +171,6 @@ CRITICAL_API_PAYLOAD_CONTRACTS = {
"required_keys": ["summary", "table", "pareto"],
"notes": "QC-GATE chart/table linked view",
},
"/api/tmtt-defect/analysis": {
"required_keys": ["kpi", "pareto", "trend", "detail"],
"notes": "TMTT chart/table analysis payload",
},
}
@@ -199,7 +186,6 @@ ROUTE_NOTES = {
"/job-query": "resource/date query + txn detail + export",
"/excel-query": "upload/detect/query/export workflow",
"/query-tool": "resolve/history/associations/equipment-period workflows",
"/tmtt-defect": "analysis + chart interactions + CSV export",
}

View File

@@ -138,7 +138,6 @@ def main() -> int:
"/job-query",
"/excel-query",
"/query-tool",
"/tmtt-defect",
]
legacy = _measure_routes(legacy_routes, portal_spa_enabled=False)

View File

@@ -267,7 +267,6 @@ build_frontend_assets() {
"excel-query.js"
"tables.js"
"query-tool.js"
"tmtt-defect.js"
"qc-gate.js"
"mid-section-defect.js"
)