Skip to content

Don't clear files in the state on execution start#1000

Merged
chvp merged 1 commit intomainfrom
fix/dont-clear-files-on-start
Apr 15, 2026
Merged

Don't clear files in the state on execution start#1000
chvp merged 1 commit intomainfrom
fix/dont-clear-files-on-start

Conversation

@chvp
Copy link
Copy Markdown
Member

@chvp chvp commented Apr 14, 2026

But do clear them when the list of files becomes empty.

@chvp chvp requested a review from Copilot April 14, 2026 08:25
@chvp chvp self-assigned this Apr 14, 2026
@chvp chvp added the bug Something isn't working label Apr 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes frontend execution reset behavior so that the in-memory io.files list is no longer cleared at the start of a run, and adds a regression test to ensure files remain visible while the next run is waiting for user input.

Changes:

  • Stop clearing InputOutput.files during reset() (triggered on BackendEventType.Start).
  • Add a test covering file persistence across runs while the runner is awaiting input.
  • Extend test helpers usage to wait specifically for the awaiting-input state.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/frontend/state/InputOutput.ts Keeps files state across Start resets by removing this.files = [] from reset().
test/__tests__/state/Files.test.ts Adds a test validating that files from a previous run are still present while the next run is awaiting input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/frontend/state/InputOutput.ts
Comment thread test/__tests__/state/Files.test.ts
@chvp chvp force-pushed the fix/dont-clear-files-on-start branch from e37d49c to 81ea8ba Compare April 14, 2026 08:48
@chvp chvp marked this pull request as ready for review April 14, 2026 08:48
@chvp chvp requested review from TomNaessens and bmesuere April 14, 2026 08:48
@chvp chvp merged commit 47d815a into main Apr 15, 2026
6 checks passed
@chvp chvp deleted the fix/dont-clear-files-on-start branch April 15, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants