Compare commits

..
Author SHA1 Message Date
nessarandClaude Sonnet 5.5 43a3a477d6 test(calendar): pin the clock for the Paris today marker
CI / policy (push) Successful in 9s
CI / validate (push) Successful in 39s
CI / build (push) Successful in 31s
CI / benchmark (push) Successful in 1m41s
CI / security (push) Successful in 1m5s
CI / test (push) Successful in 2m22s
CI / images (push) In progress
The test of the today marker read the wall clock, so it only exercised
the Paris/local date mismatch between 22:00 and 24:00 UTC and passed
with or without the fix the rest of the day. Pin the clock to 22:16 UTC,
already the next day in Paris, so a UTC runner fails without the fix at
any time.

Refs #301

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:56:23 +02:00
nessarandClaude Sonnet 5.5 3b75bdbe3e test(planning): hold the worker until the preparation cancel arrives
The worker reads its queue only between event-loop turns, so the
calendar preparation could finish before the cancel sent on its second
progress update arrived, and the test received a complete plan. Use the
real-worker harness hold already applied to the checkpoint cancellation
test, and cancel on the first preparation update so the hold is released.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:56:23 +02:00
nessarandClaude Sonnet 5.5 0d68dfeaf8 fix(calendar): mark today on the Europe/Paris date
The calendar highlighted today from the browser's local date while the
default planning horizon starts on the Europe/Paris date, so the two
disagreed for a few hours a day (and always, for users in another time
zone). The horizon's first day was then not marked as today. This also
failed the CI test run in UTC containers between 22:00 and 24:00 UTC.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:56:23 +02:00
nessarandClaude Opus 5.5 8414c02e10 chore: ignore Claude Code local files
CI / policy (pull_request) Successful in 12s
CI / validate (pull_request) Successful in 27s
CI / build (pull_request) Successful in 23s
CI / security (pull_request) Successful in 1m0s
CI / benchmark (pull_request) Successful in 1m48s
CI / test (pull_request) Successful in 1m54s
CI / images (pull_request) Successful in 55s
CI / required (pull_request) Successful in 1s
CI / policy (push) Successful in 8s
CI / validate (push) Successful in 38s
CI / build (push) Successful in 36s
CI / benchmark (push) Successful in 1m16s
CI / security (push) Successful in 56s
CI / test (push) Successful in 1m54s
CI / images (push) Successful in 52s
CI / required (push) Successful in 2s
.claude is a symlink to .agents/, so Claude Code's personal settings
and temporary worktrees land under .agents/. Ignore those paths while
keeping shared settings and skills trackable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:26:33 +02:00
6 changed files with 37 additions and 13 deletions

No files matched your search

