Skip to content

(sidebar): archiving a project folder hides the folder until a session appears in it #473

Description

@jbr-sekoia

Request

Archiving a project folder in the sidebar archives every session in it, and also hides the folder itself. The folder comes back, as the same project with its settings, when it is added again or when a new session appears in it. Until then it stays hidden.

Current state (375decb)

  • The folder's archive button (public/sidebar.js:875, handler at :1087) stops then archives each top-level session of the project; the folder stays in the sidebar, empty or showing only archived sessions.
  • A separate mechanism hides a project: remove-project (main.js:741) adds it to global.hiddenProjects, which the scans skip (main.js:1273/:1303, :1456/:1474). Adding the project again removes it from the list (main.js:708, main.js:883).
  • A hidden project stays hidden when a new session is created in it: the scans skip its sessions, whatever their age.

Wanted

  • The folder's archive action, once its sessions are archived, hides the folder. It is the same project: same folder key and settings, nothing deleted.
  • The folder reappears when it is added again (existing path), or when a session appears in it after it was archived: a new transcript, or a session started from Switchboard or from the CLI in that directory.
  • Archived sessions stay archived when the folder reappears.

Decisions taken

  • The archive button opens a modal with checkboxes instead of a confirm(): archive the project's sessions (checked by default; running ones are stopped first), and disable its enabled schedules (shown only when there is one, checked by default). Hiding the folder is the action itself, not a box. Each box remembers its last state.
  • Archiving does not go through remove-project, which deletes the project's settings, cache, search index and schedule registration. An archived folder keeps all of them.
  • A disabled schedule creates no session, so it cannot bring the folder back. Schedules stay disabled when the folder reappears; whether to re-enable them is an open question in the specification.
  • The modal is a shared component: (sidebar): delete a project folder, choosing what goes with it #474 (delete a project) reuses it.

The specification, with acceptance criteria, follows in a comment once it has been reviewed.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions