{ "CI_job_history_included": false, "approvals": [], "diff_versions": [ { "commits": [ { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 200, "merge_request_diff_id": 105, "message": null, "project_id": null, "relative_order": 0, "sha": null, "trailers": {} }, { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 201, "merge_request_diff_id": 105, "message": null, "project_id": null, "relative_order": 1, "sha": null, "trailers": {} } ], "files": [ { "a_mode": "100644", "b_mode": "100644", "binary": false, "deleted_file": false, "diff": "@@ -41,23 +41,25 @@ export class CalendarYear {\n \t\t\tconsole.log('Optimizing vacations with data:', vacationData);\n \t\t\tthis.isLoading.set(true);\n \t\t\tthis.loadingProgress.set(0);\n-\t\t\t// Simulate server-side calculation with a small delay\n-\t\t\tsetTimeout(async () => {\n-\t\t\t\tif (this.selectedDates) {\n-\t\t\t\t\t// Create a copy to avoid mutating the original signal data\n-\t\t\t\t\tconst remainingDays = await this.selectedDates.optimizeVacations(\n-\t\t\t\t\t\t{ ...vacationData },\n-\t\t\t\t\t\tthis.calendarSettingsService,\n-\t\t\t\t\t\tthis.calendarService,\n-\t\t\t\t\t\t(progress: number) => {\n-\t\t\t\t\t\t\tthis.loadingProgress.set(progress);\n-\t\t\t\t\t\t},\n-\t\t\t\t\t);\n-\t\t\t\t\t// Update the remaining vacation days signal\n-\t\t\t\t\tthis.userInput.remainingVacationDaysSignal.set(remainingDays);\n-\t\t\t\t}\n-\t\t\t\tthis.isLoading.set(false);\n-\t\t\t}, 1);\n+\t\t\t// Defer execution to allow UI to update\n+\t\t\tqueueMicrotask(() => {\n+\t\t\t\tvoid (async () => {\n+\t\t\t\t\tif (this.selectedDates) {\n+\t\t\t\t\t\t// Create a copy to avoid mutating the original signal data\n+\t\t\t\t\t\tconst remainingDays = await this.selectedDates.optimizeVacations(\n+\t\t\t\t\t\t\t{ ...vacationData },\n+\t\t\t\t\t\t\tthis.calendarSettingsService,\n+\t\t\t\t\t\t\tthis.calendarService,\n+\t\t\t\t\t\t\t(progress: number) => {\n+\t\t\t\t\t\t\t\tthis.loadingProgress.set(progress);\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t);\n+\t\t\t\t\t\t// Update the remaining vacation days signal\n+\t\t\t\t\t\tthis.userInput.remainingVacationDaysSignal.set(remainingDays);\n+\t\t\t\t\t}\n+\t\t\t\t\tthis.isLoading.set(false);\n+\t\t\t\t})();\n+\t\t\t});\n \t\t});\n \t}\n \n", "encoded_file_path": false, "external_diff_offset": null, "external_diff_size": null, "generated": false, "merge_request_diff_id": 105, "new_file": false, "new_path": null, "old_path": "src/app/components/calendar-year/calendar-year.ts", "project_id": 35, "relative_order": 0, "renamed_file": false, "too_large": false } ], "metadata": { "base_commit_sha": "5ab29ef7700cb45e321469e2b5f69678a5761fff", "commits_count": 2, "created_at": "2026-05-03T15:59:55.823278", "diff_type": 1, "files_count": 1, "head_commit_sha": "ae28ffa07ad52a6a649045a9758d4e4a2175a60e", "id": 105, "merge_request_id": 106, "project_id": 35, "start_commit_sha": "3fab4c4922c14fb3b30c29801100cac634008827", "state": "collected", "stored_externally": null, "updated_at": "2026-05-03T15:59:56.137465" } } ], "discussions": [ { "id": "1750ee35ebf7bdfb38a99d0c170aedd393cec7b0", "individual_note": true, "notes": [ { "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "body": "assigned to `@Copilot`", "commands_changes": {}, "confidential": false, "created_at": "2025-11-17T23:17:40.000Z", "id": 614, "imported": true, "imported_from": "github", "internal": false, "noteable_id": 106, "noteable_iid": 50, "noteable_type": "MergeRequest", "project_id": 35, "resolvable": false, "system": true, "type": null, "updated_at": "2025-11-17T23:17:40.000Z" } ], "resolvable": false }, { "id": "2aa64d02eaed29b8d269b1dc85082b2b2f51cede", "individual_note": true, "notes": [ { "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "body": "assigned to `@THoguet`", "commands_changes": {}, "confidential": false, "created_at": "2025-11-17T23:17:40.000Z", "id": 615, "imported": true, "imported_from": "github", "internal": false, "noteable_id": 106, "noteable_iid": 50, "noteable_type": "MergeRequest", "project_id": 35, "resolvable": false, "system": true, "type": null, "updated_at": "2025-11-17T23:17:40.000Z" } ], "resolvable": false }, { "id": "63b0a3d7e1941939706e91ae55e36160efaa769a", "individual_note": true, "notes": [ { "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "body": "mentioned in merge request !49", "commands_changes": {}, "confidential": false, "created_at": "2025-11-17T23:17:42.000Z", "id": 618, "imported": true, "imported_from": "github", "internal": false, "noteable_id": 106, "noteable_iid": 50, "noteable_type": "MergeRequest", "project_id": 35, "resolvable": false, "system": true, "type": null, "updated_at": "2026-05-03T16:03:15.584Z" } ], "resolvable": false }, { "id": "2e85f7ebda51a1c6f746bf67b0eaffa3d2eef001", "individual_note": true, "notes": [ { "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "body": "changed title from **{-[WIP] Update loading spinner enhancement and progress indication-}** to **{+Fix setTimeout async anti-pattern in calendar-year component+}**", "commands_changes": {}, "confidential": false, "created_at": "2025-11-17T23:23:49.000Z", "id": 616, "imported": true, "imported_from": "github", "internal": false, "noteable_id": 106, "noteable_iid": 50, "noteable_type": "MergeRequest", "project_id": 35, "resolvable": false, "system": true, "type": null, "updated_at": "2025-11-17T23:23:49.000Z" } ], "resolvable": false }, { "id": "6243beb0a759954e9d5bb26fdfea860eb57a7d20", "individual_note": true, "notes": [ { "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "body": "requested review from `@THoguet`", "commands_changes": {}, "confidential": false, "created_at": "2025-11-17T23:23:56.000Z", "id": 617, "imported": true, "imported_from": "github", "internal": false, "noteable_id": 106, "noteable_iid": 50, "noteable_type": "MergeRequest", "project_id": 35, "resolvable": false, "system": true, "type": null, "updated_at": "2025-11-17T23:23:56.000Z" } ], "resolvable": false }, { "id": "529baa0e0f19a0d7e3263b6f8ade68389ddd9d95", "individual_note": true, "notes": [ { "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "body": "*Merged by: THoguet at 2025-11-17 23:26:19 UTC*", "commands_changes": {}, "confidential": false, "created_at": "2025-11-17T23:26:19.000Z", "id": 619, "imported": true, "imported_from": "github", "internal": false, "noteable_id": 106, "noteable_iid": 50, "noteable_type": "MergeRequest", "project_id": 35, "resolvable": false, "system": false, "type": null, "updated_at": "2026-05-03T16:03:15.674Z" } ], "resolvable": false } ], "format_version": 1, "notes": [ { "author_id": 3, "change_position": null, "commit_id": null, "confidential": null, "created_at": "2025-11-17T23:17:40", "discussion_id": "1750ee35ebf7bdfb38a99d0c170aedd393cec7b0", "id": 614, "imported_from": 4, "internal": false, "last_edited_at": null, "line_code": null, "namespace_id": null, "note": "assigned to `@Copilot`", "noteable_id": 106, "noteable_type": "MergeRequest", "organization_id": null, "original_position": null, "position": null, "project_id": 35, "resolved_at": null, "resolved_by_id": null, "resolved_by_push": null, "review_id": null, "source_iid": 50, "source_item_project_id": 35, "st_diff": null, "system": true, "type": null, "updated_at": "2025-11-17T23:17:40", "updated_by_id": null }, { "author_id": 3, "change_position": null, "commit_id": null, "confidential": null, "created_at": "2025-11-17T23:17:40", "discussion_id": "2aa64d02eaed29b8d269b1dc85082b2b2f51cede", "id": 615, "imported_from": 4, "internal": false, "last_edited_at": null, "line_code": null, "namespace_id": null, "note": "assigned to `@THoguet`", "noteable_id": 106, "noteable_type": "MergeRequest", "organization_id": null, "original_position": null, "position": null, "project_id": 35, "resolved_at": null, "resolved_by_id": null, "resolved_by_push": null, "review_id": null, "source_iid": 50, "source_item_project_id": 35, "st_diff": null, "system": true, "type": null, "updated_at": "2025-11-17T23:17:40", "updated_by_id": null }, { "author_id": 3, "change_position": null, "commit_id": null, "confidential": null, "created_at": "2025-11-17T23:17:42", "discussion_id": "63b0a3d7e1941939706e91ae55e36160efaa769a", "id": 618, "imported_from": 4, "internal": false, "last_edited_at": null, "line_code": null, "namespace_id": null, "note": "mentioned in merge request !49", "noteable_id": 106, "noteable_type": "MergeRequest", "organization_id": null, "original_position": null, "position": null, "project_id": 35, "resolved_at": null, "resolved_by_id": null, "resolved_by_push": null, "review_id": null, "source_iid": 50, "source_item_project_id": 35, "st_diff": null, "system": true, "type": null, "updated_at": "2026-05-03T16:03:15.584196", "updated_by_id": null }, { "author_id": 3, "change_position": null, "commit_id": null, "confidential": null, "created_at": "2025-11-17T23:23:49", "discussion_id": "2e85f7ebda51a1c6f746bf67b0eaffa3d2eef001", "id": 616, "imported_from": 4, "internal": false, "last_edited_at": null, "line_code": null, "namespace_id": null, "note": "changed title from **{-[WIP] Update loading spinner enhancement and progress indication-}** to **{+Fix setTimeout async anti-pattern in calendar-year component+}**", "noteable_id": 106, "noteable_type": "MergeRequest", "organization_id": null, "original_position": null, "position": null, "project_id": 35, "resolved_at": null, "resolved_by_id": null, "resolved_by_push": null, "review_id": null, "source_iid": 50, "source_item_project_id": 35, "st_diff": null, "system": true, "type": null, "updated_at": "2025-11-17T23:23:49", "updated_by_id": null }, { "author_id": 3, "change_position": null, "commit_id": null, "confidential": null, "created_at": "2025-11-17T23:23:56", "discussion_id": "6243beb0a759954e9d5bb26fdfea860eb57a7d20", "id": 617, "imported_from": 4, "internal": false, "last_edited_at": null, "line_code": null, "namespace_id": null, "note": "requested review from `@THoguet`", "noteable_id": 106, "noteable_type": "MergeRequest", "organization_id": null, "original_position": null, "position": null, "project_id": 35, "resolved_at": null, "resolved_by_id": null, "resolved_by_push": null, "review_id": null, "source_iid": 50, "source_item_project_id": 35, "st_diff": null, "system": true, "type": null, "updated_at": "2025-11-17T23:23:56", "updated_by_id": null }, { "author_id": 3, "change_position": null, "commit_id": null, "confidential": null, "created_at": "2025-11-17T23:26:19", "discussion_id": "529baa0e0f19a0d7e3263b6f8ade68389ddd9d95", "id": 619, "imported_from": 4, "internal": false, "last_edited_at": null, "line_code": null, "namespace_id": null, "note": "*Merged by: THoguet at 2025-11-17 23:26:19 UTC*", "noteable_id": 106, "noteable_type": "MergeRequest", "organization_id": null, "original_position": null, "position": null, "project_id": 35, "resolved_at": null, "resolved_by_id": null, "resolved_by_push": null, "review_id": null, "source_iid": 50, "source_item_project_id": 35, "st_diff": null, "system": false, "type": null, "updated_at": "2026-05-03T16:03:15.674171", "updated_by_id": null } ], "preexisting_missing_alternate_head": false, "source_assignees": [], "source_author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "source_created_at": "2025-11-17T23:17:39.000Z", "source_discussion_locked": null, "source_id": 106, "source_iid": 50, "source_item_metadata": { "assignee": null, "assignees": [], "author": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "blocking_discussions_resolved": true, "closed_at": null, "closed_by": null, "created_at": "2025-11-17T23:17:39.000Z", "description": "Addresses feedback on wrapping an async function in `setTimeout`, which doesn't handle the returned Promise and silently swallows errors.\n\n**Changes:**\n- Replaced `setTimeout(async () => {...}, 1)` with `queueMicrotask(() => { void (async () => {...})(); })`\n- Uses `queueMicrotask` for proper async deferral in the event loop\n- Explicit `void` operator indicates intentionally unhandled Promise\n\n**Before:**\n```typescript\nsetTimeout(async () => {\n const remainingDays = await this.selectedDates.optimizeVacations(...);\n this.userInput.remainingVacationDaysSignal.set(remainingDays);\n this.isLoading.set(false);\n}, 1);\n```\n\n**After:**\n```typescript\nqueueMicrotask(() => {\n void (async () => {\n const remainingDays = await this.selectedDates.optimizeVacations(...);\n this.userInput.remainingVacationDaysSignal.set(remainingDays);\n this.isLoading.set(false);\n })();\n});\n```\n\n\n---\n\n💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.", "detailed_merge_status": "unchecked", "discussion_locked": null, "downvotes": 0, "draft": false, "force_remove_source_branch": null, "has_conflicts": false, "id": 106, "iid": 50, "imported": true, "imported_from": "github", "labels": [], "merge_after": null, "merge_commit_sha": null, "merge_status": "unchecked", "merge_user": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "merge_when_pipeline_succeeds": false, "merged_at": "2025-11-17T23:26:19.000Z", "merged_by": { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" }, "milestone": null, "prepared_at": null, "project_id": 35, "reference": "!50", "references": { "full": "nessar/vac-optimizer!50", "relative": "!50", "short": "!50" }, "reviewers": [ { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" } ], "sha": "ae28ffa07ad52a6a649045a9758d4e4a2175a60e", "should_remove_source_branch": null, "source_branch": "copilot/sub-pr-49", "source_project_id": 35, "squash": false, "squash_commit_sha": null, "squash_on_merge": false, "state": "merged", "target_branch": "THoguet/issue16", "target_project_id": 35, "task_completion_status": { "completed_count": 0, "count": 0 }, "time_stats": { "human_time_estimate": null, "human_total_time_spent": null, "time_estimate": 0, "total_time_spent": 0 }, "title": "Fix setTimeout async anti-pattern in calendar-year component", "updated_at": "2025-11-17T23:26:21.000Z", "upvotes": 0, "user_notes_count": 1, "web_url": "https://gitlab.nessar.fr/nessar/vac-optimizer/-/merge_requests/50", "work_in_progress": false }, "source_kind": "MergeRequest", "source_path": "nessar/vac-optimizer", "source_project_id": 35, "source_reviewers": [ { "avatar_url": "https://secure.gravatar.com/avatar/5e51e115b51304582ee7b2cd8f249fe3ee71b46510e381f74c032e6de81d2757?s=80&d=identicon", "id": 3, "locked": false, "name": "admin", "public_email": null, "state": "active", "username": "admin-backup", "web_url": "https://gitlab.nessar.fr/admin-backup" } ], "source_updated_at": "2025-11-17T23:26:21.000Z", "state_events": [ { "close_after_error_tracking_resolve": false, "close_auto_resolve_prometheus_alert": false, "created_at": "2025-11-17T23:26:19+00:00", "epic_id": null, "id": 328, "imported_from": 4, "issue_id": null, "merge_request_id": 106, "namespace_id": 38, "source_commit": null, "source_merge_request_id": null, "state": 2, "user_id": 3 }, { "close_after_error_tracking_resolve": false, "close_auto_resolve_prometheus_alert": false, "created_at": "2025-11-17T23:26:19+00:00", "epic_id": null, "id": 330, "imported_from": 4, "issue_id": null, "merge_request_id": 106, "namespace_id": 38, "source_commit": "54c2160f0dd293f8c1c78342e155a65d891041fd", "source_merge_request_id": null, "state": 3, "user_id": 3 } ], "target_number": 128 }