ADR β PR #994
2026-05-17 19:40 β Add accessibility live regions for status messages
Section titled β2026-05-17 19:40 β Add accessibility live regions for status messagesβ- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994/files#diff-3a8b2f8c0b9a3e6e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5
- Priority: must-fix
- Decision: accept
- Rationale: Screen readers cannot detect dynamic status message changes without proper live regions
2026-05-17 19:41 β Clear status state on baseline input change
Section titled β2026-05-17 19:41 β Clear status state on baseline input changeβ- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994/files#diff-3a8b2f8c0b9a3e6e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5
- Priority: nice-to-have
- Decision: accept
- Rationale: Prevents stale success/error messages from persisting when user starts editing
2026-05-17 19:42 β Add transaction wrapping for org-rules API operations
Section titled β2026-05-17 19:42 β Add transaction wrapping for org-rules API operationsβ- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994/files#diff-7a8b2f8c0b9a3e6e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5
- Priority: must-fix
- Decision: accept
- Rationale: Prevents lost updates and data inconsistency by ensuring read/write operations are atomic
2026-05-18 10:00 β Confirmed live region implementation (must-fix)
Section titled β2026-05-18 10:00 β Confirmed live region implementation (must-fix)β- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994#discussion_r1
- Priority: must-fix
- Decision: accept
- Rationale: Verified aria-live=βpoliteβ container and role=βalertβ on error messages.
2026-05-18 10:05 β Confirmed clearing stale banners on input change (must-fix)
Section titled β2026-05-18 10:05 β Confirmed clearing stale banners on input change (must-fix)β- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994#discussion_r2
- Priority: must-fix
- Decision: accept
- Rationale: onChange now resets loadError, saveError, and saveMessage.
2026-05-18 10:10 β Confirmed transaction wrapper works (must-fix)
Section titled β2026-05-18 10:10 β Confirmed transaction wrapper works (must-fix)β- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994#discussion_r3
- Priority: must-fix
- Decision: accept
- Rationale: db.transaction ensures atomicity of read, upsert, and audit log.
2026-05-18 21:00 β Finalized CodeRabbit feedback implementation
Section titled β2026-05-18 21:00 β Finalized CodeRabbit feedback implementationβ- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994#discussion_r1578939923
- Priority: must-fix
- Decision: accept
- Rationale: Removed remaining TODO comments and verified all findings are correctly addressed.
2026-05-18 21:30 β Verified all findings and added regression tests + structured logging
Section titled β2026-05-18 21:30 β Verified all findings and added regression tests + structured loggingβ- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994
- Priority: must-fix
- Decision: accept
- Rationale: Verified all 3 CodeRabbit findings are correctly addressed. Added unit tests for accessibility/state clearing and implemented structured logging in the API handler for better observability.
2026-05-18 21:35 β Final review and minor a11y polish
Section titled β2026-05-18 21:35 β Final review and minor a11y polishβ- Comment: https://github.com/ERP-Unlocked/ordermatic/pull/994
- Priority: nice-to-have
- Decision: accept
- Rationale: Verified all 3 CodeRabbit findings are correctly addressed. Added role=βstatusβ to the success message for better accessibility consistency in the live region.
2026-05-18 22:30 β Added API regression tests for transaction logic
Section titled β2026-05-18 22:30 β Added API regression tests for transaction logicβ- Comment: N/A (Internal follow-up)
- Priority: nice-to-have
- Decision: accept
- Rationale: Ensures the transaction-wrapped upsert and audit logging remain atomic and correctly implemented during future refactors. Verified via src/pages/api/settings/org-rules.test.ts.