Repository navigation
[3835 by Claude Opus 5.5] Pi: settings UI, CLI, setup wizards, managed login, health check, diagnostics and docs - #3857
Conversation
Pi can now be configured and run everywhere the other agents are: the settings UI, managed login, the CLI and setup, health check, diagnostics, MCP settings and docs. Typecheck and lint are clean for every package I touched, and the affected test suites pass. There's no Docker here, so I haven't done a real containerised login or health check. Instead I installed Pi 1.6.1 locally and ran `pi auth check` and `pi auth login` against it to confirm the output, exit codes and prompts the code relies on. Managed login - How it runs: the login container runs `pi auth login <provider> --no-browser`, or `--api-key` to save a key. I tested sign-in on Anthropic (paste a code), OpenRouter (paste the redirect URL) and the ChatGPT subscription (device code); `--api-key` saved a key to `auth.json`. - Where credentials go: `pi-entrypoint.sh` has a login mode that points Pi straight at the mounted dir (`~/.propr/agent-credentials/<id>/.pi/agent`). It skips the per-run copy because the write-back after a run only saves refreshed tokens, never a new login. - Choosing the provider: in the UI, a small dialog asks for the provider and login method before the container starts. Through the API the provider is optional and defaults to the provider of the agent's default model. Health check - Pi agents are checked with `pi auth check --provider <p> --json --no-refresh` instead of running a prompt. The provider comes from the health-check model. - It runs with no network, the credential dir mounted read-only, and API keys passed through the environment rather than the command line. - `ready` shows as ready. `not_ready` and `invalid` show as sign-in required, with Pi's reason. An unknown provider is reported as a configuration problem rather than a login prompt. Settings UI - Credentials: Pi offers three choices: log in to a new managed account, use an existing config dir (`~/.pi/agent`), or use API keys. The API-key choice shows one key field per provider used by the selected models. - Models and logo: a provider + model control adds any `pi-<provider>/<model>`. Pi gets a π logo. The CLI version controls already worked for Pi. CLI and setup - `propr agent login <pi-agent>` accepts `--provider` and `--api-key`. - Pi is now known to `propr check` and `propr init`, the agent skill (installed to `~/.pi/agent/skills/propr`), both launcher copies (`HOST_PI_DIR` → `PI_CONFIG_PATH`), `docker-compose.yml`, the local-setup engine and the desktop setup schema. Diagnostics and MCP - Redaction: the keys and tokens in Pi's `auth.json` are now redacted. - Managed diagnostics: Pi is now included. The previous Pi change had skipped it, so Pi run logs were silently refused; they are captured now. - MCP: the settings catalog lists `PI_CONFIG_PATH`, `PI_TIMEOUT_MS` and `HOST_PI_DIR`. Creating an agent through the MCP tools now uses each type's own default config path; before, it fell back to `~/.vibe` for every type without managed login. Docs: `agent-runtime.md` has a Pi section covering the image, entrypoint, credential mount, disposable agent dir, refresh write-back rules, managed login and health check. The setup guides, configuration reference, `.env.example` and CHANGELOG are updated. `settings-locations.md` is generated from the settings catalog, so I regenerated it rather than editing it. Tests: new tests cover the login descriptor and routes, the entrypoint's login mode, health-check parsing (using recorded Pi 1.6.1 output), redaction, CLI validation and login, the launcher, and the UI dialogs (463 settings UI tests pass). `test/agentRegistryManagedAgentPin.test.ts` only passes when run with `--experimental-test-module-mocks`. Gaps: - `propr check` still sends a short prompt to validate Pi rather than using `pi auth check`. - A stack with only a provider API key and no `HOST_PI_DIR` isn't detected as having Pi, so you need `--agents pi`. - The setup wizard's login step always signs in to `anthropic`; use `propr agent login --provider` for anything else. - `SKILL.md` itself is unchanged; the skill installer knows about Pi. Four UI previews are attached: the Pi agent dialog with API keys, the same dialog with managed login, the provider picker, and an agent card showing a `not_ready` health result. ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=8 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 8) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
✅ Applied the requested follow-up changes in commit 9049393 Summary of ChangesI fixed the Validate Changes failure. Only the API lint step had failed: two files on this branch went over the 400-line
Checks I ran:
I didn't add previews, since nothing visible changed. Review digestRisk-tiered paths
Diff size: 5 files changed, +291/−236 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed the Validate Changes failure. Only the API lint step had failed: two files on this branch went over the 400-line `max-lines` limit, and the API lint fails on any warning. Every other stage in the run passed. **`packages/api/services/agentLoginSessionManager.ts` (431 → 437 total lines, 400 limit)** — I moved two groups of code into `services/agentLoginDocker.ts`, without changing what they do: - The Pi login logic: picking the provider, building the login command, and returning a clear error for bad input. It's now one exported function, `resolveAgentLoginDescriptor`, and `start()` calls it. - The default Docker run and spawn helpers, plus the `DockerCommandResult` type. The manager still re-exports that type, so existing imports keep working. **`packages/api/test/agentLoginRoutes.test.ts` (498 lines)** — I split it up: - The Pi route and descriptor tests now live in a new file, `test/agentLoginPi.test.ts`. - The shared test fixtures are in a new `test/agentLoginTestHelpers.ts`, which both test files import. **Checks I ran:** - `eslint . --max-warnings 0` in `packages/api` now passes, and the API typecheck is clean. - All 20 tests in `agentLoginRoutes.test.ts` and `agentLoginPi.test.ts` pass. - `test/agentDefaultConfigPaths.test.ts` passes (29 tests). I didn't add previews, since nothing visible changed. PR: #3857 Comment by: @propr-dev[bot] (ID: 7226481658) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
ℹ️ Analyzed the follow-up request by @github-actions[bot] Analysis SummaryI didn't need to change anything: the lint failure in this report is already fixed on the branch.
I didn't make a visual preview because nothing changed. No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved the one conflict, in What the conflict was about: Both branches edited the
How I resolved it: I kept both sides in this order:
Why: The two sides cover different topics. The PR covers setup and login; the epic covers runtime behaviour. The only text both sides wrote is the "Each run…" paragraph, and the epic's version is a strict superset of the PR's, so keeping it avoids a duplicate paragraph. This order also reads naturally: set up credentials, check health, then what happens at run time. The file is documentation only, and the resolved section reads cleanly. 🤖 Resolution Details
System-triggered merge conflict resolution |
Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - docs/docs/features/agents-and-models.md PR: #3857 Model: Claude Opus 5.5
|
CI failed: Restricted network container smoke, Full Test Suite Shard 2/4, Full Test Suite Native Electron (hosted), Full Test Suite Shard 3/4, Full Test Suite Shard 1/4, Validate Docs Site, Full Test Suite Shard 4/4 Please investigate and fix these CI failures.
Failure evidence
Failure evidence
Failure evidence
Failure evidence
Failure evidence
Failure evidence
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 2cdcaec Summary of ChangesI fixed the build error that broke the Restricted network container smoke check; I haven't run the check itself. Cause: The merge from the epic branch ( Fix:
Verification:
The later steps of that check build the agent image and run tests in a real container. There's no Docker here, so I couldn't run them; the next CI run on this PR will cover them. No previews, since nothing visible changed. Review digestRisk-tiered paths
Diff size: 2 files changed, +2/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed the build error that broke the Restricted network container smoke check; I haven't run the check itself.
**Cause:** The merge from the epic branch (`bdab602a4`) made `configEnv` a required field on `PiDockerInvocation`. The Pi health check builder added on this PR, `buildPiAuthCheckDockerArgs`, still returned only `{ args, secretEnv }`. That made the core package fail to build in the workflow's `npm run test:prepare` step, which is the exit code 2 in the log.
**Fix:**
- `packages/core/src/agents/impl/utils/piAuthCheck.ts`: the health check now returns `configEnv: {}`. It has no non-secret config to pass, so nothing changes at runtime.
- `test/piAuthCheck.test.ts`: added `configEnv: {}` to the test's hand-written invocation so it matches the type.
**Verification:**
- `tsc --noEmit` on `packages/core` is clean.
- `npm run test:prepare`, the step that failed in CI, now builds every package.
- `test/piAuthCheck.test.ts` passes (6 of 6). It needs `PROPR_DEMO_MODE=1`; without it the file reports one failure and stops.
The later steps of that check build the agent image and run tests in a real container. There's no Docker here, so I couldn't run them; the next CI run on this PR will cover them.
No previews, since nothing visible changed.
PR: #3857
Comment by: @propr-dev[bot] (ID: 7227137481)
Model: Claude Opus 5.5
ProPR-Agent: claude/claude-opus-5-5
|
CI failed: Full Test Suite Shard 3/4 Please investigate and fix this CI failure.
Failure evidence
|
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR integrates Pi across login, settings, health checks, setup, and diagnostics with substantial targeted coverage. It needs minor changes before merge. The supplied current-head status also reports one failed test shard and three pending checks; the failure cannot be attributed to changed code from the supplied evidence. ✅ Persistent managed login — The new entrypoint mode writes directly to the mounted credential directory, avoiding refresh-only write-back that would discard a new login. ✅ Credential-check isolation — Health checks mount credentials read-only, disable networking, and forward configured secrets through environment variables rather than command arguments. This was a static review of the supplied code; no commands or tests were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Use display names in model previews
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Verify MCP update and removalThe new fallback in S2: 🟢 Exercise real container lifecycleThe added tests verify command construction and simulated entrypoint behavior, but the implementation summary identifies real container login and health checks as untested. A container smoke test covering login persistence followed by a read-only credential check would strengthen confidence in permissions and entrypoint integration. This is additional validation, not a demonstrated runtime defect. ScoreThe implementation has useful isolation measures and targeted tests, but an explicit UI rule violation remains. The current failed test shard also prevents declaring the PR merge-ready. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
|
|
✅ Applied the requested follow-up changes in commit a2992c6 Summary of ChangesI fixed the Shard 3/4 failure. The cause was a bug in this PR, not a flaky test. Cause: the one failing test was Fix: the new agent's path is now only worked out when an agent is created, which is the only case that needs it. Creating an agent still uses each type's default path, as the PR intended. Verification:
I didn't rerun the whole shard. This change has nothing visual, so there are no previews. Review digestRisk-tiered paths
Diff size: 1 file changed, +3/−2 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
/fix F1 |
I fixed the Shard 3/4 failure. The cause was a bug in this PR, not a flaky test. **Cause:** the one failing test was `packages/api/test/mcpReviewerConcurrency.test.ts`. In `packages/api/mcp/toolsConfiguration.ts`, this PR changed the fallback config path for new agents from `'~/.vibe'` to the agent type's own default. But that path is worked out for create, update and remove alike, and only create passes a `type`. So every `update_agent_configuration` and `remove_agent_configuration` call now threw `TypeError: Cannot read properties of undefined (reading 'configPath')`. The MCP layer turned that into an `OUTCOME_UNKNOWN` 500, which is the `'unknown'` the test got instead of `'completed'`. I reproduced this locally and got the stack trace by temporarily logging the error, then removed the logging. **Fix:** the new agent's path is now only worked out when an agent is created, which is the only case that needs it. Creating an agent still uses each type's default path, as the PR intended. **Verification:** - `mcpReviewerConcurrency.test.ts` failed locally the same way as CI before the fix and passes after it. - `mcpToolInputBudget`, `settingsCatalog` and `mcpIntegration` pass (14/14). - Lint with zero warnings and the `packages/api` typecheck are both clean. I didn't rerun the whole shard. This change has nothing visual, so there are no previews. PR: #3857 Comment by: @propr-dev[bot] (ID: 7227524858) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
✅ Applied the requested follow-up changes in commit 2b53192
Summary of ChangesI've fixed F1: the hint under "Add a Pi model" no longer shows the raw model ID. Instead of
Not changed, outside F1:
I've attached a screenshot of the add-agent dialog showing the new hint. Review digestRisk-tiered paths
Diff size: 3 files changed, +28/−4 lines Visual previewAdd a Pi model: display-name previewThe hint under the Pi provider/model control now names the model by its display name and provider label (Adds Qwen3 Coder via OpenRouter.) instead of a raw pi --model command 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I've fixed F1: the hint under "Add a Pi model" no longer shows the raw model ID. Instead of `Runs as pi --model openrouter/qwen/qwen3-coder` it now reads **"Adds Qwen3 Coder via OpenRouter."** The Pi settings tests pass (6 of 6), and typecheck and lint are clean for the UI. - **New helper:** `describePiModel` in `propr-ui/src/pages/SettingsPage/piAgentFieldsUtils.ts` turns a `pi-<provider>/<model>` ID into that text. The model name comes from the shared `getModelDisplayName` helper, which uses the catalog name or makes a readable name from an unknown ID. The provider name comes from the Pi provider list, and an unknown provider is made readable the same way. - **The hint itself** (`PiAgentFields.tsx`): before anything valid is typed, it says "Enter the model id as Pi names it for this provider." The duplicate warning is unchanged. Raw IDs are still used for the input value, the saved model list and the API payload. - **Tests** (`PiAgentConfig.test.tsx`): a unit test covers a catalog model (`Claude Sonnet 5.5 via Anthropic`), a model and a provider that aren't in any list, and an OpenRouter model. The add-agent dialog test now checks that the new hint appears and that no raw ID shows as text. - **Other places checked:** none of the other PR-changed UI files (`AgentConfigModal`, `PiLoginOptionsDialog`, `AgentLoginModal`, `AgentCredentialSetup`) show a model ID in visible text. **Not changed, outside F1:** - The model-ID box still has the placeholder `e.g. qwen/qwen3-coder`. I left it because it's an example of what to type into the box. - The login modal shows the raw provider ID, e.g. `anthropic · Credentials are saved to…`. That's a provider rather than a model, so it isn't covered by this finding. I've attached a screenshot of the add-agent dialog showing the new hint. PR: #3857 Comment by: @integry (ID: 7227576335) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR substantially integrates Pi into settings, managed login, health checks, setup, and diagnostics. The changes are coherent and appear merge-ready within the supplied scope, conditional on the seven pending checks completing successfully. This review is static; no commands were run. ✅ Direct credential persistence — Login mode uses the mounted credential directory directly, correctly avoiding refresh-only write-back logic that would discard a new login. ✅ Provider-aware authentication — Shared command construction validates provider identifiers, and the API and UI carry provider and login-method choices through to container creation. ✅ Isolated credential checks — Health checks disable networking, mount credentials read-only, and pass configured secrets through the Docker client environment instead of argument values. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Clarify CLI login destinations
S4: 🟢 Verify custom-provider secret redactionThe new diagnostics classification explicitly recognizes that Pi’s S5: 🟢 Exercise the real container boundaryThe added tests cover command construction, fake-process execution, and recorded authentication output well. A container smoke test would additionally verify managed-directory ownership, login persistence, and read-only health checks against the pinned Pi binary. This is optional additional integration coverage; the supplied current-head status reports no failed checks. ScoreThe implementation covers the intended surfaces with focused tests and no verified merge blocker. Seven checks remain pending; runtime container behavior was not independently exercised in this review. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |

