(self, entry: dict[str, Any])
| 486 | await self._render_inputs(entry.get("inputs", {})) |
| 487 | |
| 488 | async def _render_overview(self, entry: dict[str, Any]) -> None: |
| 489 | scroll = await self._clear_scroll("tab-overview") |
| 490 | |
| 491 | name = entry.get("name", "") |
| 492 | ts = entry.get("ts") or "unknown" |
| 493 | trigger = entry.get("trigger") or "" |
| 494 | branch = entry.get("branch", "main") |
| 495 | parent_id = entry.get("parent_id") |
| 496 | |
| 497 | header_lines = [ |
| 498 | f"[bold {_PRIMARY}]{name}[/]", |
| 499 | f"[{_DIM}]{'─' * 50}[/]", |
| 500 | "", |
| 501 | f" [bold]Time[/] {ts}", |
| 502 | ] |
| 503 | if "size" in entry: |
| 504 | header_lines.append(f" [bold]Size[/] {_format_size(entry['size'])}") |
| 505 | header_lines.append(f" [bold]Events[/] {entry.get('event_count', 0)}") |
| 506 | if trigger: |
| 507 | header_lines.append(f" [bold]Trigger[/] [{_PRIMARY}]{trigger}[/]") |
| 508 | header_lines.append(f" [bold]Branch[/] [{_SECONDARY}]{branch}[/]") |
| 509 | if parent_id: |
| 510 | header_lines.append(f" [bold]Parent[/] [{_DIM}]{parent_id}[/]") |
| 511 | |
| 512 | await scroll.mount(Static("\n".join(header_lines))) |
| 513 | |
| 514 | for ent in entry.get("entities", []): |
| 515 | etype = ent.get("type", "unknown") |
| 516 | ename = ent.get("name", "unnamed") |
| 517 | icon = _entity_icon(etype) |
| 518 | color = _ENTITY_COLORS.get(etype, _DIM) |
| 519 | |
| 520 | eid = str(ent.get("id", ""))[:8] |
| 521 | entity_title = ( |
| 522 | f"\n{icon} [bold {color}]{etype.upper()}[/] [bold]{ename}[/]" |
| 523 | ) |
| 524 | if eid: |
| 525 | entity_title += f" [{_DIM}]{eid}…[/]" |
| 526 | await scroll.mount(Static(entity_title, classes="section-header")) |
| 527 | await scroll.mount(Static(f"[{_DIM}]{'─' * 46}[/]", classes="detail-line")) |
| 528 | |
| 529 | if etype == "flow": |
| 530 | methods = ent.get("completed_methods", []) |
| 531 | if methods: |
| 532 | method_list = ", ".join(f"[{_SUCCESS}]{m}[/]" for m in methods) |
| 533 | await scroll.mount( |
| 534 | Static( |
| 535 | f" [bold]Methods[/] {method_list}", |
| 536 | classes="detail-line", |
| 537 | ) |
| 538 | ) |
| 539 | flow_state = ent.get("flow_state") |
| 540 | if isinstance(flow_state, dict) and flow_state: |
| 541 | state_parts: list[str] = [] |
| 542 | for k, v in list(flow_state.items())[:5]: |
| 543 | sv = str(v) |
| 544 | if len(sv) > 40: |
| 545 | sv = sv[:37] + "..." |
no test coverage detected