fix(startup): run recovery once and avoid scanning idle projects
This commit is contained in:
1 parent
45a9cc6e0c
commit
224f4e7c1e
6 files changed
+133
-22
No files matched your search
@@ -38,7 +38,7 @@ def test_explicit_data_root_still_overrides_frozen_portable_default(tmp_path: Pa
|
||||
assert application.resolve_data_root(override) == override.resolve()
|
||||
|
||||
|
||||
def test_main_configures_logging_before_qapplication_and_logs_recovery(tmp_path: Path, monkeypatch) -> None:
|
||||
def test_main_configures_logging_before_qapplication(tmp_path: Path, monkeypatch) -> None:
|
||||
"""Moving logging after Qt creation would lose startup and recovery diagnostics."""
|
||||
from dx_productivity.trial_task_center import application
|
||||
from dx_productivity.trial_task_center.logging_setup import configure_logging
|
||||
@@ -53,9 +53,6 @@ def test_main_configures_logging_before_qapplication_and_logs_recovery(tmp_path:
|
||||
assert events == ["logging"]
|
||||
self.path = path
|
||||
|
||||
def recover_interrupted_work(self) -> tuple[str, ...]:
|
||||
return ("project-1",)
|
||||
|
||||
def close(self) -> None:
|
||||
events.append("closed")
|
||||
|
||||
@@ -85,7 +82,6 @@ def test_main_configures_logging_before_qapplication_and_logs_recovery(tmp_path:
|
||||
|
||||
assert application.main(["--data-root", str(tmp_path)]) == 0
|
||||
assert events == ["logging", "window", "shown", "closed"]
|
||||
assert "recovered_interrupted_projects=project-1" in context.application_log_path.read_text(encoding="utf-8")
|
||||
assert f"version={application.VERSION}" in context.application_log_path.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user