From 2e8ada0be8d151b337251034cb9363556d5cda91 Mon Sep 17 00:00:00 2001 From: Exrienz Date: Mon, 23 Jun 2025 08:15:56 +0800 Subject: [PATCH 1/3] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 54b667c..8f9d09d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: Task Prioritizer DockerHub Push on: push: - branches: [main] + branches: [main,develop] jobs: build-and-publish: From 6f06bf5ac9b65a4969aaa536502bd43e11804556 Mon Sep 17 00:00:00 2001 From: Exrienz Date: Mon, 23 Jun 2025 08:25:22 +0800 Subject: [PATCH 2/3] Add time-based urgency boosts --- README.md | 17 ++++++++++++++++- src/index.php | 21 ++++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a94180d..7204979 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ Task priority uses a weighted formula that factors in criticality, effort, due d - **Mandays weight**: 15 - **Urgency max**: 80 - **Overdue boost**: 100 +- **Due date boosts**: + - 1 month left: +5 + - 1 week left: +10 + - 3 days left: +20 + - 1 day left: +30 Urgency uses a reciprocal formula where tasks become more urgent as the due date approaches, and overdue tasks receive a fixed boost: @@ -32,7 +37,17 @@ Urgency uses a reciprocal formula where tasks become more urgent as the due date if days_left < 0: urgency = OVERDUE_BOOST else: - urgency = URGENCY_MAX / (1 + days_left) + time_boost = 0 + if days_left <= 1: + time_boost = BOOST_1_DAY + elif days_left <= 3: + time_boost = BOOST_3_DAYS + elif days_left <= 7: + time_boost = BOOST_1_WEEK + elif days_left <= 30: + time_boost = BOOST_1_MONTH + + urgency = URGENCY_MAX / (1 + days_left) + time_boost score = (criticality * CRITICALITY_WEIGHT) + (EFFORT_WEIGHT / effort) diff --git a/src/index.php b/src/index.php index 5af07a2..183a4d3 100644 --- a/src/index.php +++ b/src/index.php @@ -109,14 +109,29 @@ function calculateTaskScore($task) { $CRITICALITY_WEIGHT = 50; $EFFORT_WEIGHT = 20; $MANDAYS_WEIGHT = 15; - $URGENCY_MAX = 80; // Increased from 40 + $URGENCY_MAX = 80; // Base urgency for due dates $OVERDUE_BOOST = 100; - // Urgency calculation (reciprocal for non-overdue, fixed boost for overdue) + // Additional boosts when approaching the due date + $BOOST_1_MONTH = 5; // <= 30 days + $BOOST_1_WEEK = 10; // <= 7 days + $BOOST_3_DAYS = 20; // <= 3 days + $BOOST_1_DAY = 30; // <= 1 day + + // Urgency calculation with stepped boosts as the due date approaches if ($daysLeft < 0) { $urgencyScore = $OVERDUE_BOOST; } else { - $urgencyScore = $URGENCY_MAX / (1 + $daysLeft); // DaysLeft=0 gives 80, 1 gives 40, etc. + $urgencyScore = $URGENCY_MAX / (1 + $daysLeft); + if ($daysLeft <= 1) { + $urgencyScore += $BOOST_1_DAY; + } elseif ($daysLeft <= 3) { + $urgencyScore += $BOOST_3_DAYS; + } elseif ($daysLeft <= 7) { + $urgencyScore += $BOOST_1_WEEK; + } elseif ($daysLeft <= 30) { + $urgencyScore += $BOOST_1_MONTH; + } } $score = 0; From 90bffe2f1139e93b8e91786f122d33fcf27fc28c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 02:51:06 +0000 Subject: [PATCH 3/3] feat: add delete confirmation dialog - Added a browser-native confirmation dialog to the task delete action to prevent accidental data loss. - Created .Jules/palette.md to track UX learnings. --- .Jules/palette.md | 9 +++++++++ src/index.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..01da625 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,9 @@ +# Palette's Journal + +## 2024-05-22 - Missing Delete Confirmation +**Learning:** Destructive actions like "Delete" should always have a confirmation step to prevent accidental data loss. This is a critical safety feature. +**Action:** Add `onsubmit="return confirm('...')" ` to delete forms. + +## 2024-05-22 - Form Accessibility +**Learning:** Relying on placeholders or default option text for form labels is bad for accessibility. Screen readers may not read them correctly, and placeholders disappear when typing. +**Action:** Use `