Skip to content

Fix bundled Studio config paths#27

Merged
nmbrthirteen merged 2 commits into
mainfrom
fix/bundled-studio-config-paths
Jun 19, 2026
Merged

Fix bundled Studio config paths#27
nmbrthirteen merged 2 commits into
mainfrom
fix/bundled-studio-config-paths

Conversation

@nmbrthirteen

@nmbrthirteen nmbrthirteen commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • resolve the Python backend from runtime/backend in installed Studio bundles
  • point MCP setup at the packaged mcp-server.mjs path when available
  • trim noisy Config and MCP setup copy

Validation

  • npx tsc -p tsconfig.json --noEmit
  • npx vitest run src/config/paths.test.ts
  • npm run build
  • installed-runtime smoke: /api/config/status, /api/integration-info, and /config on localhost returned successfully

Summary by CodeRabbit

Release Notes

  • New Features

    • Improved MCP setup page with enhanced status indicators and simplified installation guidance.
    • Simplified configuration page status display with cleaner cache, secrets, and action sections.
  • Style

    • Extended form control styling for consistent focus states across all input types.
    • Added new styling for settings links with improved hover effects.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@nmbrthirteen, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 17 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46d8cf23-3b9f-49b8-a831-e8c8d45d0773

📥 Commits

Reviewing files that changed from the base of the PR and between dc5f474 and 951e469.

📒 Files selected for processing (2)
  • src/ui/client/ConfigPage.tsx
  • src/ui/client/McpSetupPage.tsx
📝 Walkthrough

Walkthrough

Refactors backendDir resolution into a helper that checks multiple locations for cli.py. The /api/integration-info endpoint dynamically resolves mcpPath from an env var, packaged runtime file, or dist fallback. McpSetupPage consumes the new mcpPath field, and ConfigPage receives several UI label/field simplifications alongside CSS additions.

Changes

MCP Path Resolution and UI

Layer / File(s) Summary
Backend and MCP path resolution
src/config/paths.ts, src/handlers/integrations.routes.ts
resolveBackendDir() checks PODCLI_BACKEND, then projectRoot/backend/cli.py, then projectRoot/runtime/backend/cli.py, then defaults. /api/integration-info computes mcpPath from PODCLI_STUDIO, runtime/studio/mcp-server.mjs, or dist/index.js, and returns it as mcp_path with updated server_ok.
McpSetupPage consuming resolved mcpPath
src/ui/client/McpSetupPage.tsx
Replaces distPath state with mcpPath, derives "Ready"/"Not built" status from server_ok, generates Claude Desktop JSON using mcpPath with a <path-to>/mcp-server.mjs placeholder, and replaces the Claude Code snippet with the static podcli mcp install command.
ConfigPage UI and CSS simplifications
src/ui/client/ConfigPage.tsx, src/ui/public/css/styles.css
Reduces status rows to a single "Cache" row, changes token indicator to s.preview/"not set", replaces help-text + link with a direct "Get token" anchor, updates Actions labels and checkbox text to "Use imported profile", adds input[type="password"] to shared form-control selectors, and adds .set-link accent style.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 Hop hop! The path resolves anew,
No more guessing where cli.py flew!
mcpPath gleams with studio light,
The token shows a preview bright.
"Use imported profile" — short and sweet,
The rabbit tidied every feat! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change—updating bundled Studio configuration paths, which is the primary focus across multiple files in this changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bundled-studio-config-paths

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/ui/client/ConfigPage.tsx`:
- Around line 118-119: The ternary expression in the span element currently
displays s.preview when s.set is true, but if s.preview is empty or undefined,
the span shows blank text which provides poor user feedback. Modify the
expression to add a fallback fallback value when s.preview is empty or falsy,
ensuring users always see meaningful status text such as "not set" or a similar
indicator when the preview value is missing even though s.set is true.

In `@src/ui/client/McpSetupPage.tsx`:
- Around line 46-50: The desktopJson variable is being constructed as a string
literal with embedded serverPath values using template literals, which doesn't
properly escape special characters like backslashes in Windows paths or quotes.
Replace the string template approach by creating a JavaScript object with the
proper configuration structure (containing mcpServers with podcli settings,
command, and args properties), then use JSON.stringify to convert it to a valid
JSON string. This ensures all special characters are properly escaped regardless
of the serverPath value.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67f2ee5a-80cf-4c6e-9030-b07fcf4ffe89

📥 Commits

Reviewing files that changed from the base of the PR and between f4d8f51 and dc5f474.

📒 Files selected for processing (5)
  • src/config/paths.ts
  • src/handlers/integrations.routes.ts
  • src/ui/client/ConfigPage.tsx
  • src/ui/client/McpSetupPage.tsx
  • src/ui/public/css/styles.css

Comment thread src/ui/client/ConfigPage.tsx Outdated
Comment thread src/ui/client/McpSetupPage.tsx Outdated
@nmbrthirteen nmbrthirteen merged commit 3ef4f4a into main Jun 19, 2026
18 checks passed
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