Add feature flag to control file autosave behavior#650
Conversation
Autosaving to the last explicitly-saved file now requires the AUTOSAVE_TO_FILE_ENABLED flag. localStorage autosave is unchanged. https://claude.ai/code/session_014wjCBspKVYjB9pi4UXdbNw
The export button's no-autosave indicator is only meaningful when autosave-to-file is enabled, so suppress it when the flag is off. https://claude.ai/code/session_014wjCBspKVYjB9pi4UXdbNw
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughA feature flag ChangesAutosave-to-file gating feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Introduces a feature flag
AUTOSAVE_TO_FILE_ENABLEDto control whether the application automatically saves to the last explicitly-saved file. This allows the autosave-to-file feature to be toggled independently while keeping localStorage autosave unaffected.Changes
AUTOSAVE_TO_FILE_ENABLEDfeature flag inconfig.js(currently set tofalse)main.jsto conditionally callautoSaveToFile()only when the feature flag is enabledfiles.jsto conditionally apply the "no-autosave" CSS class based on both the feature flag and file handle statemain.jsandfiles.jsto include the new config constantImplementation Details
config.jsand imported where neededhttps://claude.ai/code/session_014wjCBspKVYjB9pi4UXdbNw
Summary by CodeRabbit
New Features
Chores