Skip to content

docs(chat): correct the fallback-window comment, which claimed a match that did not exist - #797

Merged
bmc08gt merged 1 commit into
mainfrom
fix/message-window-no-fallback
Sep 18, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/message-window-no-fallback

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

MessagePolicy.fallbackEditWindow's doc said the value matches Android's, so the two clients offer the same rows for the same message. Android had no such constant. It treated an unset message_edit_window as no limit and kept Edit and Delete available forever, which is the opposite behaviour. The claim arrived with the constants in #724, whose commit message repeated it, so the error was in the change that introduced them rather than in the comment alone.

Android now carries FallbackEditWindow / FallbackDeleteWindow with these two values, so the parity the comment asserted holds — but as a duty nothing enforces, not a fact. The doc says that instead, names the Kotlin counterpart, and records that the match had to be created rather than found. The parity test gains a comment saying a failure here is the prompt to change Android in the same release.

Behaviour is unchanged. This is comments, a test comment, and the design spec.

The spec said the opposite

docs/superpowers/specs/2026-09-01-chat-message-actions-design.md said the edit window defaults to none and would become a constant only if the backend documented a window — which is the reading Android had implemented. It is superseded in place, naming both clients' constants and recording that the backend still documents nothing.

That leaves the values as a product guess on both platforms. The proto documents what message_edit_window and message_delete_window mean but never what an absent one implies. Whether real users ever reach the fallback is unknown: the cached-flag reads that could have answered it were all staff accounts.

The Android side is code-payments/code-android-app#1486, which adds the two constants and switches the default policy to them.

…h that did not exist

`MessagePolicy.fallbackEditWindow`'s doc said the value matches Android's, so the
two clients offer the same rows for the same message. Android had no such
constant: it treated an unset `message_edit_window` as no limit and kept Edit and
Delete available forever. The claim arrived with the constants in #724, whose
commit message repeated it.

Android now carries `FallbackEditWindow` / `FallbackDeleteWindow` with these two
values, so the parity the comment asserted holds — but as a duty nothing
enforces, not a fact. The doc says that instead, names the Kotlin counterpart,
and records that the match had to be created rather than found.

Behaviour is unchanged; this is comments and the design spec. That spec said the
edit window defaults to none and would become a constant only if the backend
documented a window, which is the reading Android had implemented. It is
superseded in place, naming both clients' constants.
@bmc08gt bmc08gt self-assigned this Sep 18, 2026
@bmc08gt
bmc08gt merged commit 7eecb41 into main Sep 18, 2026
1 check passed
@bmc08gt
bmc08gt deleted the fix/message-window-no-fallback branch October 5, 2026 15:16
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