Repository navigation
[BUG REPORT] Ely's face follows the session shown, not the sessions - #109
Closed
ccjjfdyqlhy wants to merge 1 commit into
Closed
ccjjfdyqlhy wants to merge 1 commit into
ccjjfdyqlhy wants to merge 1 commit into
Conversation
Contributor
|
Thanks. Merged with your authorship as 6508209 on main. A follow-up, c284ea2, makes the doc comments in |
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.
Type
What and why
Ely's face took the most pressing mark of every session, so a session in the background that had failed once kept her fretting while you worked in another one.
Only the mark of the session you are in reaches her now.
How
src/pet.rs:feelingreads the look of the session shown, andshown_moodpicks that one look out of the sessions' looks, so a session in the background says nothing.src/pet/look.rs:moodmaps one look to one mood, andMoodloses the order that the fold over all the looks used.src/workspace.rs:Workspace::showngives the place of the session shown in the sessions' rows.src/pet/tests.rs: a new test says that a session in the background which waits or fails no longer frets her.src/pet/look/tests.rs: the test of the fold becomes a test of each look.AGENTS.md,PRD.md,docs/en_us/features.md,docs/zh_cn/features.md,README.md,README_zh.mdandtasks/acceptance.mdsay that she follows the session shown.Bug details
src/pet.rscollected the look of every session andlook::moodkept the most pressing of them, so one stale failure in the background decided her mood for as long as it lasted. The failed flag of a session is sticky: it clears only when that session runs a command of its own. Now the look of the session shown is the only one that reaches her.How it was tested
cargo test --lib pet cargo clippy --all-targets -- -D warnings cargo fmt --check scripts/check.shcargo test --lib petpasses, 24 tests, with the newpet::tests::she_follows_the_session_shown_and_leaves_the_others_aloneand the rewrittenpet::look::tests::each_mark_asks_her_mood.RUST_LOG=elyterminal=debug, opened a second session, ranfalsein it and switched back to the first one. The log sayspet: Ely feels Error, was Calmwhile the failing session was shown, andpet: Ely feels Calm, was Errorright after the switch back.mainbefore this change. It logspet: Ely feels Error, was Calmand nothing after the switch back, so she keeps fretting over a command that failed in a session you are no longer in.cargo fmt --checkandcargo clippy --all-targets -- -D warningsare clean, and the 500 line rule and the one line comment rule ofscripts/check.shpass.term::shellandterm::tap, because this machine has neither zsh nor fish. The same 23 fail on the pristine tree, so this change adds none.Notes
AGENTS.mdsays on 2026-10-18 that she opens with the sessions' mood, the PRD and the guides say she follows the sessions, and a test kept the fold. This PR changes that, so it is a behaviour change as much as a fix, and you may rather file it as a feature request.Checklist
[FEATURE REQUEST],[BUG REPORT]or[Other]