Skip to content

M1: History Pagination + Lightweight History Mode (Daemon + IPC)#9227

Merged
ashleeradka merged 1 commit into
mainfrom
swarm/history-pagination/task-1
Feb 25, 2026
Merged

M1: History Pagination + Lightweight History Mode (Daemon + IPC)#9227
ashleeradka merged 1 commit into
mainfrom
swarm/history-pagination/task-1

Conversation

@ashleeradka
Copy link
Copy Markdown
Contributor

@ashleeradka ashleeradka commented Feb 25, 2026

Part of #9219. Extends history_request with pagination (limit, beforeTimestamp) and lightweight mode (mode, includeAttachments, includeToolImages, includeSurfaceData). Adds hasMore and oldestTimestamp to history_response. Implements server-side filtering to strip heavy payloads in light mode.


Open with Devin

Co-Authored-By: Claude <noreply@anthropic.com>
@ashleeradka ashleeradka self-assigned this Feb 25, 2026
@ashleeradka ashleeradka merged commit 6796119 into main Feb 25, 2026
3 of 4 checks passed
@ashleeradka ashleeradka deleted the swarm/history-pagination/task-1 branch February 25, 2026 23:03
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

🐛 1 issue in files not directly in the diff

🐛 HTTPDaemonClient constructs history_response payload missing required hasMore field, causing deserialization failure (clients/shared/IPC/HTTPDaemonClient.swift:488-492)

The HTTPDaemonClient.swift manually constructs a history_response JSON payload at line 488-492 with only type, sessionId, and messages — but IPCHistoryResponse.hasMore is now a required (non-optional) Bool field. When JSONDecoder().decode(ServerMessage.self, from: historyData) runs at line 495, it will throw a DecodingError.keyNotFound because the mandatory hasMore key is absent, causing the entire HTTP-based history fetch to silently fail (caught at line 498-499 and logged as an error).

Root Cause

The HistoryResponse contract in assistant/src/daemon/ipc-contract/sessions.ts:279 changed hasMore from non-existent to a required field (hasMore: boolean). The generated Swift type IPCHistoryResponse at clients/shared/IPC/Generated/IPCContractGenerated.swift:1973 mirrors this as public let hasMore: Bool (non-optional). However, clients/shared/IPC/HTTPDaemonClient.swift:488-492 manually builds the JSON dict:

let historyPayload: [String: Any] = [
    "type": "history_response",
    "sessionId": sessionId,
    "messages": transformed
]

This dict lacks hasMore, so decoding fails. All clients using the HTTP transport path (remote daemon connections) will be unable to load conversation history.

View 5 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ebe2546c4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread assistant/src/daemon/handlers/sessions.ts
Comment thread assistant/src/memory/conversation-store.ts
Comment thread clients/shared/IPC/Generated/IPCContractGenerated.swift
@ashleeradka
Copy link
Copy Markdown
Contributor Author

Addressed in #9246

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.

1 participant