# Tasks: Frontend Navigation Redesign

**Feature Branch**: `015-frontend-nav-redesign`
**Status**: Completed
**Spec**: [specs/015-frontend-nav-redesign/spec.md](../spec.md)
**Plan**: [specs/015-frontend-nav-redesign/plan.md](../plan.md)

## Phase 1: Setup

*Goal: Initialize project structure for the new feature.*

- [x] T001 Create backup component directory structure
  - Path: `frontend/src/components/backups/`
- [x] T002 Create backup page route directory
  - Path: `frontend/src/routes/tools/backups/`

## Phase 2: Foundational

*Goal: Prepare core components for integration and verify backend connectivity.*

- [x] T003 Verify backend API endpoints for backups (via `009-backup-scheduler`)
  - Path: `backend/src/api/routes/tasks.py` (or relevant backup route)
- [x] T004 Define Backup types and interfaces in frontend
  - Path: `frontend/src/types/backup.ts`

## Phase 3: User Story 1 - Centralized Tool Access via Dashboard

*Goal: Update the main dashboard to include all tool entry points.*

**User Story**: As a user, I want to access all main tools (Backups, Mapper, Storage) from the main Dashboard so that I have a central hub for operations. (P1)

- [x] T005 [US1] Update DashboardGrid to include "Backup Manager" card
  - Path: `frontend/src/components/DashboardGrid.svelte`
- [x] T006 [US1] Update DashboardGrid to ensure "Dataset Mapper" and "Storage Manager" cards are present
  - Path: `frontend/src/components/DashboardGrid.svelte`
- [x] T007 [US1] Remove "Dataset Search" card from DashboardGrid
  - Path: `frontend/src/components/DashboardGrid.svelte`

## Phase 4: User Story 2 - Simplified Navigation Bar

*Goal: Clean up the Navbar to show only global context items.*

**User Story**: As a user, I want a clean Navbar containing only global context items (Tasks, Settings) so that the interface is less cluttered and navigation is distinct from tool usage. (P1)

- [x] T008 [US2] Remove "Dataset Search" link from Navbar
  - Path: `frontend/src/components/Navbar.svelte`
- [x] T009 [US2] Remove "Dataset Mapper" link from Navbar
  - Path: `frontend/src/components/Navbar.svelte`
- [x] T010 [US2] Remove "Deployment Environments" link from Navbar
  - Path: `frontend/src/components/Navbar.svelte`
- [x] T011 [US2] Verify "Tasks" and "Settings" links remain in Navbar
  - Path: `frontend/src/components/Navbar.svelte`
- [x] T012 [US2] Remove "Run backup" button from Tasks page
  - Path: `frontend/src/routes/tasks/+page.svelte` (or relevant component)

## Phase 5: Backup Management UI

*Goal: Implement the dedicated Backup Management interface.*

**User Story**: (Implicit P1 from FR-004) System MUST provide access to the full Backup Management component via the Dashboard link.

- [x] T013 [US1] Create BackupList component to display existing backups (Must use `src/lib/ui` components and `src/lib/i18n`)
  - Path: `frontend/src/components/backups/BackupList.svelte`
- [x] T014 [US1] Create BackupManager main component (container) (Must use `src/lib/ui` components and `src/lib/i18n`)
  - Path: `frontend/src/components/backups/BackupManager.svelte`
- [x] T015 [US1] Implement "Create Backup" functionality in BackupManager (Must use `src/lib/ui` components and `src/lib/i18n`)
  - Path: `frontend/src/components/backups/BackupManager.svelte`
- [x] T016 [US1] Implement "Restore Backup" functionality (if supported by backend) (Must use `src/lib/ui` components and `src/lib/i18n`)
  - Path: `frontend/src/components/backups/BackupManager.svelte`
- [x] T017 [US1] Create Backup page to host the manager (Must use `src/lib/ui` components and `src/lib/i18n`)
  - Path: `frontend/src/routes/tools/backups/+page.svelte`
- [x] T017b [US1] Implement Backup Schedule configuration in BackupManager
  - Path: `frontend/src/components/backups/BackupManager.svelte`
- [x] T017c [US1] Implement "Go to Storage" navigation in BackupList
  - Path: `frontend/src/components/backups/BackupList.svelte`

## Phase 6: User Story 3 - Deprecation

*Goal: Remove deprecated routes and code.*

**User Story**: As a user, I want removed features (Dataset Search, Deployment Environments) to be inaccessible so that I don't use deprecated workflows. (P2)

- [x] T018 [US3] Delete Dataset Search route
  - Path: `frontend/src/routes/tools/search/` (delete directory)
- [x] T019 [US3] Delete Deployment Environments route
  - Path: `frontend/src/routes/settings/environments/` (delete directory)
- [x] T020 [US3] Delete Dataset Search component (if not used elsewhere)
  - Path: `frontend/src/components/tools/SearchTool.svelte`
- [x] T021 [US3] Delete EnvSelector component (if not used elsewhere)
  - Path: `frontend/src/components/EnvSelector.svelte`

## Phase 7: Polish & Cross-Cutting

*Goal: Final verification and cleanup.*

- [x] T022 Verify all navigation links work correctly
  - Path: `frontend/src/components/Navbar.svelte`
- [x] T023 Verify responsive layout of new Dashboard grid
  - Path: `frontend/src/components/DashboardGrid.svelte`
- [x] T024 Ensure i18n strings are extracted for new Backup UI
  - Path: `frontend/src/lib/i18n/` (or relevant locale files)
- [x] T025 Verify "Run backup" action successfully triggers backup job (Manual/E2E check)
  - Path: `frontend/src/components/backups/BackupManager.svelte`

## Dependencies

1. **Phase 1 & 2** must be completed first.
2. **Phase 3 (Dashboard)** and **Phase 4 (Navbar)** can be done in parallel.
3. **Phase 5 (Backup UI)** depends on Phase 1 & 2.
4. **Phase 6 (Deprecation)** should be done last to ensure no regressions before removal.

## Implementation Strategy

1. **Setup**: Create the new directory structure.
2. **Dashboard & Navbar**: Quick wins to reshape the navigation.
3. **Backup UI**: The core development effort. Connect to existing backend.
4. **Cleanup**: Remove old code once the new flows are verified.