fix: Preserving client state
MR: Prevent Clear Command from Removing Login State File
Summary
This merge request updates the behavior of the clear command to prevent deletion of the login state file (corpus_client_state.json). Previously, running the clear command would remove this file, forcing users to log in again unnecessarily.
Changes
- Updated
clearcommand logic to excludecorpus_client_state.jsonfrom deletion. - Ensured only non-authentication-related files are cleared.
- Preserved existing functionality for clearing other application data.
Motivation
The previous behavior negatively impacted user experience by requiring repeated logins even when users only intended to clear temporary or cached data. This change improves usability by maintaining the login session.
Testing
- Verified that running the
clearcommand does not deletecorpus_client_state.json. - Confirmed that users remain logged in after executing the command.
- Ensured other files and data are still cleared as expected.
Impact
- Improves user experience by avoiding unnecessary re-authentication.
- No breaking changes expected.
Checklist
-
Code changes implemented -
Tested locally -
No impact on existing functionality
Closes #27 (closed)
Edited by Bhaskar Battula