[codex] Add onboarding journal setup and initial index default#46
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughInit now computes journal setup defaults from repository context and passes them into onboarding and non-interactive flows. Journal configuration is applied during project initialization via a new apply_journal_init path; onboarding gains a dedicated JournalSetup page and selections are persisted into initialization logic and tests. ChangesJournal Setup in Init & Onboarding
Sequence DiagramsequenceDiagram
participant User
participant Init as init::run()
participant GitDetect as journal_setup_defaults()
participant Onboarding as onboarding::run()
participant Wizard as WizardState
participant Apply as apply_journal_init()
User->>Init: Start `tempyr init`
Init->>GitDetect: Compute JournalSetupDefaults from repo/git visibility
GitDetect-->>Init: Return defaults
Init->>Onboarding: Launch wizard (interactive) or noninteractive with defaults
Onboarding->>Wizard: Initialize pages including JournalSetup with defaults
User->>Onboarding: Interact (toggle journal options)
Wizard-->>Onboarding: Return OnboardingSelections
Onboarding-->>Init: Complete with selections
Init->>Apply: apply_journal_init(root, selections)
Apply-->>Init: Return summary lines (refspec/config/bootstrap attempts)
Init-->>User: Write config + output summary
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
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)
Review rate limit: 3/5 reviews remaining, refill in 13 minutes and 21 seconds. 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 `@crates/tempyr-cli/src/commands/init.rs`:
- Around line 72-85: The noninteractive_defaults function is hard-coding
bootstrap_journal_layout to false which ignores the computed setting in
JournalSetupDefaults; change the OnboardingSelections construction in
noninteractive_defaults to set bootstrap_journal_layout:
journal_defaults.bootstrap_journal_layout (i.e., propagate the
JournalSetupDefaults.bootstrap_journal_layout value into OnboardingSelections)
so the --no-wizard path respects the previously computed default.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 019f6bea-8c17-49a2-bd2b-b224e54a5f0d
📒 Files selected for processing (2)
crates/tempyr-cli/src/commands/init.rscrates/tempyr-cli/src/commands/onboarding.rs
d6e0d6d to
801a8eb
Compare
Summary
This updates Tempyr onboarding so the interactive flow makes both setup concerns explicit:
tempyr initinstead of silently applying the old implicit behaviorWhy
Users could complete onboarding without getting an initial index, and journal setup was inferred from repo visibility without an explicit onboarding prompt. The wizard now shows those choices directly, while non-interactive init stays conservative about potentially expensive index work.
Validation
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo test -p tempyr-clicargo testgit diff --checkSummary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation