Show urgency multiplier on overdue tasks and balance seed data
Display urgency as a red "2.3x" label on overdue task cards. Adjust
seed task to spread due dates symmetrically around today so roughly
half are overdue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
change rulpsuwxnktnpttunxyrsmpnpsutwywp
commit 349f3c124af46b83aeed87eaf0c5c90e3acf1dfc
author Alpha Chen <alpha@kejadlen.dev>
date
parent rlvvzuyw
diff --git a/Rakefile b/Rakefile
index 99ca718..51dee10 100644
--- a/Rakefile
+++ b/Rakefile
@@ -62,7 +62,8 @@ task :seed do
   notes.each do |note|
     unit = max_count.keys.sample
     count = rand(1..max_count.fetch(unit))
-    due_date = Date.today + rand(-overdue_spread.fetch(unit)..14)
+    spread = overdue_spread.fetch(unit)
+    due_date = Date.today + rand(-spread..spread)
 
     Series.create_with_first_task(
       user: user,
diff --git a/lib/ketchup/views/home.rb b/lib/ketchup/views/home.rb
index 45cdb1c..1b405d8 100644
--- a/lib/ketchup/views/home.rb
+++ b/lib/ketchup/views/home.rb
@@ -104,6 +104,10 @@ module Views
               unit = task[:interval_unit]
               plain "Every #{count} #{count == 1 ? unit : "#{unit}s"}"
             end
+            if task.urgency > 0
+              span(class: "task-meta-sep") { "\u00B7" }
+              span(class: "task-urgency") { "#{format("%.1f", task.urgency)}x" }
+            end
           end
         end
         form(method: "post", action: "/tasks/#{task[:id]}/complete", class: "complete-form") do
diff --git a/public/css/app.css b/public/css/app.css
index 8d5b698..46627cb 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -159,6 +159,11 @@ h1 { font-size: var(--step-2); }
   color: #888;
 }
 
+.task-urgency {
+  color: #c0392b;
+  font-weight: 600;
+}
+
 .empty {
   color: #888;
   font-style: italic;