fix(native-chat): a not-sent message takes no rail tick, matching the outline

Design D6: a not-sent message is no prompt the agent saw and the host's outline
leaves it out, so the loaded rail does too (the rail skip and the active-tick
walk-back already on this branch); the parity test pins that again.
This commit is contained in:
Brennan Benson
2026-10-04 15:23:36 -07:00
parent 4f9c961daa
commit b0febd92d8
@@ -95,14 +95,11 @@ function loadedRailItems(items: AgentJournalRenderItem[], submissions: AgentJour
}
describe('conversation outline parity with the loaded rail', () => {
// Except a rejected message: the desktop draws it in place and ticks it once loaded, while the
// host's outline, which older clients read too, leaves it out.
// A rejected message is drawn in place as not sent but is no prompt the agent saw, so it takes no
// tick, as the host's outline, which older clients read too, leaves it out.
it('lists exactly the user messages the transcript gives a rail tick, with the same ids and previews', () => {
const outline = projectAgentSessionConversationOutline(JOURNAL, [REJECTED])
const rejectedId = agentJournalSubmissionKey(REJECTED.clientMessageId)
const loadedWithRejected = loadedRailItems(JOURNAL, [REJECTED])
expect(loadedWithRejected.filter((item) => item.id === rejectedId)).toHaveLength(1)
const loaded = loadedWithRejected.filter((item) => item.id !== rejectedId)
const loaded = loadedRailItems(JOURNAL, [REJECTED])
expect(outline.map((entry) => entry.itemId)).toEqual(loaded.map((item) => item.id))
expect(