Skip to content

Unarchived threads are re-archived by the next auto-archive sweep #515

Description

@Tryanks

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

  1. A project has more than 30 threads (default auto_archive_keep_count).
  2. Settings → Archived Threads → Unarchive a thread whose updated_at is older than 7 days.
  3. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions