Skip to content

fix(followups): count business days with the workspace country's holidays - #107

Draft
Caezarr wants to merge 3 commits into
fix/review-20261117from
fix/review-20261118
Draft

Caezarr wants to merge 3 commits into
fix/review-20261117from
fix/review-20261118

Conversation

@Caezarr

@Caezarr Caezarr commented Nov 18, 2026

Copy link
Copy Markdown
Owner

What

Follow-up delays ("N business days without a reply") always used the French holiday calendar, even for a workspace set to Europe/Brussels. Meeting slots (#104) and inbox-calendar-labels.md already claimed "same calendar as follow-up business days", which was not true for Belgium.

Effect for a Belgian workspace: a follow-up could be prepared on 21 July (Belgian national day), and delays were off by one day around 14 July and 8 May (French-only holidays).

Change

  • followups/calendar.ts: isBusinessDay, addBusinessDays, followupDueAt, businessDaysBetween take the workspace timezone (default Europe/Paris) and use isPublicHoliday. Paris and Brussels share offsets and DST rules, so only the holiday list differs.
  • decideFollowup / FollowupSettings: optional timezone, passed through by the tracker.
  • postgresFollowupStore.settings(): reads inbox_features.timezone (anything other than Europe/Brussels → Europe/Paris).
  • Docs: followups-pipeline-report.md updated; docs/TODO.md entry.

No migration. No UI change. No live service called.

Checks

  • New tests in calendar.test.ts and detect.test.ts; both fail on the old code.
  • tsc --noEmit OK, pnpm test 1169/1169, eslint on src/lib/followups clean, next build --webpack OK.
  • Store query run against a throwaway Postgres 16 (migrations 001–017) as a NOBYPASSRLS app role: Brussels workspace → Europe/Brussels, workspace without a row → Europe/Paris, another tenant's member reading it → RLS hides the row → Europe/Paris.

Stacked on #104.


Generated by Claude Code

…days

A Brussels workspace had its follow-up delay counted on the French
calendar: due on 21 July (Belgian national day) and shifted by a day
around 14 July and 8 May, while meeting slots and the docs already used
the workspace's country. The follow-up worker now reads the workspace
timezone from inbox_features and the business-day helpers take it
(default Europe/Paris).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
orbis Ready Ready Preview Nov 19, 2026 5:38am UTC

This branch was successfully deployed

1 active deployment
Preview — cecfbcd9 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants