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
+9
View File
@@ -121,6 +121,15 @@ def test_capture_service_creates_private_archive(tmp_path) -> None:
names = archive.namelist()
assert any(name.endswith("siteharbor-manifest.json") for name in names)
assert any(name.endswith("site.css") for name in names)
page_logs = [
event["payload"]["detail"]
for event in database.get_events(job["id"])
if event["kind"] == "progress"
and isinstance(event["payload"].get("detail"), dict)
and event["payload"]["detail"].get("kind") == "page"
]
assert {log["action"] for log in page_logs} == {"fetching", "captured"}
assert {log["url"] for log in page_logs} == {source_url}
def test_capture_cancels_while_a_resource_is_stalled(tmp_path) -> None: