Skip to content

fix(telegram): let free text pass through button-only screens - #25

Merged
santidev21 merged 1 commit into
mainfrom
fix/conversation-free-text-passthrough
Oct 4, 2026
Merged

santidev21 merged 1 commit into
mainfrom
fix/conversation-free-text-passthrough

Conversation

@santidev21

Copy link
Copy Markdown
Owner

What

IConversation.HandleTextAsync can now return null, 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 null for 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 colanta re-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

dotnet build MyBudget.sln                    # zero warnings
dotnet test MyBudget.sln                     # 858 tests
dotnet format MyBudget.sln --verify-no-changes

Manual: open 📊 Resumen, then send 115509 carnes colanta. The expense flow starts (category picker) instead of the summary being re-rendered.

Checklist

  • CI is green (build, tests, formatting, security scans).
  • New/changed behavior is covered by tests.
  • Money stays exact (long) and dates are calendar dates where relevant.
  • No secrets, credentials or .env values are committed.
  • Docs (AGENTS.md, docs/) updated if behavior or conventions changed.
  • Changes are focused and reasonably small.

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.
@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@santidev21
santidev21 merged commit ec7ad2e into main Oct 4, 2026
10 checks passed
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