Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughSummary by CodeRabbit
WalkthroughCLI commands remove the Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI Command
participant Resolver as resolveConfigPath
participant Loader as loadCLIConfig
participant Vite as createViteConfig
participant FS as Filesystem
CLI->>Resolver: provide options.config (optional)
Resolver->>FS: read provided config path (if any) or return undefined
Resolver-->>CLI: return configPath or undefined
CLI->>Loader: call loadCLIConfig(contentDir, configPath)
Loader->>FS: read/parse resolved chronicle.yaml (configPath or CWD/chronicle.yaml)
Loader-->>CLI: return CLIConfig
CLI->>Vite: call createViteConfig(..., configPath)
Vite->>FS: read chronicle.yaml using configPath or projectRoot
Vite-->>CLI: return resolved Vite config
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
There was a problem hiding this comment.
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 `@packages/chronicle/src/server/vite-config.ts`:
- Around line 26-33: The readChronicleConfig function currently swallows read
errors when a user supplies a configPath; change the behavior so that when
configPath is provided and fs.readFile fails you do not return null but instead
surface the error (either rethrow the caught error or throw a new Error that
includes the provided configPath and the original error message) so callers know
the explicit config is unreadable; update the try/catch around fs.readFile in
readChronicleConfig to include the configPath in the error context and propagate
the failure rather than silently returning null.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ef651e45-ab60-45d5-a7e2-de5ae51da3dc
📒 Files selected for processing (6)
packages/chronicle/src/cli/commands/build.tspackages/chronicle/src/cli/commands/dev.tspackages/chronicle/src/cli/commands/serve.tspackages/chronicle/src/cli/commands/start.tspackages/chronicle/src/cli/utils/config.tspackages/chronicle/src/server/vite-config.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…null Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
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 `@packages/chronicle/src/cli/utils/config.ts`:
- Around line 18-23: The function resolveConfigPath currently returns
path.resolve(configPath) even if that file does not exist; update
resolveConfigPath (and its usage in loadCLIConfig) to validate existence: when
configPath is provided, resolve it, check fs.existsSync(resolvedPath) and only
return the resolvedPath if the file exists, otherwise return undefined (so
loadCLIConfig can emit the friendly error). Ensure you reference
resolveConfigPath and any direct callers like loadCLIConfig to handle the
undefined return properly.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d292239b-0d11-4036-834c-801ae15e2f45
📒 Files selected for processing (4)
packages/chronicle/src/cli/commands/build.tspackages/chronicle/src/cli/commands/dev.tspackages/chronicle/src/cli/commands/serve.tspackages/chronicle/src/cli/utils/config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/chronicle/src/cli/commands/build.ts
- packages/chronicle/src/cli/commands/dev.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
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 `@packages/chronicle/src/cli/utils/config.ts`:
- Around line 27-37: The catch block around reading/parsing the config masks
YAML parse errors by always claiming the file is missing; update the error
handling around fs.readFile(resolvedConfigPath, 'utf-8') and parse(raw) so you
inspect the caught error (e.g., catch (err)): if err.code === 'ENOENT' log the
existing "not found" message, otherwise treat it as a parse/other error and log
a clear message that includes the parse failure details (err.message and
optionally err.stack) and mention the config file (resolvedConfigPath) so users
know their ChronicleConfig YAML is malformed and can fix it before
process.exit(1).
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 03916522-ad4f-4b50-8d75-4fa7ded3a7a6
📒 Files selected for processing (1)
packages/chronicle/src/cli/utils/config.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
--config <path>flag todev,build, andservecommands to specify chronicle.yaml location-cshort arg from--contentacross all commands to avoid future conflicts--configflag takes priority over cwd lookup; removed content dir fallbackTest plan
--helpshows--configoption--configflag from different cwd — dev server starts with correct config🤖 Generated with Claude Code