fix: add missing pattern match for {:ok, results} in blackboard message filtering
Resolves CaseClauseError that occurred when find_messages/2 returns {:ok, results} tuple instead of raw results list. This was causing crashes in the /blackboard route when attempting to enumerate messages.
The bug manifested as:
- CaseClauseError: no function clause matching in Blackboard.find_messages_by_topic/1
- Occurred when Blackboard.Storage returns success tuple format
Root cause: Missing pattern match for {:ok, results} case in message filtering logic at line 254. The existing code only handled error tuples and raw lists.
Technical changes:
- Add {:ok, results} when is_list(results) -> Enum.map(results, & &1.value)
- Maintains backward compatibility with existing result formats
- Ensures consistent value extraction from message envelopes
- Prevents crashes when storage adapter returns success tuples
Impact: Critical bug fix for blackboard message enumeration and display.
Co-Authored-By: Claude noreply@anthropic.com