fix(telegram): let free text pass through button-only screens - #25
Merged
Merged
Conversation
A report, a list, the settings or the category breakdown left on screen swallowed the next free-text message and re-rendered itself, so an expense typed right after the summary was never recorded and the screen looked stuck. HandleTextAsync now returns null when the text is not the flow's input; the router drops the conversation state and falls through to the compact-expense parsing. Only the states that wait for a typed value (amount, description, name, date, time zone) own their text.
|
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.



What
IConversation.HandleTextAsynccan now returnnull, meaning "this text is not my input". When it does, the router drops that conversation's state and falls through to the compact-expense parsing (and to help when the text carries no amount).The screens that only own inline buttons return
nullfor free text: the summary, the statistics, the category breakdown, the settings, and the list/detail states of categories, expenses and recurring. The states that wait for a typed value (amount, description, name, date, time zone) keep owning their text.Why
After opening the monthly summary, typing a compact expense such as
115509 carnes colantare-rendered the summary instead of recording it, so the screen looked stuck until a main-menu button was tapped. The same happened on every screen that only owns inline buttons: a report or a list on screen swallowed the next entry.How to test
Manual: open
📊 Resumen, then send115509 carnes colanta. The expense flow starts (category picker) instead of the summary being re-rendered.Checklist
long) and dates are calendar dates where relevant..envvalues are committed.AGENTS.md,docs/) updated if behavior or conventions changed.