Skip to content

Don't mark history loaded when skipping late history_response#1903

Merged
siddseethepalli merged 1 commit into
mainfrom
swarm/task-9
Feb 14, 2026
Merged

Don't mark history loaded when skipping late history_response#1903
siddseethepalli merged 1 commit into
mainfrom
swarm/task-9

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Feb 14, 2026

Summary

When a user sends a message before history_response arrives, populateFromHistory() returned early but still set isHistoryLoaded = true. This prevented ThreadManager.loadHistoryForActiveThreadIfNeeded() from ever retrying (due to guard !viewModel.isHistoryLoaded), permanently losing prior messages in the UI for that restored thread.

Fix

Leave isHistoryLoaded = false on the early-return path so that the next tab switch triggers a fresh history request.

Addresses review feedback on #1853.


Open with Devin

When a user sends a message before history_response arrives,
populateFromHistory() returned early but still set isHistoryLoaded = true.
This prevented ThreadManager.loadHistoryForActiveThreadIfNeeded() from
ever retrying, permanently losing prior messages in the UI for that thread.

Leave isHistoryLoaded = false on the early-return path so the next tab
switch can re-request history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@siddseethepalli siddseethepalli self-assigned this Feb 14, 2026
@siddseethepalli siddseethepalli merged commit ae88151 into main Feb 14, 2026
@siddseethepalli siddseethepalli deleted the swarm/task-9 branch February 14, 2026 17:45
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: 82b244b42b

ℹ️ 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 clients/macos/vellum-assistant/Features/Chat/ChatViewModel.swift
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.

Open in Devin Review

Comment thread clients/macos/vellum-assistant/Features/Chat/ChatViewModel.swift
siddseethepalli added a commit that referenced this pull request Feb 14, 2026
When a history_response arrives after the user has already sent messages,
prepend the history messages before the existing ones instead of returning
early with isHistoryLoaded=false. This gives the user full conversation
context while preventing the infinite retry cycle flagged in PR #1903.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
siddseethepalli added a commit that referenced this pull request Feb 14, 2026
…1909)

When a history_response arrives after the user has already sent messages,
prepend the history messages before the existing ones instead of returning
early with isHistoryLoaded=false. This gives the user full conversation
context while preventing the infinite retry cycle flagged in PR #1903.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@siddseethepalli
Copy link
Copy Markdown
Contributor Author

Addressed in #1909

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