Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ describe("sessionFeedbackSurveyState", () => {
expect(claimCooldown).toHaveBeenCalledTimes(2);
});

it("blocks remount presentation while the appeared owner can respond", async () => {
it("keeps an appeared survey presentable across virtualized remounts", async () => {
const survey = await claim("appeared-once");
expect(survey).not.toBeNull();
if (!survey) throw new Error("expected survey to be selected");
markSessionFeedbackSurveyAppeared("appeared-once", survey.appearanceId);

expect(
isSessionFeedbackSurveyPresentable("appeared-once", survey.appearanceId),
).toBe(false);
).toBe(true);
recordSessionFeedbackSurveyResponse(
"appeared-once",
survey.appearanceId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,7 @@ export function isSessionFeedbackSurveyPresentable(
appearanceId: string,
): boolean {
const record = readSessionRecord(sessionId);
return (
record?.active?.appearanceId === appearanceId &&
!record.appeared &&
!record.response
);
return record?.active?.appearanceId === appearanceId && !record.response;
}

export function markSessionFeedbackSurveyAppeared(
Expand Down
Loading