fix/crash test hardware deselected tree#1996
Merged
alanpeixinho merged 1 commit intoJul 17, 2026
Merged
Conversation
* Use a proper id, instead of positional index to avoid accessing no
longer valid build/boot/test.
* Add an autoclose if a log is already opened for a build/boot/test
that is from a deselected tree.
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
felipebergamin
approved these changes
Jul 17, 2026
felipebergamin
left a comment
Contributor
There was a problem hiding this comment.
looking good. Tested locally, the fix works
Contributor
Author
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 it is
Fixes the crash where opening the log sheet of a boot whose tree was just deselected broke hardware details.
The log-sheet tables (BootsTable, BuildsTable, IndividualTestsTable) tracked the open log by row index. When a tree was deselected, the reloaded data dropped/reordered rows, so the stored index pointed past the list (sortedItems[currentLog].id → crash) or at the wrong item.
The tables now track the open log by the item's stable id and derive the row index from the live list each render. When the reloaded data no longer contains that id, the sheet closes on its own. This removes the fragile positional indexing entirely (crash impossible by construction) and also fixes the sheet reopening by itself when the tree was reselected.
How to test
Closes #1482