chore(approval): TODO markers for overlay UX and requestId→sessionId lookup
Two follow-ups for the approval refactor: - InputReducer STEER input mode hardcodes APPROVE; needs the future approve/reject overlay UX to let the user pick. - GlobalStreamHandler derives scopeSessionId from requestId as a placeholder; needs a real requestId → sessionId lookup once exposed.
This commit is contained in:
@@ -134,6 +134,9 @@ class GlobalStreamHandler(private val module: ServerModule) {
|
||||
msg: ClientMessage.ApprovalResponse,
|
||||
sendFrame: suspend (ServerMessage) -> Unit,
|
||||
) {
|
||||
// TODO: scopeSessionId is a placeholder derived from requestId — the global socket
|
||||
// is not bound to a single session. Switch to a proper requestId → sessionId lookup
|
||||
// (via ApprovalCoordinator or the approval repository) once that mapping is exposed.
|
||||
val scopeSessionId: SessionId = TypeId(msg.requestId.value)
|
||||
module.approvalCoordinator.handleResponse(msg, scopeSessionId)?.let { sendFrame(it) }
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ object InputReducer {
|
||||
Effect.SendWs(
|
||||
ClientMessage.ApprovalResponse(
|
||||
requestId = ApprovalRequestId(active.requestId),
|
||||
// TODO: hardcoded APPROVE until the approve/reject overlay UX lands;
|
||||
// then the user picks the decision explicitly alongside the note.
|
||||
decision = ApprovalDecision.APPROVE,
|
||||
steeringNote = text,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user