Repository navigation
Alpha TUI: fixes from the owner's trial of flahax mix - #136
Merged
Merged
Conversation
Faint text (SGR 2) vanished on a translucent grey Windows Terminal theme, hiding Q Quit.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 89.78% 89.83% +0.05%
==========================================
Files 54 54
Lines 7281 7322 +41
==========================================
+ Hits 6537 6578 +41
Misses 744 744
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 23, 2026
- Space ticks only while the filter is empty; while filtering, Space types and Tab ticks, and the key help says so (#139). - Rounding noise below 1e-9 prints as 0; nutrient columns keep a space apart (#140). - Tank card headings and the Tanks footer wrap instead of being cut (#141). - Grower words where growers read: NO3-N in the formula prompts, "Warning: the formula is ...", and readable notes on the screen, the sheet and the terminal (#142). summary.json is unchanged. - "Added <acid> for the pH plan." and "Name of this acid" (#143). - The lab values typed so far show above each lab-value question (#144). - The Tanks answer takes two lines in "Your batch" (#145). - A view that continues above or below the window says so (#146). The line-mode transcript fixture changes only in the acid name prompt, the new "Added ..." line and "Formulation:" for "formulation:".
rafatahmed
added a commit
that referenced
this pull request
Nov 7, 2026
Alpha TUI: fixes from the owner's trial of flahax mix
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 changes
In Windows Terminal, the arrow keys in the full-screen
flahax mixtypedàP/àHinstead of moving the highlight. In the crop-formula list they filled the filter; in other lists they seemed to do nothing. This PR fixes that.Root cause
0xE0(or0x00), thenH,P,KorM.msvcrt.kbhit()reported it as waiting, so that the letterà(also0xE0) would stand alone.àplus a letter.The fix
read_windows_keyreads the second code after every prefix again.test_windows_arrows_without_kbhitfeeds the two codes withkbhit()False, as Windows Terminal does. It failed before the fix with'à' != 'UP'.àcannot be told apart from the prefix throughgetwch. mix TUI on Windows: typing "à" swallows the next key #127 is reopened for a proper fix with the console's key events.Checks
tests.test_terminalandtests.test_mix_tuipass.ruff checkandruff format --checkpass, and the files use LF line endings.Also: readable key help on every theme
The key help ("Q Quit", Tab), the inactive tab names, the "Sheets:" line and the "Filter:" label were drawn faint (ANSI SGR 2) and vanished on the owner's translucent grey theme. They now use the terminal's normal colour;
test_no_faint_text(wizard and results) failed before the change.Also: leaving the results asks first (#138)
Q or Esc on the results screen now asks "Leave the results? The sheets are saved in . Y/N"; Y leaves, any other key stays. Ctrl+C still leaves at once.
Also: findings of the screen-by-screen audit (#139-#146)
The real code was driven with keystrokes through a full batch (new well-water analysis, formula, ticked fertilizers, new acid) at 80 x 24 and 120 x 30, and every screen was reviewed:
Full suite 616 tests OK (PHREEQC included); the 97-result behaviour baseline is identical.
Owner check
Reinstall from this branch:
Then run
flahax mixin Windows Terminal: ↑/↓ should move the highlight in the water list and the crop-formula list, and the key help line ("Q Quit") should be readable at the bottom.Closes #135
Closes #137
Closes #138
Closes #139
Closes #140
Closes #141
Closes #142
Closes #143
Closes #144
Closes #145
Closes #146