Skip to content

refactor(ui): remove the unreachable task-rail unarchive path #5189

Description

@Phoenix500526

Context

Archived tasks moved from the task rail to Settings in #2985. The current
navigation path applies sessionMatchesRail before it builds the rail, and
that predicate excludes every session whose isArchived flag is true.

The task row renderer still carries the old restore path:

  • SessionItemActions switches between Archive and Unarchive based on
    session.isArchived.
  • SessionRowActions exposes onUnarchive.
  • The Desktop provider, UI copy, tests, and stories still supply that callback.

An archived task cannot reach SessionItemActions through the production
rail, so the Unarchive branch cannot run. Keeping it makes the rail contract
look broader than the UI it represents and suggests that task restoration is
owned by the rail, even though Settings owns that flow now.

This was found while reviewing #4375.

Scope

  • Make the task row menu call onArchive unconditionally.
  • Remove SessionRowActions.onUnarchive and the Desktop provider wiring.
  • Remove the sessions.unarchive UI copy that only serves this branch.
  • Update the affected test and Story fixtures to match the smaller contract.

Non-goals

  • Do not change the restore action in Settings > Archived Tasks.
  • Do not remove the controller, service, preload, or Runtime Host support for
    restoring archived tasks.
  • Do not change archived-project restore or Work Board restore behavior.
  • Keep ArchiveRestore; archived projects still use that icon.
  • Do not change any reachable user-facing behavior.

Acceptance criteria

  • The task rail exposes Archive, not a conditional Archive/Unarchive action.
  • SessionRowActions and its callers no longer contain onUnarchive.
  • Settings can still restore archived tasks.
  • Archived projects and Work Board items can still be restored.
  • UI tests, Desktop typecheck, lint, and formatting pass.

Related

Drafted with OpenAI Codex.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions