Skip to content

fix(console): correct terminal_test state guard#30

Merged
dsent merged 2 commits into
aldum:devfrom
Vadim1987:Vadim1987/fix-terminal-test-guard
Jul 2, 2026
Merged

fix(console): correct terminal_test state guard#30
dsent merged 2 commits into
aldum:devfrom
Vadim1987:Vadim1987/fix-terminal-test-guard

Conversation

@Vadim1987

Copy link
Copy Markdown

The guard used ~= 'ready' or ~= 'project_open', which is always true, so terminal_test always returned early and never ran. Should be and: skip only when the state is neither ready nor project_open.

@dsent
dsent requested a review from aldum June 30, 2026 02:39

@aldum aldum left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With compy-toys#106, these states will be collapsed anyway, let's just delete the projec_open guard.
I made a note to pay attention to this when redoing the state machine, thanks.

@Vadim1987

Copy link
Copy Markdown
Author

dropped project_open, gated on ready only. thanks for the compy-toys#106 note.

@dsent

dsent commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

@aldum this is a terminal test, right? How likely is it that we want to perform it while a project is open or no project is open?

If our intended behavior is actually dropping the 'ready' state in the future, maybe we should drop that instead of dropping 'project_open'? Or just keep both as in the original fix.

For all I know, compy-toys#106 may land in 2028, so we need a robust behavior in the meantime, and ideally not having to keep something in mind all along. Remembering something that we will use now (e.g. "only perform terminal_test when a project is open, otherwise it won't work) seems better to me than remembering something for a (possibly distant) future event.

@aldum

aldum commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Yes, this is a terminal test, not really intended to be run when a project is running.
But since some project will always be running, this no longer make sense. The ready state will stay, the purpose of it is to indicate that the loading of the application has finished, it's 'project_open' that will be collapsed into it. Deleting that now will make the behavior consisent before and after compy-toys#106 lands.

@dsent
dsent requested a review from aldum July 2, 2026 12:35
@dsent

dsent commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks! Should be safe to merge, then?

@dsent
dsent merged commit 8ae555f into aldum:dev Jul 2, 2026
8 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.

3 participants