feat: add edit sprint functionality and completed sprints section to project interactions - #373
Conversation
…project interactions
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This PR adds two related project-interactions features across 20 files (18 of which are i18n locale additions):
- Edit sprint modal —
apps/web/src/routes/_authenticated/projects/$projectId/interactions/sprints/$sprintId.tsxnow lets users withsprints.writepermission edit a sprint's name, goal, start date, and end date via a new inline modal backed by the existingupdateSprintAPI. - Completed sprints sidebar section —
apps/web/src/components/app-shell/app-sidebar.tsxnow renders a collapsible "Completed Sprints" section below active sprints, sorted byupdated_atdescending. - i18n coverage — added
interactions.completedSprintsinappShell.jsonandlayout.sprintDetail.editSprint/editSprintModal.*keys inprojects.jsonfor all supported locales.
The edit flow reuses the existing UpdateSprintPayload/updateSprint client, invalidates the correct query keys, and matches the date-conversion pattern already used by StartSprintModal. The completed-sprints list is scoped to users who can view sprints and mirrors the active-sprint item styling. No blocking issues.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The latest commit polishes the initial edit-sprint and completed-sprints work:
- Persisted completed-sprints collapse state —
app-sidebar.tsxnow stores the collapsed/expanded state per-project inlocalStorage(paca:sidebar-completed-sprints-collapsed:${projectId}), defaulting to collapsed and guarded against storage exceptions. - Kept sprint counts fresh during task edits —
interaction-layout.tsxnow invalidates["projects", projectId, "sprints"]after task status changes, creation, updates, and deletion so the Complete Sprint dialog's move-to-sprint suggestions reflect current incomplete-task counts. - Added client-side date validation and error handling — the edit sprint modal validates that the due date is not before the start date (string comparison on
YYYY-MM-DDis lexicographically correct), disables save while invalid or empty, surfaces a generic error message on API failure, and closes on Escape via a document-level listener that matchesStartSprintModal. - Added missing i18n strings — all 9 locales received
editSprintModal.dateRangeErrorandeditSprintModal.error.
Verified that the invalidated query keys exactly match sprintsQueryOptions / sprintQueryOptions. No blocking issues.
Kimi K2 (free via Pullfrog for OSS) | 𝕏

Summary
Previously, completed sprints disappeared from the sidebar entirely once closed, and sprint metadata (name, goal, start/due date) could only be set once when starting a sprint — there was no way to fix a typo or adjust dates afterward.
sprints.write) that opens a modal to update the sprint's name, goal, start date, and due date — available regardless of sprint status, including completed sprints.Changes
apps/web/src/components/app-shell/app-sidebar.tsx— collapsible "Completed Sprints" list in the project sidebar, filtered from the existing sprints query.apps/web/src/routes/_authenticated/projects/$projectId/interactions/sprints/$sprintId.tsx— "Edit sprint" button + modal wired to the existingPATCH /projects/:projectId/sprints/:sprintIdendpoint (no backend changes needed — it already supported updating these fields for any sprint status).apps/web/src/i18n/locales/*/{appShell,projects}.json— translated strings forinteractions.completedSprintsandlayout.sprintDetail.editSprint(Modal).Test plan
tsc -b --noEmitpassesbiome checkpasses