fix: multi task question persistence and replay#1368
Open
Conversation
…m history When a project has multiple tasks, each task's question was being overwritten with the first task's question on reload. Changed the question parameter from a single string to an array across the load/replay chain so each task gets its own correct question. Also fixed replayActiveTask to use the active task's own question instead of the earliest question found across all chat stores.
4pmtong
reviewed
Feb 25, 2026
Comment on lines
+146
to
+152
| const tasks = project?.tasks || []; | ||
| const taskIdsList = tasks | ||
| .map((t: HistoryTask) => t.task_id) | ||
| .filter(Boolean) as string[]; | ||
| const questions = tasks.map((t: HistoryTask) => t.question || ''); | ||
| const finalTaskIds = taskIdsList.length ? taskIdsList : [projectId]; | ||
| const finalQuestions = questions.length ? questions : [question]; |
Collaborator
There was a problem hiding this comment.
Hi @bytecii Could you confirm whether it's guaranteed that every task with a non-null task_id also appears at the same index in both arrays? If not, it might be safer to derive both from a filtered pair like ProjectGroup.tsx already does taskPairs.
a7m-1st
reviewed
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related Issue
Closes #1366
Closes #1367
Description
Testing Evidence (REQUIRED)
What is the purpose of this pull request?
Contribution Guidelines Acknowledgement