Compare commits

..

3 Commits

Author SHA1 Message Date
34417131b0 chore(deps): update all non-major dependencies
Some checks failed
renovate/artifacts Artifact file update failure
Continuous integration / Check (push) Has been cancelled
Continuous integration / Test Suite (push) Has been cancelled
Continuous integration / Trunk (push) Has been cancelled
Continuous integration / Rustfmt (push) Has been cancelled
Continuous integration / build (push) Has been cancelled
Continuous integration / Disallow unused dependencies (push) Has been cancelled
2025-09-14 18:17:23 +00:00
d63e72ad35 chore: Release
All checks were successful
Continuous integration / Check (push) Successful in 2m14s
Continuous integration / Test Suite (push) Successful in 4m25s
Continuous integration / Trunk (push) Successful in 7m10s
Continuous integration / Rustfmt (push) Successful in 28s
Continuous integration / build (push) Successful in 4m42s
Continuous integration / Disallow unused dependencies (push) Successful in 2m12s
2025-09-14 11:00:40 -07:00
33c0a106b7 server: fix date parsing w/ TZ and cal widget highlight 2025-09-14 11:00:21 -07:00
7 changed files with 41 additions and 47 deletions

30
Cargo.lock generated
View File

@ -3168,7 +3168,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-notmuch" name = "letterbox-notmuch"
version = "0.17.43" version = "0.17.44"
dependencies = [ dependencies = [
"itertools", "itertools",
"log", "log",
@ -3183,7 +3183,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-procmail2notmuch" name = "letterbox-procmail2notmuch"
version = "0.17.43" version = "0.17.44"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -3196,7 +3196,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-server" name = "letterbox-server"
version = "0.17.43" version = "0.17.44"
dependencies = [ dependencies = [
"ammonia", "ammonia",
"anyhow", "anyhow",
@ -3219,8 +3219,8 @@ dependencies = [
"html-escape", "html-escape",
"html2text", "html2text",
"ical", "ical",
"letterbox-notmuch 0.17.43", "letterbox-notmuch 0.17.44",
"letterbox-shared 0.17.43", "letterbox-shared 0.17.44",
"linkify", "linkify",
"lol_html", "lol_html",
"mailparse", "mailparse",
@ -3261,10 +3261,10 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-shared" name = "letterbox-shared"
version = "0.17.43" version = "0.17.44"
dependencies = [ dependencies = [
"build-info", "build-info",
"letterbox-notmuch 0.17.43", "letterbox-notmuch 0.17.44",
"regex", "regex",
"serde", "serde",
"sqlx", "sqlx",
@ -3274,7 +3274,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-web" name = "letterbox-web"
version = "0.17.43" version = "0.17.44"
dependencies = [ dependencies = [
"build-info", "build-info",
"build-info-build", "build-info-build",
@ -3286,7 +3286,7 @@ dependencies = [
"graphql_client", "graphql_client",
"human_format", "human_format",
"itertools", "itertools",
"letterbox-shared 0.17.43", "letterbox-shared 0.17.44",
"log", "log",
"seed", "seed",
"seed_hooks", "seed_hooks",
@ -5379,9 +5379,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.221" version = "1.0.222"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "341877e04a22458705eb4e131a1508483c877dca2792b3781d4e5d8a6019ec43" checksum = "aab69e3f5be1836a1fe0aca0b286e5a5b38f262d6c9e8acd2247818751fcc8fb"
dependencies = [ dependencies = [
"serde_core", "serde_core",
"serde_derive", "serde_derive",
@ -5421,18 +5421,18 @@ dependencies = [
[[package]] [[package]]
name = "serde_core" name = "serde_core"
version = "1.0.221" version = "1.0.222"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c459bc0a14c840cb403fc14b148620de1e0778c96ecd6e0c8c3cacb6d8d00fe" checksum = "3f8ebec5eea07db7df9342aa712db2138f019d9ab3454a60a680579a6f841b80"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.221" version = "1.0.222"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6185cf75117e20e62b1ff867b9518577271e58abe0037c40bb4794969355ab0" checksum = "b5f61630fe26d0ff555e6c37dc445ab2f15871c8a11ace3cf471b3195d3e4f49"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View File

@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021" edition = "2021"
license = "UNLICENSED" license = "UNLICENSED"
publish = ["xinu"] publish = ["xinu"]
version = "0.17.43" version = "0.17.44"
repository = "https://git.z.xinu.tv/wathiede/letterbox" repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev] [profile.dev]

View File

@ -32,8 +32,8 @@ futures = "0.3.31"
headers = "0.4.0" headers = "0.4.0"
html-escape = "0.2.13" html-escape = "0.2.13"
ical = "0.11" ical = "0.11"
letterbox-notmuch = { path = "../notmuch", version = "0.17.43", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.44", registry = "xinu" }
letterbox-shared = { path = "../shared", version = "0.17.43", registry = "xinu" } letterbox-shared = { path = "../shared", version = "0.17.44", registry = "xinu" }
linkify = "0.10.0" linkify = "0.10.0"
lol_html = "2.3.0" lol_html = "2.3.0"
mailparse = "0.16.1" mailparse = "0.16.1"

View File

@ -2157,28 +2157,28 @@ mod tests {
let meta = extract_calendar_metadata_from_mail(&parsed, &body); let meta = extract_calendar_metadata_from_mail(&parsed, &body);
// Assert detection as Google Calendar // Assert detection as Google Calendar
assert!(meta.is_google_calendar_event); assert!(meta.is_google_calendar_event);
// Debug: print the rendered HTML for inspection
let html = meta.body_html.expect("body_html"); let html = meta.body_html.expect("body_html");
// Print event date info for debugging
for part in parsed.subparts.iter() {
if part.ctype.mimetype == TEXT_CALENDAR {
if let Ok(ical) = part.get_body() {
println!("ICAL data: {}", ical);
if let Some(start) = ical.lines().find(|l| l.starts_with("DTSTART:")) {
println!("Start date: {}", start);
}
}
}
}
println!("Rendered HTML: {}", html); println!("Rendered HTML: {}", html);
// Check that the calendar table highlights Thursday, not Friday
// Look for a table header row with days of week (allow whitespace) // Look for September 11 (Thursday) being highlighted
let thursday_idx = html // The calendar should show Sept 11 highlighted with background:#ffd700 and the correct data-event-day
.find(">\n Thu<") assert!(html.contains(r#"data-event-day="2025-09-11""#));
.or_else(|| html.find(">Thu<")) assert!(html.contains(r#"background:#ffd700"#));
.expect("Should have a Thursday column");
let friday_idx = html // Since 1:00 AM UTC on Friday 9/12 is 6:00 PM PDT on Thursday 9/11, verify times are correct
.find(">\n Fri<") assert!(html.contains("6:00 PM Thu Sep 11, 2025"));
.or_else(|| html.find(">Fri<"))
.expect("Should have a Friday column");
// Find the first highlighted cell (background:#ffd700)
let highlight_idx = html
.find("background:#ffd700")
.expect("Should highlight a day");
// The highlight should be closer to Thursday than Friday
assert!(
highlight_idx > thursday_idx && highlight_idx < friday_idx,
"Thursday should be highlighted, not Friday"
);
} }
use super::*; use super::*;
#[test] #[test]

View File

@ -74,13 +74,7 @@
{% for week in all_days|batch(7) %} {% for week in all_days|batch(7) %}
<tr> <tr>
{% for day in week %} {% for day in week %}
{% if event_days.contains(day) && today.is_some() && today.unwrap() == day %} {% if event_days.contains(day) %}
<td
data-event-day="{{ day.format("%Y-%m-%d") }}"
style="background:#ffd700; color:#222; font-weight:bold; border:2px solid #2196f3; border-radius:4px; text-align:center; box-shadow:0 0 0 2px #2196f3;">
{{ day.day() }}
</td>
{% elif event_days.contains(day) %}
<td <td
data-event-day="{{ day.format("%Y-%m-%d") }}" data-event-day="{{ day.format("%Y-%m-%d") }}"
style="background:#ffd700; color:#222; font-weight:bold; border:1px solid #aaa; border-radius:4px; text-align:center;"> style="background:#ffd700; color:#222; font-weight:bold; border:1px solid #aaa; border-radius:4px; text-align:center;">

View File

@ -12,7 +12,7 @@ version.workspace = true
[dependencies] [dependencies]
build-info = "0.0.41" build-info = "0.0.41"
letterbox-notmuch = { path = "../notmuch", version = "0.17.43", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.44", registry = "xinu" }
regex = "1.11.1" regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] }
sqlx = "0.8.5" sqlx = "0.8.5"

View File

@ -33,7 +33,7 @@ wasm-bindgen = "=0.2.100"
uuid = { version = "1.16.0", features = [ uuid = { version = "1.16.0", features = [
"js", "js",
] } # direct dep to set js feature, prevents Rng issues ] } # direct dep to set js feature, prevents Rng issues
letterbox-shared = { path = "../shared/", version = "0.17.43", registry = "xinu" } letterbox-shared = { path = "../shared/", version = "0.17.44", registry = "xinu" }
seed_hooks = { version = "0.4.1", registry = "xinu" } seed_hooks = { version = "0.4.1", registry = "xinu" }
strum_macros = "0.27.1" strum_macros = "0.27.1"
gloo-console = "0.3.0" gloo-console = "0.3.0"