fix(planning-session): show the submitted survey answer instead of "skipped" - #7151
Open
superplanehq-integration[bot] wants to merge 5 commits into
Open
superplanehq-integration[bot] wants to merge 5 commits into
superplanehq-integration[bot] wants to merge 5 commits into
Conversation
…ording The transcript's survey user note is merged from two sources: the reply the user actually submitted and the runner's own live log of that turn. When mergePlanningSessionNotes matched a live note to a submitted survey reply, it only flagged the live note's userTalk as "survey" and kept the live log's own wording for that turn. If the live log summarized or truncated that turn (or otherwise worded it differently), the transcript could show something other than the chosen answer, including the literal word "skipped" for a question the user actually answered. Make the submitted reply the source of truth for what gets displayed: once a live note is recognized as the match for a survey reply, rewrite its componentName to the submitted reply text instead of trusting the live log's own rendering. The exact text sent to the agent is unchanged; this only affects what is rendered. Add planningSessionLog.spec.ts cases covering a mismatched live note, a partially answered multi-question survey, and an all-skipped survey, plus a PhaseLogCard.stream.spec.tsx case that renders the merged transcript end-to-end and asserts the chosen answer is shown instead of "skipped". Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com> Co-authored-by: Pedro Foresti Leão <pedro@superplane.com>
Contributor
Author
|
👋 Commands for maintainers:
|
Contributor
Author
|
Maintainers: comment |
Keep main's ordering and this fix's submitted answer rendering. Signed-off-by: Pedro F. Leao <pedroforestileao@gmail.com>
forestileao
force-pushed
the
fix/survey-response-shows-as-skipped
branch
from
September 4, 2026 03:23
0ebe411 to
681df0b
Compare
markLiveSurveyReply looped over every root prompt whose first 48 chars matched the submitted survey reply, which could rewrite and mislabel a second, unrelated transcript turn. Stop after the first match, matching stampLiveNoteOrderKey's single-match behavior, and add a test covering two prompts that share the same survey prefix. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com>
…eply When multiple root prompts share the same 48-character survey-reply prefix, matching only the first prompt could attribute the submitted answer to an earlier, unrelated turn while the real survey turn kept the live log's wording. markLiveSurveyReply now prefers the root prompt whose live text still spells out the full submitted reply and only falls back to the first prefix match (a single rewrite) when no prompt carries the full text, so the label lands on the correct turn without duplicating another turn. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com>
Text position alone cannot decide which root prompt is the real survey turn: preferring the full-text match mislabels an earlier, unrelated prompt that carries the reply verbatim when the real (later) turn only kept a truncated preview. Anchor on chronology instead -- rewrite the last root prompt that shares the reply's 48-char prefix. This stays a single rewrite (no duplication) and resolves the earlier-prefix, later-full-text case too. Update the multi-prompt spec accordingly and add a case for the earlier-verbatim, later-truncated scenario. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com>
| if (`${note.componentName}\n${note.detail ?? ""}`.includes(prefix)) { | ||
| note.userTalk = userTalk; | ||
| if (noteText(note).includes(prefix)) { | ||
| target = note; |
There was a problem hiding this comment.
Latest match rewrites wrong turn
When the actual survey prompt is followed by another root prompt that repeats or quotes the same 48-character prefix, markLiveSurveyReply retains the later match and rewrites it with the submitted answer, causing the transcript to label the unrelated prompt as the survey response while leaving the actual survey turn unchanged.
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.
Task.
Summary
Problem
UI (web_src)
Tests
Not changed
Created via SuperPlane.
Reviews (4): Last reviewed commit: "fix(planning-session): label the latest ..." | Re-trigger Greptile