diff --git a/crates/izlek-core/src/mail.rs b/crates/izlek-core/src/mail.rs index f8d4a27..6fa95bb 100644 --- a/crates/izlek-core/src/mail.rs +++ b/crates/izlek-core/src/mail.rs @@ -533,9 +533,11 @@ impl Engine { ) -> crate::store::Result { let mut report = Report::default(); for send in self.store.sends_owed(now, limit).await? { - // An invite owes no rule and no event: it carries its own subject - // and body, composed once at mint time. - if send.kind == SendKind::Invite { + // An invite and an admin's notice both owe no rule and no event: + // each carries its own subject and body, composed once at mint + // time. Without this arm a notice falls through to the rule path, + // finds no rule_id, and is skipped every run — queued forever. + if matches!(send.kind, SendKind::Invite | SendKind::Notice) { let mail = Outgoing { to: send.recipient.clone(), subject: send.subject.clone().unwrap_or_default(), diff --git a/crates/izlek-core/tests/store.rs b/crates/izlek-core/tests/store.rs index f9b6277..0222822 100644 --- a/crates/izlek-core/tests/store.rs +++ b/crates/izlek-core/tests/store.rs @@ -5215,3 +5215,37 @@ async fn a_queued_notice_is_pending_and_due_and_on_the_queue() { "not in mail_queue: {mail_queue:?}" ); } + +/// An admin's notice carries its own subject and body and owes no rule, the +/// same as an invite — the engine has to deliver it rather than skip past it +/// looking for a rule that was never there. +#[tokio::test] +async fn the_engine_delivers_a_notice_that_owes_no_rule() { + let (dir, store, _workspace, _admin) = shared().await; + let now = OffsetDateTime::now_utc(); + store + .queue_notice("grace@izlek.sh", "Heads up", "Body text", now) + .await + .unwrap(); + + let mailer = Remembering::taking_everything(); + let engine = Engine::new(store.clone(), mailer.clone(), "https://izlek.sh"); + let report = engine + .deliver_owed(now + Duration::minutes(1), 10) + .await + .unwrap(); + + assert_eq!(report.sent, 1, "{report:?}"); + let sent = mailer.sent(); + assert_eq!(sent.len(), 1, "{sent:?}"); + assert_eq!(sent[0].to, "grace@izlek.sh"); + assert_eq!(sent[0].subject, "Heads up"); + assert_eq!(sent[0].body, "Body text"); + + let owed = store + .sends_owed(now + Duration::hours(2), 10) + .await + .unwrap(); + assert!(owed.is_empty(), "a delivered notice is no longer owed: {owed:?}"); + std::fs::remove_dir_all(dir).ok(); +} diff --git a/crates/izlek-web/src/detail.rs b/crates/izlek-web/src/detail.rs index 4055961..8d83499 100644 --- a/crates/izlek-web/src/detail.rs +++ b/crates/izlek-web/src/detail.rs @@ -1583,7 +1583,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab) } if tab == Tab::Comments { -
+
(t(lang, Key::Comments)) (detail.comments.len()) @@ -1597,7 +1597,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab) } if tab == Tab::Activity { -
+
(t(lang, Key::Activity))
for entry in &detail.activity { @@ -1612,7 +1612,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab) } if tab == Tab::Mail { -
+
(t(lang, Key::Notifications))
for line in ¬ifications { @@ -1656,6 +1656,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab)
} + if tab == Tab::Task { (refused(cx, "delete_task", lang).await?)
@@ -1691,6 +1692,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab)
(t(lang, Key::Close))
+ }
if tab == Tab::Comments && may_comment { diff --git a/crates/izlek-web/src/i18n.rs b/crates/izlek-web/src/i18n.rs index 0fe0d52..129e425 100644 --- a/crates/izlek-web/src/i18n.rs +++ b/crates/izlek-web/src/i18n.rs @@ -236,6 +236,7 @@ pub enum Key { Logs, MailQueue, MailDecisions, + WorkspaceActivity, NothingOwed, NoDecisionsYet, NothingYet, @@ -727,6 +728,8 @@ pub fn t(lang: Lang, key: Key) -> &'static str { (MailQueue, Tr) => "Posta kuyruğu", (MailDecisions, En) => "Mail decisions", (MailDecisions, Tr) => "Posta kararları", + (WorkspaceActivity, En) => "Workspace activity", + (WorkspaceActivity, Tr) => "Çalışma alanı etkinliği", (NothingOwed, En) => "Nothing owed.", (NothingOwed, Tr) => "Bekleyen yok.", (NoDecisionsYet, En) => "No decisions yet.", diff --git a/crates/izlek-web/src/logs.rs b/crates/izlek-web/src/logs.rs index 01b236b..db9b991 100644 --- a/crates/izlek-web/src/logs.rs +++ b/crates/izlek-web/src/logs.rs @@ -922,7 +922,7 @@ async fn logs_screen(
@@ -1044,7 +1044,7 @@ async fn logs_screen( if section == Section::Activity {
-

(t(lang, Key::Activity))

+

(t(lang, Key::WorkspaceActivity))

diff --git a/style/main.scss b/style/main.scss index 2d19ca8..c20067d 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1799,14 +1799,38 @@ img.avatar { .detail-prose { display: block; margin: 0; + min-width: 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); white-space: pre-wrap; + // A pasted URL or an unbroken run of characters has no space to wrap at; + // without this it runs off the panel instead of folding. + overflow-wrap: anywhere; } .detail-prose-empty { color: var(--muted-soft); } +// One tab's region owns the whole body: the block stretches, and the list +// inside it pans rather than stopping short and leaving the panel empty +// below (the old 320px cap made sense only when every region shared one +// scrolling column). +.detail-body { display: flex; flex-direction: column; } + +.detail-block-fill { + flex: 1; + min-height: 0; + display: flex; + flex-direction: column; + + > .comment-list, + > .activity-list { + flex: 1; + min-height: 0; + max-height: none; + } +} + .detail-quiet { margin: 0; font-size: 13px; @@ -2018,6 +2042,9 @@ img.avatar { gap: 14px; max-height: 320px; overflow-y: auto; + scrollbar-width: none; + + &::-webkit-scrollbar { display: none; } } .comment { @@ -2080,6 +2107,9 @@ img.avatar { gap: 10px; max-height: 320px; overflow-y: auto; + scrollbar-width: none; + + &::-webkit-scrollbar { display: none; } } .activity-line {