Enhance job logging and UI updates

- Implement job logging functionality to track progress and events for each job.
- Add a new section in the job card to display session logs with detailed entries.
- Update job statistics to include pages fetched, pages found, and assets processed.
- Modify the UI theme and text for better clarity and aesthetics.
- Adjust tests to validate new logging features and ensure proper event handling.
This commit is contained in:
kstyagi23
2026-09-05 07:36:34 +05:30
parent 8f9210d6be
commit 2059c275c2
10 changed files with 762 additions and 593 deletions
+8 -2
View File
@@ -184,12 +184,17 @@ class CaptureService:
)
def update(
phase: str, message: str, stats: dict[str, int], warnings: list[str]
phase: str,
message: str,
stats: dict[str, int],
warnings: list[str],
detail: dict[str, object] | None = None,
) -> None:
nonlocal last_progress_at, last_progress_phase
now = time.monotonic()
if (
phase == last_progress_phase
detail is None
and phase == last_progress_phase
and now - last_progress_at < PROGRESS_WRITE_INTERVAL_SECONDS
):
return
@@ -203,6 +208,7 @@ class CaptureService:
message=message,
stats=stats,
warnings=warnings,
detail=detail,
)
if not renewed:
raise CaptureCancelled("Capture lease was reassigned")