Skip to content

[RQ-1116]: Failed to initialize FsManage : Could not load config #311

Open
TejaChitturi wants to merge 2 commits intomasterfrom
RQ-1116
Open

[RQ-1116]: Failed to initialize FsManage : Could not load config #311
TejaChitturi wants to merge 2 commits intomasterfrom
RQ-1116

Conversation

@TejaChitturi
Copy link
Copy Markdown

@TejaChitturi TejaChitturi commented Mar 30, 2026

Uploading Screen Recording 2026-03-30 at 10.12.17 AM.mov…

Ticket: https://browserstack.atlassian.net/browse/RQ-1116

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of configuration file read failures: when the config file is missing the app logs the situation and continues using sensible defaults instead of aborting. Other file read errors still surface as errors. Malformed JSON in config continues to be reported as a parsing error.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Walkthrough

The FsManager.parseConfig() method in fs-manager.ts was modified to handle configuration loading failures more gracefully. Previously, when config loading failed, the method would throw an error. Now it logs a message and returns a default Config object with version: WORKSPACE_CONFIG_FILE_VERSION and exclude: []. JSON parsing failures still throw as before. The change affects only the file-read error path while preserving the existing downstream parsing logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title references a specific issue (RQ-1116) and error condition, but doesn't clearly summarize the main change—which is handling 'file not found' errors gracefully rather than throwing. Consider a title like '[RQ-1116]: Handle missing config file gracefully in FsManager' that clearly describes the main behavior change.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch RQ-1116

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/renderer/actions/local-sync/fs-manager.ts`:
- Around line 138-147: The current logic in the load path unconditionally falls
back to the default Config when rawConfig.type === "error", which hides
non-missing-file errors; change the check in the block that currently returns
the defaultConfig (referencing rawConfig, CONFIG_FILE, Config, Static<typeof
Config>, WORKSPACE_CONFIG_FILE_VERSION) so it only returns the default when the
underlying error indicates the file is missing (e.g. rawConfig.error.code ===
'ENOENT'); for any other error rethrow the error (or propagate it) instead of
returning the default so permission/I/O issues are not silently ignored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 91a311c3-3ae1-4aaa-9333-1deedc1b5237

📥 Commits

Reviewing files that changed from the base of the PR and between 33adac2 and 9ea5174.

📒 Files selected for processing (1)
  • src/renderer/actions/local-sync/fs-manager.ts

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

Successfully merging this pull request may close these issues.

1 participant