Skip to content

Reset filename and logData on file loading error #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
coderabbitai bot opened this issue May 22, 2025 · 0 comments
Open

Reset filename and logData on file loading error #296

coderabbitai bot opened this issue May 22, 2025 · 0 comments

Comments

@coderabbitai
Copy link

coderabbitai bot commented May 22, 2025

Description

When a file loading error occurs in the loadFile function in src/stores/logFileStore.ts, the UI state is reset to UNOPENED, but the filename and log data aren't reset to their default values.

Proposed solution

Add the following lines to the error handling block in the loadFile function:

setFileName(LOG_FILE_STORE_DEFAULT.fileName);
setLogData(VIEW_STORE_DEFAULT.logData);

This will ensure the UI is fully reset to its initial state when a file loading error occurs.

Additional context

This issue was identified during PR #293 but was separated to keep that PR focused on its main objective.

Original comment: #293 (comment)

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

No branches or pull requests

0 participants