Weekly horoscope landing page, link previews for the forum, and fixes from the review
CI / test (push) Successful in 3m19s
CI / build (push) Skipped
CI / deploy (push) Skipped

- /heti-horoszkop for visitors: what it is, a real example written for the
  example chart, login and sign-up buttons; its own link preview image.
- Forum: link previews (image, title; a public thread's opening words) for
  every forum page; none of a members-only thread's content.
- Review fixes: a removed thread's photos are no longer served; public photos
  are cached for an hour, not a year (removals take effect); photos of threads
  removed a year ago are cleaned up; deleting one forum question no longer
  revokes the chart link another question still shows; the daily digest
  leaves out closed topics the member is no longer in; typing notices at most
  one a second per connection; the weekly page asks for the text once and
  then only reads it (no repeated paid runs after a failure); turning the
  Monday e-mail back on from the e-mail page waits for next Monday, like the
  site's switch; the week's last day is right in the week the clocks go back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-27 10:12:27 +00:00
co-authored by Claude Opus 5.5
parent 0358e137f1
commit b37094e481
24 changed files with 461 additions and 90 deletions
+5
View File
@@ -341,6 +341,11 @@ async fn one_week_of_a_chart() {
assert_eq!(status, StatusCode::OK, "{u}");
assert!(u["week"]["positions"][0]["house"].is_null());
// The week the clocks go back (Sunday 25 October): still Monday to Sunday.
let (status, d) = call("POST", "/v1/week", Some(json!({"birth": birth, "start": "2026-10-19"}))).await;
assert_eq!(status, StatusCode::OK, "{d}");
assert_eq!((d["week"]["start"].as_str(), d["week"]["end"].as_str()), (Some("2026-10-19"), Some("2026-10-25")));
// Not a Monday.
let (status, _) = call("POST", "/v1/week", Some(json!({"birth": birth, "start": "2026-12-01"}))).await;
assert_eq!(status, StatusCode::BAD_REQUEST);
+4 -1
View File
@@ -57,7 +57,10 @@ pub fn calculate(state: &AppState, req: WeekRequest) -> Result<WeekResponse, Api
let (start_jd, offset) = jd_at(start)?;
let next = start.checked_add(jiff::Span::new().days(7)).map_err(|e| ApiError::Internal(e.to_string()))?;
let (end_jd, _) = jd_at(next)?;
let week = calculate_week(state.engine.as_ref(), &natal.chart, start_jd, end_jd, offset)
let mut week = calculate_week(state.engine.as_ref(), &natal.chart, start_jd, end_jd, offset)
.map_err(|e| ApiError::Calculation(e.to_string()))?;
// The last day from the calendar: the offset at the start would be an hour
// off in the week the clocks go back.
week.end = start.checked_add(jiff::Span::new().days(6)).map_err(|e| ApiError::Internal(e.to_string()))?.to_string();
Ok(WeekResponse { timezone: zone_name, week })
}