Skip to content

Fix message entries stored as 'track' instead of 'message' entry type#239

Open
jakebromberg wants to merge 7 commits intomainfrom
bugfix/talkset-entry-type
Open

Fix message entries stored as 'track' instead of 'message' entry type#239
jakebromberg wants to merge 7 commits intomainfrom
bugfix/talkset-entry-type

Conversation

@jakebromberg
Copy link
Member

Summary

  • Set entry_type: 'message' explicitly when creating flowsheet entries from the message code path (talksets, breakpoints, PSAs, etc.)
  • Add parameterized unit tests covering message entry creation and verifying track entries are unaffected

Closes #238

Jake Bromberg added 5 commits March 18, 2026 14:34
When a talkset, breakpoint, or other message was posted to the flowsheet, the controller did not set entry_type on the NewFSEntry, causing it to default to 'track' in the schema. This broke the V2 transform which relies on entry_type to determine the response shape. Now explicitly sets entry_type: 'message' for the message code path.
The test was asserting the buggy behavior where message entries were stored as 'track' type and returned with null metadata fields. Now that the fix correctly stores them as 'message' type, the V2 transform returns them without metadata fields (undefined, not null).
Infer the correct entry_type from message content instead of always
using 'message'. Messages containing 'Talkset' are stored as
entry_type 'talkset', messages containing 'Breakpoint' as
'breakpoint', consistent with the FlowsheetEntryType discriminated
union defined in wxyc-shared's API spec.
Update addEntry tests to expect 201 (matching the recent controller
change). Remove duplicate WxycError import in flowsheet.service.ts
introduced by merge.
@jakebromberg jakebromberg force-pushed the bugfix/talkset-entry-type branch from 8310d29 to 2b898d2 Compare March 18, 2026 21:37
Jake Bromberg added 2 commits March 18, 2026 14:43
Allow callers to specify entry_type directly instead of relying solely on message content inference, falling back to inferMessageEntryType for backwards compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Talkset and breakpoint entries stored as 'track' instead of correct entry type

2 participants