Skip to content

Comments

fix: show PRD-specific instructions after JSON tracker setup#96

Merged
subsy merged 7 commits intomainfrom
fix/json-tracker-setup-instructions
Jan 15, 2026
Merged

fix: show PRD-specific instructions after JSON tracker setup#96
subsy merged 7 commits intomainfrom
fix/json-tracker-setup-instructions

Conversation

@subsy
Copy link
Owner

@subsy subsy commented Jan 15, 2026

Summary

  • After setup wizard completes with JSON File Tracker selected, users now see clear instructions about how to run ralph-tui with the --prd flag
  • Previously, users would complete setup successfully but then hit "PRD path required for json tracker" error when running ralph-tui run

Changes

The setup wizard now shows tracker-specific instructions:

For JSON tracker:

ℹ You can now run Ralph TUI with:

  Create a PRD and tasks:        ralph-tui create-prd
  Run Ralph on existing tasks:   ralph-tui run --prd <path-to-prd.json>

For Beads/BV trackers (unchanged):

ℹ You can now run Ralph TUI with:

  ralph-tui run

Test plan

  • Run ralph-tui setup --force and select JSON File Tracker
  • Verify the output shows PRD-specific instructions
  • Run ralph-tui setup --force and select Beads tracker
  • Verify the output shows the standard ralph-tui run instruction

Fixes #57

Summary by CodeRabbit

Release Notes

  • Tests

    • Added comprehensive test suite for the setup wizard, covering configuration creation, persistence, and user interactions.
  • New Features

    • Setup wizard now provides tailored run instructions based on the selected tracker type (PRD-specific guidance for JSON tracker, standard guidance for others).

✏️ Tip: You can customize this high-level summary in your review settings.

When users complete setup with the JSON File Tracker, they now see
clear instructions about how to use the --prd flag, instead of
discovering the requirement through an error message.

Fixes #57
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
ralph-tui Ignored Ignored Preview Jan 15, 2026 11:14pm

Review with Vercel Agent

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Warning

Rate limit exceeded

@subsy has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3363b43 and c6b21ee.

📒 Files selected for processing (4)
  • codecov.yml
  • src/setup/wizard.test.ts
  • website/content/docs/plugins/trackers/beads-bv.mdx
  • website/content/docs/plugins/trackers/beads.mdx

Walkthrough

A comprehensive test suite for the setup wizard is introduced, alongside enhancements to post-configuration messaging that provide tracker-specific instructions. The tests validate configuration creation, persistence, and overwrite handling, whilst the wizard now outputs PRD-related guidance for JSON tracker selections instead of generic run instructions.

Changes

Cohort / File(s) Summary
Setup Wizard Test Suite
src/setup/wizard.test.ts
New comprehensive test suite (+368 lines) covering wizard configuration flow, TOML persistence, conditional instruction output based on tracker type, overwrite behavior with force flag, and config validation across various scenarios with mocked prompts and filesystem interactions.
Setup Wizard Implementation
src/setup/wizard.ts
Enhanced post-configuration messaging (+12/-3 lines) to output tracker-specific run instructions: PRD creation and Ralph execution commands for JSON tracker; generic "ralph-tui run" for other trackers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A wizard's wisdom now takes shape,
With tests that guard each step and drape,
And PRD paths shine bright and clear,
So JSON trackers have naught to fear!
Let prompts guide us true and strong,

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: displaying PRD-specific instructions after JSON tracker setup, addressing the core issue.
Linked Issues check ✅ Passed The PR implements the required fix for issue #57 by adding tracker-specific instructions after setup, preventing the 'PRD path required' error.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue: implementation shows PRD-specific instructions for JSON tracker and tests verify this functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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


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.

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.35%. Comparing base (103cd51) to head (c6b21ee).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   23.72%   26.35%   +2.62%     
==========================================
  Files          74       69       -5     
  Lines       17263    16516     -747     
==========================================
+ Hits         4095     4352     +257     
+ Misses      13168    12164    -1004     
Files with missing lines Coverage Δ
src/setup/wizard.ts 82.33% <100.00%> (+78.78%) ⬆️

