diff --git a/crates/dizey-core/src/store/turso_store.rs b/crates/dizey-core/src/store/turso_store.rs index 9bed821..6d02e97 100644 --- a/crates/dizey-core/src/store/turso_store.rs +++ b/crates/dizey-core/src/store/turso_store.rs @@ -1640,16 +1640,21 @@ impl DetailReads for TursoStore { async fn dependencies_for_task(&self, task_id: &str) -> Result> { // Both directions in one round trip: the leading column says which. + // `cleared_at` is only ever set by an unlink, so a cleared row is not a + // link any more and does not belong on the screen. A link whose blocker + // is finished still shows — that is `done_at`, and it reads as cleared. let mut rows = self .conn .query( "SELECT 1, t.id, t.task_key, t.title, d.cleared_at, t.done_at \ FROM task_dependency d JOIN task t ON t.id = d.blocking_task_id \ - WHERE d.blocked_task_id = ?1 AND t.deleted_at IS NULL \ + WHERE d.blocked_task_id = ?1 AND d.cleared_at IS NULL \ + AND t.deleted_at IS NULL \ UNION ALL \ SELECT 0, t.id, t.task_key, t.title, d.cleared_at, t.done_at \ FROM task_dependency d JOIN task t ON t.id = d.blocked_task_id \ - WHERE d.blocking_task_id = ?2 AND t.deleted_at IS NULL", + WHERE d.blocking_task_id = ?2 AND d.cleared_at IS NULL \ + AND t.deleted_at IS NULL", params![task_id, task_id], ) .await diff --git a/crates/dizey-web/src/board.rs b/crates/dizey-web/src/board.rs index bdbefd6..78c7364 100644 --- a/crates/dizey-web/src/board.rs +++ b/crates/dizey-web/src/board.rs @@ -533,8 +533,10 @@ fn Card( } } +/// A person as a circle. `extra` carries the size the surface wants — the +/// board's own 22px is the default, the modal asks for its 18px and 28px. #[component] -fn Avatar(person: Person) -> impl IntoView { +pub(crate) fn Avatar(person: Person, #[prop(optional)] extra: &'static str) -> impl IntoView { let initials = person.initials(); // Five tones from the mockups' palette, picked from the id so a person // keeps the same one wherever they appear. @@ -544,7 +546,7 @@ fn Avatar(person: Person) -> impl IntoView { .fold(0u32, |acc, b| acc.wrapping_mul(31).wrapping_add(b as u32)) % 5; view! { - + {initials} } diff --git a/crates/dizey-web/src/detail.rs b/crates/dizey-web/src/detail.rs index a44557d..59469a6 100644 --- a/crates/dizey-web/src/detail.rs +++ b/crates/dizey-web/src/detail.rs @@ -14,6 +14,7 @@ use serde::{Deserialize, Serialize}; use time::Date; use crate::auth::{Me, Refusal}; +use crate::board::Avatar; /// A task this board could be linked to: enough to name it in the picker and /// nothing more. @@ -101,13 +102,16 @@ pub async fn fetch_task(task_id: String) -> Result = detail .blocked_by .iter() .chain(detail.blocks.iter()) + .filter(|edge| edge.cleared_at.is_none()) .map(|edge| edge.task_id.as_str()) .collect(); for task in store.tasks_for_board(&board.id).await.map_err(fail)? { @@ -145,30 +149,50 @@ pub async fn fetch_task(task_id: String) -> Result