AI Implementation Summary
Closes #3835
Branch:
3835/claude-opus-5-5-pi-settings-ui-cli-setup--20261127-1852-k75Commits: ✅ Changes committed (7a6bfe7)
AI Processing Completed
Execution Details:
Summary:
Pi can now be configured and run everywhere the other agents are: the settings UI, managed login, the CLI and setup, health check, diagnostics, MCP settings and docs. Typecheck and lint are clean for every package I touched, and the affected test suites pass. There's no Docker here, so I haven't done a real containerised login or health check. Instead I installed Pi 1.6.1 locally and ran
pi auth checkandpi auth loginagainst it to confirm the output, exit codes and prompts the code relies on.Managed login
pi auth login <provider> --no-browser, or--api-keyto save a key. I tested sign-in on Anthropic (paste a code), OpenRouter (paste the redirect URL) and the ChatGPT subscription (device code);--api-keysaved a key toauth.json.pi-entrypoint.shhas a login mode that points Pi straight at the mounted dir (~/.propr/agent-credentials/<id>/.pi/agent). It skips the per-run copy because the write-back after a run only saves refreshed tokens, never a new login.Health check
pi auth check --provider <p> --json --no-refreshinstead of running a prompt. The provider comes from the health-check model.readyshows as ready.not_readyandinvalidshow as sign-in required, with Pi's reason. An unknown provider is reported as a configuration problem rather than a login prompt.Settings UI
~/.pi/agent), or use API keys. The API-key choice shows one key field per provider used by the selected models.pi-<provider>/<model>. Pi gets a π logo. The CLI version controls already worked for Pi.CLI and setup
propr agent login <pi-agent>accepts--providerand--api-key.propr checkandpropr init, the agent skill (installed to~/.pi/agent/skills/propr), both launcher copies (HOST_PI_DIR→PI_CONFIG_PATH),docker-compose.yml, the local-setup engine and the desktop setup schema.Diagnostics and MCP
auth.jsonare now redacted.PI_CONFIG_PATH,PI_TIMEOUT_MSandHOST_PI_DIR. Creating an agent through the MCP tools now uses each type's own default config path; before, it fell back to~/.vibefor every type without managed login.Docs:
agent-runtime.mdhas a Pi section covering the image, entrypoint, credential mount, disposable agent dir, refresh write-back rules, managed login and health check. The setup guides, configuration reference,.env.exampleand CHANGELOG are updated.settings-locations.mdis generated from the settings catalog, so I regenerated it rather than editing it.Tests: new tests cover the login descriptor and routes, the entrypoint's login mode, health-check parsing (using recorded Pi 1.6.1 output), redaction, CLI validation and login, the launcher, and the UI dialogs (463 settings UI tests pass).
test/agentRegistryManagedAgentPin.test.tsonly passes when run with--experimental-test-module-mocks.Gaps:
propr checkstill sends a short prompt to validate Pi rather than usingpi auth check.HOST_PI_DIRisn't detected as having Pi, so you need--agents pi.anthropic; usepropr agent login --providerfor anything else.SKILL.mditself is unchanged; the skill installer knows about Pi.Four UI previews are attached: the Pi agent dialog with API keys, the same dialog with managed login, the provider picker, and an agent card showing a
not_readyhealth result.Review digest
Risk-tiered paths
packages/api/routes/agentLoginRoutes.ts(+14/−1): auth-looking pathpackages/api/services/agentLoginSessionManager.ts(+43/−5): auth-looking pathpackages/core/src/agents/impl/utils/piAuthCheck.ts(added, +107/−0): auth-looking pathpackages/core/src/diagnostics/credentialRedaction.ts(+2/−0): auth-looking pathpackages/shared/src/agentLogin.ts(+70/−0): auth-looking pathpropr-ui/src/api/agentLoginApi.ts(+17/−2): auth-looking pathpropr-ui/src/pages/SettingsPage/AgentCredentialSetup.tsx(+13/−7): auth-looking pathpropr-ui/src/pages/SettingsPage/AgentLoginModal.tsx(+39/−3): auth-looking pathpropr-ui/src/pages/SettingsPage/PiLoginOptionsDialog.tsx(added, +164/−0): auth-looking pathpropr-ui/src/pages/SettingsPage/agentCredentialSetupUtils.ts(+21/−1): auth-looking path.env.example(+12/−0)apps/desktop/src/setup-schema.ts(+1/−1)docker-compose.yml(+16/−1)docker/launcher/orchestrator.mjs(+15/−0)packages/api/mcp/settingsCatalog.ts(+3/−2)packages/api/mcp/toolsConfiguration.ts(+1/−1)packages/api/services/agentHealthCheck.ts(+14/−2)packages/cli/src/agentSkill.ts(+7/−2)packages/cli/src/commands/agentCommands.ts(+17/−3)packages/cli/src/commands/agentSkillCommands.ts(+1/−0)packages/cli/src/commands/agentValidation.ts(+59/−3)packages/cli/src/commands/checkCommands.ts(+1/−0)packages/cli/src/commands/initCommands.ts(+1/−1)packages/cli/src/commands/initStack.ts(+2/−1)packages/cli/src/orchestrator/types.ts(+4/−1)packages/core/src/agents/impl/PiAgent.ts(+16/−1)packages/core/src/agents/types.ts(+20/−0)packages/core/src/diagnostics/nativeLogAdmission.ts(+3/−1)packages/core/src/diagnostics/nativeLogPolicy.ts(+1/−1)packages/core/src/diagnostics/providerCollector.ts(+8/−3)packages/core/src/diagnostics/providerRoots.ts(+2/−2)packages/core/src/index.ts(+2/−0)packages/local-setup/src/engine.ts(+1/−0)packages/shared/src/index.ts(+11/−0)packages/shared/src/piProviders.ts(added, +39/−0)propr-ui/src/components/ui/ProviderLogo.tsx(+11/−0)propr-ui/src/pages/SettingsPage/AgentConfigModal.tsx(+25/−4)propr-ui/src/pages/SettingsPage/PiAgentFields.tsx(added, +135/−0)propr-ui/src/pages/SettingsPage/piAgentFieldsUtils.ts(added, +32/−0)scripts/pi-entrypoint.sh(+39/−0)src/daemon/managedDiagnostics.ts(+3/−3)CHANGELOG.md(+14/−0)apps/desktop/src/setup-schema.test.ts(+6/−0)docs/docs/architecture/agent-runtime.md(+41/−4)docs/docs/features/agents-and-models.md(+9/−1)docs/docs/features/propr-cli.md(+3/−3)docs/docs/operations/configuration-reference.md(+4/−1)docs/docs/operations/deployment.md(+2/−2)docs/docs/operations/settings-locations.md(+3/−2)docs/docs/tutorials/setup-local.md(+5/−1)Diff size: 72 files changed, +1,657/−81 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3835.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
Add Pi agent: API keys
Agent dialog with Pi selected, the three credential choices, per-provider API key fields (the value shown is a placeholder) and the Add a Pi model provider/model control
Full-size original
Add Pi agent: managed login
The same dialog with the ProPR-managed login credential choice and its isolated credential path
Full-size original
Pi agent card with health result
Pi logo on the agent card and a not_ready result from pi auth check, with the Log in action
Full-size original
Pi login: provider and method
Before the login container starts, Pi asks which provider to sign in to and whether to sign in with an account or save an API key
Full-size original