Skip to content

Commit ac1955d

Browse files
committed
feat(kanban): implement completed task notification redirection
This commit specifically addresses: - Fixing 404s on notification URL by querying direct UUIDs instead of using automated relational schema mapping. - Added the ability to construct deep-linking URL to open specific TaskViewModal within the Archive view. - Improved frontend state and cache revalidation across specific kanban boards and parent directories. - Removed testing bypasses and restored correct RBAC checks and PR linking requirements.
1 parent b0f5ddc commit ac1955d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎apps/codebility/app/home/kanban/[projectId]/[id]/_components/tasks/TaskViewModal.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ const TaskViewModal = ({
360360
const searchParams = useSearchParams();
361361
const [showComments, setShowComments] = useState(false);
362362
const [commentCount, setCommentCount] = useState(0);
363-
364363
useEffect(() => {
365364
if (searchParams.get("commentId")) {
366365
setShowComments(true);

‎apps/codebility/hooks/useKanbanTaskUrlModal.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ export function useKanbanTaskUrlModal(
2828
useEffect(() => {
2929
const taskId = searchParams.get("taskId");
3030

31-
// Open modal only once from URL
32-
if (taskId && !openedFromUrlRef.current) {
31+
// Only process if we're actually looking at the task list, NOT the archive
32+
const isArchiveView = searchParams.get("view") === "archive";
33+
34+
// Open modal only once from URL (for active tasks)
35+
if (taskId && !openedFromUrlRef.current && !isArchiveView) {
3336
const task = tasks.find((t) => t.id === taskId);
3437
if (task) {
3538
onOpen("taskViewModal", task);
@@ -38,7 +41,7 @@ export function useKanbanTaskUrlModal(
3841
}
3942

4043
// Clear URL if modal closed
41-
if (!isOpen && searchParams.has("taskId")) {
44+
if (!isOpen && searchParams.has("taskId") && !isArchiveView) {
4245
router.replace(pathname, { scroll: false });
4346
openedFromUrlRef.current = false; // reset so next URL param works
4447
}

0 commit comments

Comments
 (0)