💡 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 in the docs.
Addresses feedback on wrapping an async function in `setTimeout`, which doesn't handle the returned Promise and silently swallows errors.
**Changes:**
- Replaced `setTimeout(async () => {...}, 1)` with `queueMicrotask(() => { void (async () => {...})(); })`
- Uses `queueMicrotask` for proper async deferral in the event loop
- Explicit `void` operator indicates intentionally unhandled Promise
**Before:**
```typescript
setTimeout(async () => {
const remainingDays = await this.selectedDates.optimizeVacations(...);
this.userInput.remainingVacationDaysSignal.set(remainingDays);
this.isLoading.set(false);
}, 1);
```
**After:**
```typescript
queueMicrotask(() => {
void (async () => {
const remainingDays = await this.selectedDates.optimizeVacations(...);
this.userInput.remainingVacationDaysSignal.set(remainingDays);
this.isLoading.set(false);
})();
});
```
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 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.
changed title from {-[WIP] Update loading spinner enhancement and progress indication-} to {+Fix setTimeout async anti-pattern in calendar-year component+}
changed title from **{-[WIP] Update loading spinner enhancement and progress indication-}** to **{+Fix setTimeout async anti-pattern in calendar-year component+}**
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
<!-- gitlab-to-gitea-assignment:35:MergeRequest:50 -->
Preserved source assignment/reviewer metadata. Historical accounts stay inactive.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Addresses feedback on wrapping an async function in
setTimeout, which doesn't handle the returned Promise and silently swallows errors.Changes:
setTimeout(async () => {...}, 1)withqueueMicrotask(() => { void (async () => {...})(); })queueMicrotaskfor proper async deferral in the event loopvoidoperator indicates intentionally unhandled PromiseBefore:
After:
💡 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 in the docs.
assigned to
@Copilotassigned to
@THoguetmentioned in merge request !49
changed title from {-[WIP] Update loading spinner enhancement and progress indication-} to {+Fix setTimeout async anti-pattern in calendar-year component+}
requested review from
@THoguetMerged by: THoguet at 2025-11-17 23:26:19 UTC
Preserved source assignment/reviewer metadata. Historical accounts stay inactive.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
Preserved GitLab !50 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 6.
gitlab-35-mergerequest-50.md (SHA-256
8a9469b89d1ab9597df589841746a8909fae549a59a2fe5633de663791131f1a)gitlab-35-mergerequest-50.json (SHA-256
833e850622717a64d1cab1102a23cae7e545a5fc3db64fe4465d6dbd4602cb5a)Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.