apache / apache/maka

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

Open
#5,189 1 comment 0 reactions 1 assignee Claimed by @Phoenix500526 View on GitHub
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

## 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

- #2985 moved archived-task management to Settings.
- #4375 exposed the stale branch during the archive-action cleanup.
- #5190 implements this cleanup.

Drafted with OpenAI Codex.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.