refactor: move some test state to solid signals (@miodec)#8025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors frontend test runtime state by moving “invalid test” + “incomplete/restart tracking” + “last result” out of test-stats module globals into Solid signals in states/test, and updates test flow code to use the new signal accessors/setters.
Changes:
- Add Solid signals + helper setters in
frontend/src/ts/states/test.tsfor invalid flag, last result, restart/incomplete tracking. - Update
test-logicto read/write that state via signals (including reset points on restart/finish). - Update UI consumers (
result.ts,pages/test.ts,test-stats.ts) to use the new state.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/ts/test/test-stats.ts | Removes module-global lastResult/invalid/incomplete* state; getStats() now pulls last result from states/test. |
| frontend/src/ts/test/test-logic.ts | Switches restart/incomplete/invalid/lastResult handling to states/test signals. |
| frontend/src/ts/test/result.ts | Reads invalid-state via isTestInvalid() signal instead of TestStats.invalid. |
| frontend/src/ts/states/test.ts | Introduces new signals for test invalid flag, last result, restart/incomplete tracking. |
| frontend/src/ts/pages/test.ts | Resets incomplete/restart signal state on beforeShow instead of TestStats.resetIncomplete(). |
Contributor
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
fehmer
approved these changes
May 29, 2026
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.
No description provided.