Summary
Unarchiving a thread does not bump its updated_at, so the next auto-archive sweep can immediately archive it again.
Where
unarchive_session (crates/runtime/src/app/sessions.rs) only clears archived_at on cascade members carrying the same timestamp.
auto_archive_candidates (crates/core/src/project.rs) treats a thread as eligible when its sibling rank is >= keep_count and now - updated_at > max_idle_secs.
- Sweeps run from the sidebar at launch and when a project list is expanded ("show more",
crates/ui/src/sidebar.rs).
Scenario
- A project has more than 30 threads (default
auto_archive_keep_count).
- Settings → Archived Threads → Unarchive a thread whose
updated_at is older than 7 days.
- Relaunch, or expand the project's list → the thread is archived again.
Found by reading the code; not reproduced.
Resolution
The planned removal of auto-archive (#526) removes the sweep and with it this bug. If that slips, unarchive should stamp a fresh activity time (or the sweep should skip threads unarchived after their last activity).
Summary
Unarchiving a thread does not bump its
updated_at, so the next auto-archive sweep can immediately archive it again.Where
unarchive_session(crates/runtime/src/app/sessions.rs) only clearsarchived_aton cascade members carrying the same timestamp.auto_archive_candidates(crates/core/src/project.rs) treats a thread as eligible when its sibling rank is>= keep_countandnow - updated_at > max_idle_secs.crates/ui/src/sidebar.rs).Scenario
auto_archive_keep_count).updated_atis older than 7 days.Found by reading the code; not reproduced.
Resolution
The planned removal of auto-archive (#526) removes the sweep and with it this bug. If that slips, unarchive should stamp a fresh activity time (or the sweep should skip threads unarchived after their last activity).