- Add aria-hidden="true" to all decorative inline SVGs (bookmark, view-mode, funnel, checkmark) - Convert save-search popover to proper dialog: role="dialog", aria-modal, focus trap, Escape key, focus return to trigger - Add aria-pressed on list/map/split view-mode toggle buttons - Add aria-expanded + aria-controls on mobile filter toggle button - Add role="status" + aria-label="Đang tải..." on Suspense fallback Co-Authored-By: Paperclip <noreply@paperclip.ing>
25 lines
925 B
TypeScript
25 lines
925 B
TypeScript
/**
|
|
* Per-read-model kill switch — RFC-003 §0.
|
|
*
|
|
* Contract:
|
|
* - `isEnabled(name)` returns whether the named read model should
|
|
* serve queries. When `false`, callers MUST fail open to the
|
|
* write-model path.
|
|
* - Implementations MUST be hot-readable (no restart required).
|
|
* - The check is evaluated per-call so that a flag toggled mid-request
|
|
* is honoured on the NEXT repository call within the same request.
|
|
* In-flight calls complete against whichever source they already
|
|
* started on.
|
|
*/
|
|
|
|
export const READ_MODEL_KILL_SWITCH = Symbol('READ_MODEL_KILL_SWITCH');
|
|
|
|
export interface IReadModelKillSwitch {
|
|
/**
|
|
* Returns `true` when the named read model is active and safe to query.
|
|
* Returns `true` (fail-open) for unknown / un-configured names so that
|
|
* an absent config key never blocks the write-model fallback path.
|
|
*/
|
|
isEnabled(readModelName: string): boolean;
|
|
}
|