... and 14 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Tests cover:
- projectConfigExists function
- runSetupWizard with different tracker selections
- JSON tracker shows PRD-specific instructions (verifies #57 fix)
- Beads/Beads-BV trackers show standard instructions
- Force flag behavior for overwriting existing config
- checkAndRunSetup conditional logic
- Welcome banner and config show command output

Uses mock.module() to mock interactive prompts for deterministic testing.
Copy link
Contributor

@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

🤖 Fix all issues with AI agents
In `@src/setup/wizard.test.ts`:
- Around line 276-283: The console.log spy created in the beforeEach should be
restored in afterEach to avoid leaking the mock into other tests: keep the spy
returned from spyOn(console, 'log') in a variable (e.g., consoleLogSpy) when
setting it up and then restore the original console.log in afterEach (before
removing tempDir) by calling the spy's restore/callThrough method so the
"runSetupWizard" and "wizard output messages" suites behave consistently.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 103cd51 and 3363b43.

📒 Files selected for processing (2)
  • src/setup/wizard.test.ts
  • src/setup/wizard.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Start all code files with a file-level JSDoc comment section explaining the file's purpose, prefixed with 'ABOUTME: '

Files:

  • src/setup/wizard.ts
  • src/setup/wizard.test.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Start all code files with a file-level JSDoc comment section explaining the file's purpose, prefixed with "ABOUTME: "

Files:

  • src/setup/wizard.ts
  • src/setup/wizard.test.ts
🧬 Code graph analysis (1)
src/setup/wizard.ts (2)
src/setup/index.ts (1)
  • printInfo (31-31)
src/setup/prompts.ts (1)
  • printInfo (374-376)
🔇 Additional comments (6)
src/setup/wizard.ts (1)

383-394: LGTM! Tracker-specific instructions address the linked issue.

The conditional logic correctly distinguishes the JSON tracker from others and provides clear, actionable instructions for users. This directly resolves issue #57 by making the PRD path requirement explicit.

One consideration: if additional trackers are added in the future that also require PRD paths, this hardcoded string comparison may need to be extended. Consider whether the tracker plugin itself could expose a property indicating whether PRD-specific instructions are needed, but this is fine for now given the current scope.

src/setup/wizard.test.ts (5)

1-5: LGTM! Proper ABOUTME header present.

The file-level JSDoc comment correctly explains the file's purpose and follows the required format with the 'ABOUTME:' prefix.


25-56: Well-structured mock setup.

The pattern of defining mutable mock implementations before mocking the modules, then importing the system under test afterwards, is correct and allows flexible per-test customisation.


69-101: Good coverage for projectConfigExists.

The test cases properly cover the three relevant scenarios: no config, config exists, and directory exists without the config file. Temp directory cleanup ensures test isolation.


171-214: Excellent coverage of the core PR functionality.

These tests directly validate the tracker-specific instruction behaviour introduced in this PR. The use of both positive assertions (toContain) and negative assertions (not.toContain) ensures the conditional logic works correctly for the JSON tracker versus other tracker types.


103-126: Good test setup pattern with proper cleanup.

The runSetupWizard test suite demonstrates the correct pattern for capturing and restoring console output, with consoleLogSpy.mockRestore() in afterEach. The captured output approach enables verification of the tracker-specific instructions without requiring complex mocking of the prompts module's print functions.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

…hierarchy

Both beads and beads-bv tracker docs now explain:
- Default 'ralph' label filter (issues must have this label to appear)
- Tasks must be children of epic (using --parent flag) to appear with --epic
- How to add labels to existing issues
- How to change/remove the label filter

beads.mdx changes:
- Added warning callout about default ralph label filter
- Updated Basic Usage to show --label ralph on all create commands
- Added step explaining parent-child relationships
- Added step for dependencies (was missing)
- Fixed Options Reference to show labels default is 'ralph'
- Rewrote Label Filtering section with clear instructions
- Updated troubleshooting to check labels first

beads-bv.mdx changes:
- Added warning callout about default ralph label
- Completely rewrote Basic Usage to show epic creation first
- Shows creating tasks as children with --parent flag
- Added callout explaining --parent requirement
- Fixed Options Reference to show labels default
- Added link to beads docs for label filtering details
subsy added 3 commits January 15, 2026 23:04
Store the spy in a variable and call mockRestore() in afterEach
to prevent mock leakage between test suites.
- Set project coverage target to 35% with 1% threshold
- Set patch coverage target to 50% with 5% threshold
- Ignore website, tests, and dist directories
- Configure PR comment layout
@subsy subsy merged commit cdf556b into main Jan 15, 2026
7 checks passed
@subsy subsy deleted the fix/json-tracker-setup-instructions branch January 15, 2026 23:16
sakaman pushed a commit to sakaman/ralph-tui that referenced this pull request Feb 15, 2026
…tions

fix: show PRD-specific instructions after JSON tracker setup
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.

PRD path required for json tracker

2 participants