diff --git a/specs/010-refactor-cli-to-web/tasks.md b/specs/010-refactor-cli-to-web/tasks.md index b44bdc7..00f8e12 100644 --- a/specs/010-refactor-cli-to-web/tasks.md +++ b/specs/010-refactor-cli-to-web/tasks.md @@ -1,55 +1,55 @@ # Tasks: Refactor CLI Scripts to Web Application **Feature**: Refactor CLI Scripts to Web Application -**Status**: Pending +**Status**: Completed **Spec**: [specs/010-refactor-cli-to-web/spec.md](specs/010-refactor-cli-to-web/spec.md) ## Phase 1: Core & Infrastructure *Goal: Enhance TaskManager to support returning results and set up Connection management.* -- [ ] T001 Create `backend/src/models/connection.py` with `ConnectionConfig` model (ensure secure storage of credentials) -- [ ] T002 Update `backend/src/core/task_manager/models.py` to add `result: Optional[Dict[str, Any]]` field to `Task` model -- [ ] T003 Update `backend/src/core/task_manager/manager.py` to capture `plugin.execute` return value and store it in `task.result` -- [ ] T004 [P] Create `frontend/src/services/toolsService.js` for generic Task API communication (run task, poll status, get result) -- [ ] T005 [P] Create `frontend/src/services/connectionService.js` for Connection API -- [ ] T006 Create `frontend/src/components/tools/` directory structure +- [x] T001 Create `backend/src/models/connection.py` with `ConnectionConfig` model (ensure secure storage of credentials) +- [x] T002 Update `backend/src/core/task_manager/models.py` to add `result: Optional[Dict[str, Any]]` field to `Task` model +- [x] T003 Update `backend/src/core/task_manager/manager.py` to capture `plugin.execute` return value and store it in `task.result` +- [x] T004 [P] Create `frontend/src/services/toolsService.js` for generic Task API communication (run task, poll status, get result) +- [x] T005 [P] Create `frontend/src/services/connectionService.js` for Connection API +- [x] T006 Create `frontend/src/components/tools/` directory structure ## Phase 2: User Story 1 - Search Datasets *Goal: Enable users to search datasets via the Web UI using a Plugin.* -- [ ] T007 [US1] Implement `SearchPlugin` in `backend/src/plugins/search.py` (port logic from `search_script.py`, return results) -- [ ] T008 [US1] Create `frontend/src/components/tools/SearchTool.svelte` component (triggers SearchPlugin, displays results) -- [ ] T009 [US1] Create `frontend/src/routes/tools/search/+page.svelte` page +- [x] T007 [US1] Implement `SearchPlugin` in `backend/src/plugins/search.py` (port logic from `search_script.py`, return results) +- [x] T008 [US1] Create `frontend/src/components/tools/SearchTool.svelte` component (triggers SearchPlugin, displays results) +- [x] T009 [US1] Create `frontend/src/routes/tools/search/+page.svelte` page ## Phase 3: User Story 2 - Map Dataset Columns *Goal: Enable users to map columns using saved connections via a Plugin.* -- [ ] T010 [US2] Create API endpoints for Connections (`GET`, `POST`, `DELETE`) in `backend/src/api/routes/connections.py` -- [ ] T011 [US2] Register `connections` router in `backend/src/api/routes/__init__.py` -- [ ] T012 [US2] Implement `MapperPlugin` in `backend/src/plugins/mapper.py` (port logic from `run_mapper.py`, support `connection_id`) -- [ ] T013 [US2] Create `frontend/src/components/tools/ConnectionForm.svelte` and `ConnectionList.svelte` -- [ ] T014 [US2] Create `frontend/src/routes/settings/connections/+page.svelte` for managing connections -- [ ] T015 [US2] Create `frontend/src/components/tools/MapperTool.svelte` component -- [ ] T016 [US2] Create `frontend/src/routes/tools/mapper/+page.svelte` page +- [x] T010 [US2] Create API endpoints for Connections (`GET`, `POST`, `DELETE`) in `backend/src/api/routes/connections.py` +- [x] T011 [US2] Register `connections` router in `backend/src/api/routes/__init__.py` +- [x] T012 [US2] Implement `MapperPlugin` in `backend/src/plugins/mapper.py` (port logic from `run_mapper.py`, support `connection_id`) +- [x] T013 [US2] Create `frontend/src/components/tools/ConnectionForm.svelte` and `ConnectionList.svelte` +- [x] T014 [US2] Create `frontend/src/routes/settings/connections/+page.svelte` for managing connections +- [x] T015 [US2] Create `frontend/src/components/tools/MapperTool.svelte` component +- [x] T016 [US2] Create `frontend/src/routes/tools/mapper/+page.svelte` page ## Phase 4: User Story 3 - System Debugging *Goal: Enable users to run system diagnostics via a Plugin.* -- [ ] T017 [US3] Implement `DebugPlugin` in `backend/src/plugins/debug.py` (port logic from `debug_db_api.py`, `get_dataset_structure.py`) -- [ ] T018 [US3] Create `frontend/src/components/tools/DebugTool.svelte` component -- [ ] T019 [US3] Create `frontend/src/routes/tools/debug/+page.svelte` page +- [x] T017 [US3] Implement `DebugPlugin` in `backend/src/plugins/debug.py` (port logic from `debug_db_api.py`, `get_dataset_structure.py`) +- [x] T018 [US3] Create `frontend/src/components/tools/DebugTool.svelte` component +- [x] T019 [US3] Create `frontend/src/routes/tools/debug/+page.svelte` page ## Phase 5: Cleanup & Polish *Goal: Remove legacy scripts and ensure system stability.* -- [ ] T020 Verify all new tools are functional (Manual Test) -- [ ] T021 Verify existing Backup functionality fully covers legacy `backup_script.py` capabilities -- [ ] T022 Remove legacy script `search_script.py` -- [ ] T023 Remove legacy script `run_mapper.py` -- [ ] T024 Remove legacy script `debug_db_api.py` -- [ ] T025 Remove legacy script `get_dataset_structure.py` -- [ ] T026 Remove legacy script `backup_script.py` -- [ ] T027 Update main navigation in `frontend/src/components/Navbar.svelte` to include "Tools" dropdown +- [x] T020 Verify all new tools are functional (Manual Test) +- [x] T021 Verify existing Backup functionality fully covers legacy `backup_script.py` capabilities +- [x] T022 Remove legacy script `search_script.py` +- [x] T023 Remove legacy script `run_mapper.py` +- [x] T024 Remove legacy script `debug_db_api.py` +- [x] T025 Remove legacy script `get_dataset_structure.py` +- [x] T026 Remove legacy script `backup_script.py` +- [x] T027 Update main navigation in `frontend/src/components/Navbar.svelte` to include "Tools" dropdown ## Dependencies