feat(projects): more intuitive task add/edit and back nav (MAPPS-165) #158

Merged
nrupard merged 4 commits from feat/mapps-165-task-edit-ux into main 2026-06-15 19:14:13 +02:00
Owner

What

MAPPS-165: makes adding/editing project tasks more intuitive.

  1. Project Edit button moved into the detail-page header action group, next to View Tasks / Add Task / Delete (it was tucked on the Overview card and easy to miss). Order: [View Tasks][Add Task][Edit][Delete].
  2. Tasks overview is now click-to-edit. On /projects/:id/tasks, clicking a task row opens the same task editor the detail page uses.
  3. Back navigation added to the tasks-overview header ("Back to Project") - previously there was no way back after clicking View Tasks.

How

To give both pages one edit experience instead of duplicating ~200 lines, the task-edit modal (form + change history + PUT /tasks/{id}) is extracted from ProjectDetailPage into a shared TaskEditModal component. It seeds its own form state from the passed task, fetches that task's change history, and reports back via onsaved / onclose (the caller clears the selection and restarts its task list).

This is a net simplification of ProjectDetailPage: the inline modal plus its ~10 te_* signals and the per-task history resource are gone, replaced by a small if let Some(task) = ... { TaskEditModal { ... } }. ProjectTasksPage reuses the same component. RemoteTask / RemoteTaskStatus / RemoteUser gain PartialEq so they can pass as props.

Notes

  • No mokosh-server changes.
  • Not compiled locally (no Rust toolchain here). Mirrors the existing modal/resource idioms; CI (cargo clippy --all-targets -- -D warnings) gates. A reviewer pass found no compile/clippy issues (no dangling refs, props satisfy Clone+PartialEq, borrow/move clean, all touched component props exist).

Test plan

  • Project detail: the header shows View Tasks / Add Task / Edit / Delete; Edit opens the project-edit modal (was on the Overview card).
  • Detail Tasks card: clicking a task still opens the edit modal (now the shared one) with form + change history; save refreshes the list.
  • Tasks overview (/projects/:id/tasks): rows are clickable and open the task editor in place; save refreshes; "Back to Project" returns to the detail page.
## What MAPPS-165: makes adding/editing project tasks more intuitive. 1. **Project Edit button moved into the detail-page header** action group, next to View Tasks / Add Task / Delete (it was tucked on the Overview card and easy to miss). Order: `[View Tasks][Add Task][Edit][Delete]`. 2. **Tasks overview is now click-to-edit.** On `/projects/:id/tasks`, clicking a task row opens the same task editor the detail page uses. 3. **Back navigation** added to the tasks-overview header ("Back to Project") - previously there was no way back after clicking View Tasks. ## How To give both pages one edit experience instead of duplicating ~200 lines, the task-edit modal (form + change history + `PUT /tasks/{id}`) is extracted from `ProjectDetailPage` into a shared `TaskEditModal` component. It seeds its own form state from the passed task, fetches that task's change history, and reports back via `onsaved` / `onclose` (the caller clears the selection and restarts its task list). This is a net simplification of `ProjectDetailPage`: the inline modal plus its ~10 `te_*` signals and the per-task history resource are gone, replaced by a small `if let Some(task) = ... { TaskEditModal { ... } }`. `ProjectTasksPage` reuses the same component. `RemoteTask` / `RemoteTaskStatus` / `RemoteUser` gain `PartialEq` so they can pass as props. ## Notes - No mokosh-server changes. - Not compiled locally (no Rust toolchain here). Mirrors the existing modal/resource idioms; CI (`cargo clippy --all-targets -- -D warnings`) gates. A reviewer pass found no compile/clippy issues (no dangling refs, props satisfy Clone+PartialEq, borrow/move clean, all touched component props exist). ## Test plan - Project detail: the header shows View Tasks / Add Task / Edit / Delete; Edit opens the project-edit modal (was on the Overview card). - Detail Tasks card: clicking a task still opens the edit modal (now the shared one) with form + change history; save refreshes the list. - Tasks overview (`/projects/:id/tasks`): rows are clickable and open the task editor in place; save refreshes; "Back to Project" returns to the detail page.
feat(projects): more intuitive task add/edit and back nav
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 5s
117ed9cae0
MAPPS-165.

- Move the project Edit button into the detail-page header action group, next to View Tasks / Add Task / Delete, so all project actions sit together (it was tucked on the Overview card, easy to miss).
- Make the project-tasks overview (/projects/:id/tasks) rows click-to-edit, opening the same task editor the detail page uses.
- Add a "Back to Project" button to the tasks-overview header (there was no way back after clicking View Tasks).

To give both pages one edit experience, the task-edit modal (form + change history + PUT /tasks/{id}) is extracted from ProjectDetailPage into a shared `TaskEditModal` component that seeds its own state from the passed task and reports back via onsaved/onclose. This removes the inline modal and its ~10 te_* signals + history resource from ProjectDetailPage (net simplification) and is reused verbatim by ProjectTasksPage. `RemoteTask`/`RemoteTaskStatus`/`RemoteUser` gain `PartialEq` so they can pass as props.

Not compiled locally (no Rust toolchain in this environment); mirrors existing modal/resource idioms and is gated by CI (cargo clippy --all-targets -- -D warnings).

#MAPPS-165

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
style(projects): apply rustfmt to task edit signals and history
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 55s
7bbd772050
cargo fmt --check failed in CI (check.yml) on the te_priority/te_assignee/te_estimated signal initializers and the task_history binding in src/pages/projects.rs. rustfmt reflows the long single-line use_signal closures into multi-line block form. Applying cargo fmt --all brings the file in line so the formatting step passes; clippy, the wasm build, and cargo test --lib all stay green.

#MAPPS-182

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code-review follow-up: store `selected_task` as `Option<RemoteTask>` instead of `Option<Uuid>` and render the edit modal directly from it, dropping the `tasks.iter().find(id)` lookup. The modal now shows the task captured at click time, independent of the live task list, so a transient `tasks_resource` refetch (e.g. a tenant switch) can no longer make the modal vanish while the selection stays set. Applies to both the project detail page and the tasks overview.

#MAPPS-165

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/feat/mapps-165-task-edit-ux' into feat/mapps-165-task-edit-ux
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 57s
Create release / Create release from merged PR (pull_request) Has been skipped
ea858f40b6
nrupard deleted branch feat/mapps-165-task-edit-ux 2026-06-15 19:14:13 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!158
No description provided.