[grade=B urn:ump:dbxmyhvr7cpkeu3mbfdevrco7utsok743udjsj7atih6qk4frdiq] fix(DC-168): calendar widget CSRF writes, error path, modal UX (audit batch 2)
Audit 2026-10-27 fixes (46-finding sweep, AUDIT-2026-10-27.md): - P0-2: all 6 calendar API calls via secureFetch — raw fetch sent no X-CSRF-Token so every mutation (save/toggle/delete/test) was rejected 403 [DC-100]; GETs gain the standard 15s timeout - P0-6: refresh() catch called nonexistent errorHandler.log() — the error path itself threw; now logError(context, error) - P0-7: modal sizing off inline min-width:560px onto .cal-modal-content with 768px override (inline style beat the mobile media query) - refresh coalescing via _pendingForce (forced refreshes were dropped mid-flight); single fetch sequence on modal open; toggle/delete get resp.ok + try/catch + toast + disabled-during-flight - modal on class-based .show: click-outside, Escape, focus move/return on all three dismissal paths (judge polish applied) - chip honors Enter/Space (role=button); poll skips hidden tabs - --cal-chip-when/--cal-when/--cal-dot re-scoped to :root (were scoped to elements that are never ancestors of .cal-dot — DC-168 WCAG dot colors never rendered) - calendar-cache eventKey no longer throws RangeError on invalid start Bundles rebuilt (sw dashcaddy-shell-7fc13e7762). status suite 68/68. Judge B (polish items applied pre-commit): urn:ump:dbxmyhvr7cpkeu3mbfdevrco7utsok743udjsj7atih6qk4frdiq
This commit is contained in:
5 files changed
+369
-303
No files matched your search
@@ -5,7 +5,12 @@
|
||||
'use strict';
|
||||
(function () {
|
||||
function eventKey(ev) {
|
||||
const startIso = new Date(ev.start).toISOString();
|
||||
// Audit 2026-10-27: a null/invalid start threw RangeError out of merge()
|
||||
// and flipped the whole widget offline — degrade to a string key instead.
|
||||
const d = new Date(ev.start);
|
||||
const startIso = isNaN(d.getTime())
|
||||
? `invalid:${ev.start == null ? 'null' : String(ev.start)}`
|
||||
: d.toISOString();
|
||||
return ev.uid ? `${ev.uid}@${startIso}` : `${startIso}|${ev.title || ''}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user