fix(adapters/ui): present.lua compares the event type against a fixed literal #155

Open
opened 2026-11-18 11:15:26 +01:00 by michael · 0 comments
Owner

Problem

adapters/ui/present.lua line 132 decides what happens with an event by
a fixed comparison: event.type == "decision_required". There must be
no fixed comparisons in code; which events are questions has to come
from data (the event contract or configuration).

Goal

Whether an event is a question that is parked and resumed is taken from
data, not from a literal in the sink.

Questions for the implementation

  • where is the event type that marks a question defined (daw_event/v1,
    contribution of the module)? The sink must read it from there.

Acceptance criteria

  • tests first: an event type that is declared as a question in the
    data is parked; one that is not, is shown
  • no literal event type is left in present.lua
  • fragjan code . and make test (Lua 5.1 and 5.4) pass

DAW/fragjan#153

## Problem `adapters/ui/present.lua` line 132 decides what happens with an event by a fixed comparison: `event.type == "decision_required"`. There must be no fixed comparisons in code; which events are questions has to come from data (the event contract or configuration). ## Goal Whether an event is a question that is parked and resumed is taken from data, not from a literal in the sink. ## Questions for the implementation - where is the event type that marks a question defined (daw_event/v1, contribution of the module)? The sink must read it from there. ## Acceptance criteria - [ ] tests first: an event type that is declared as a question in the data is parked; one that is not, is shown - [ ] no literal event type is left in `present.lua` - [ ] `fragjan code .` and `make test` (Lua 5.1 and 5.4) pass ## Related DAW/fragjan#153
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#155
No description provided.