+4
View File
@@ -46,3 +46,7 @@ Thumbs.db
# Auto-generated i18n files
/src/app/i18n-registry.ts
# Claude Code local files (.claude is a symlink to .agents/)
.agents/settings.local.json
.agents/worktrees/
+13 -3
View File
@@ -27,7 +27,7 @@
"@angular/compiler-cli": "22.2.3",
"@eslint/js": "^10.0.1",
"@types/bun": "1.4.3",
"@types/jsdom": "^30.0.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^26.0.0",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
@@ -442,7 +442,7 @@
"@types/gensync": ["@types/gensync@1.0.5", "", {}, "sha512-MbsRCT7mTikHwKZ0X+LVUTLRrZZRLipTuXEO9qOYO+zmjMVk81axyClMROf6uoPD9MRVu46bx8zoR0Ad9q3NAg=="],
"@types/jsdom": ["@types/jsdom@30.0.0", "", { "dependencies": { "@types/node": "*", "@types/tough-cookie": "*", "parse5": "^8.0.0", "undici-types": "^8.9.0" } }, "sha512-uAHGxujGE0cDaKGdK28zgDotFtNA7MKq5DXl8LrfdxdCI8VHcg15oJz+amHTChPNI5JpgEPQWc2xFdrw3em/nQ=="],
"@types/jsdom": ["@types/jsdom@21.1.7", "", { "dependencies": { "@types/node": "*", "@types/tough-cookie": "*", "parse5": "^7.0.0" } }, "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA=="],
"@types/jsesc": ["@types/jsesc@2.5.1", "", {}, "sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw=="],
@@ -810,7 +810,7 @@
"p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="],
"parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="],
"parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
"parse5-html-rewriting-stream": ["parse5-html-rewriting-stream@8.0.1", "", { "dependencies": { "entities": "^8.0.0", "parse5": "^8.0.0", "parse5-sax-parser": "^8.0.0" } }, "sha512-NaRku2aMpUN1Sh1Gyk1KWUh2A7EJx2c6qYzvwsPtqhoHoaURshdrceYK3LunVCm3WHhm6FS7Vcczbvdh3/UIVw=="],
@@ -1016,6 +1016,8 @@
"@angular/build/vite": ["vite@8.3.0", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.28", "rolldown": "~1.2.6", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-lhZBVvEHefgE+HQZC9O7EBJgCU/nVzFNl7vkS4RE0APtWLP02/8QVIkQtzBxPquh7lq5/78NHipTj7ODQ6XuyQ=="],
"@angular/cdk/parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="],
"@angular/compiler-cli/@babel/core": ["@babel/core@8.0.1", "", { "dependencies": { "@babel/code-frame": "^8.0.0", "@babel/generator": "^8.0.0", "@babel/helper-compilation-targets": "^8.0.0", "@babel/helpers": "^8.0.0", "@babel/parser": "^8.0.0", "@babel/template": "^8.0.0", "@babel/traverse": "^8.0.0", "@babel/types": "^8.0.0", "@types/gensync": "^1.0.5", "convert-source-map": "^2.0.0", "empathic": "^2.0.1", "gensync": "^1.0.0-beta.2", "import-meta-resolve": "^4.2.0", "json5": "^2.2.3", "obug": "^2.1.1", "semver": "^7.7.3" } }, "sha512-5FgxM4dLQpMJHSiVATk8foW263dVHQHBVpXYiimNECVWG01f4nFyEbQixeT6Mwvg7TayREJ2gpKl3o2RoMdnqw=="],
"@angular/forms/zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],
@@ -1072,8 +1074,16 @@
"cliui/wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="],
"jsdom/parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="],
"magic-string/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="],
"parse5/entities": ["entities@6.0.1", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],
"parse5-html-rewriting-stream/parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="],
"parse5-sax-parser/parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="],
"rolldown/@oxc-project/types": ["@oxc-project/types@0.149.0", "", {}, "sha512-Efcc+iF0j3Bf67YjEqIqWXbX5XddXoK/Mw4K1/JuXwRCZ8N16VR7iT23nlCc9XrveFVh/E5Rqs2StT0V8v9LdA=="],
"sass-embedded/supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="],
+1 -1
View File
@@ -52,7 +52,7 @@
"@angular/compiler-cli": "22.2.3",
"@eslint/js": "^10.0.1",
"@types/bun": "1.4.3",
"@types/jsdom": "^30.0.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^26.0.0",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
+12
View File
@@ -8,6 +8,7 @@ import {
SelectedDates,
} from './calendar-service';
import { DateRange } from '@angular/material/datepicker';
import { vi } from '../../testing/vitest-compat';
describe('CalendarService', () => {
let service: CalendarService;
@@ -197,6 +198,8 @@ describe('CalendarService', () => {
service.project({ placements: [], horizon });
const day = (key: string) => new Date(`${key}T00:00:00`);
afterEach(() => vi.useRealTimers());
it('projects weekends, holidays and today for the default planning horizon', () => {
const { selections } = project({ start: '2026-01-01', end: '2027-01-01' });
expect(selections.dayTypes(day('2026-05-09'))).toContain(DayType.WEEKEND);
@@ -207,6 +210,15 @@ describe('CalendarService', () => {
);
});
it('marks today on the Europe/Paris date when the runtime date is still the day before', () => {
vi.setSystemTime(new Date('2026-10-17T22:16:00Z'));
const horizon = service.getDefaultPlanningHorizon();
expect(horizon.start).toBe('2026-10-18');
const { selections } = project(horizon);
expect(selections.getClasses(day('2026-10-18'))).toContain(DayType.TODAY);
expect(selections.getClasses(day('2026-10-17'))).not.toContain(DayType.TODAY);
});
it('lists the covered months, including partial boundary months and year changes', () => {
expect(project({ start: '2024-11-20', end: '2025-02-02' }).months).toEqual([
{ monthIndex: 10, year: 2024 },
+4 -6
View File
@@ -85,11 +85,9 @@ export class CalendarService {
const holidays = new Set(
this.getHolidays(first.getFullYear(), last.getFullYear()).map((h) => h.getTime()),
);
const {
date: todayDate,
month: todayMonth,
year: todayYear,
} = this.dateCache.getTodayComponents();
const [todayYear, todayMonth, todayDate] = planningDateInParis(new Date())
.split('-')
.map(Number);
const months: CalendarProjection['months'] = [];
const ranges: SelectedDate[] = [];
const cursor = new Date(first);
@@ -124,7 +122,7 @@ export class CalendarService {
);
if (
day.getDate() === todayDate &&
day.getMonth() === todayMonth &&
day.getMonth() + 1 === todayMonth &&
day.getFullYear() === todayYear
)
ranges.push(new SelectedDate(DayType.TODAY, new DateRange<Date>(day, day)));
@@ -587,8 +587,8 @@ parentPort.on('message', (data) => globalThis.self.onmessage({ data }));
);
it('stops during calendar preparation without a plan or an obligation conflict', async () => {
holdForCancelAtStage = 'preparation';
const stages: string[] = [];
let preparationUpdates = 0;
const calculation = createPlanningCalculation({
horizon: { start: '2024-01-01', end: '2027-01-01' },
balances: [],
@@ -596,7 +596,7 @@ parentPort.on('message', (data) => globalThis.self.onmessage({ data }));
declaredDays: [{ date: '2024-01-02', type: 'other' }],
progress: (stage) => {
stages.push(stage);
if (stage === 'preparation' && ++preparationUpdates === 2) calculation.cancel();
if (stage === 'preparation') calculation.cancel();
},
});
const outcome = await calculation.outcome;
@@ -606,7 +606,7 @@ parentPort.on('message', (data) => globalThis.self.onmessage({ data }));
});
if (outcome.kind !== 'PlanningIncomplete') return;
expect(outcome.incumbent).toBeUndefined();
expect(preparationUpdates).toBeGreaterThanOrEqual(2);
expect(stages).toContain('preparation');
expect(stages).not.toContain('obligations');
expect(await calculation.explanationError).toBeUndefined();
expect(heartbeats).toBeGreaterThan(0);