Skip to content

test(chat): cover the selection bar's re-narrowing of a stale bubble - #1406

Merged
bmc08gt merged 1 commit into
code/cashfrom
test/chat-selection-window-narrowing
Sep 4, 2026
Merged

test(chat): cover the selection bar's re-narrowing of a stale bubble#1406
bmc08gt merged 1 commit into
code/cashfrom
test/chat-selection-window-narrowing

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

#1403 made the ToggleMessageSelection reducer re-apply the edit and delete windows to the bubble it selects, so a transcript row that resolved well inside a window stops offering an action the server would answer CANNOT_EDIT or CANNOT_DELETE. Nothing asserted that behaviour, which is how the gap went unnoticed.

One test per window, because a window wired to the wrong capability would pass either test on its own. Both were checked against a reducer with the narrowing removed and fail there, so neither is vacuous.

The bubble helper's sentAt is decades in the past, so any finite window in the test has closed by the time the reducer compares it against Clock.System.now().

Gating the actions on the edit and delete windows (#1403) made the
ToggleMessageSelection reducer re-apply them to the bubble it selects, so a
transcript row resolved well inside a window no longer offers an action the
server would answer CANNOT_EDIT or CANNOT_DELETE. Nothing asserted that.

One test per window, because a window wired to the wrong capability passes
either test alone. Both fail when the narrowing is dropped from the reducer.
@bmc08gt bmc08gt self-assigned this Sep 4, 2026
@github-actions github-actions Bot added the type: test Test additions or improvements label Sep 4, 2026
@bmc08gt
bmc08gt merged commit b43895e into code/cash Sep 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: test Test additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant