Skip to content

feat(proactive-agents): pear-side proactive-agent feature (manager + UI files)#10

Merged
khaliqgant merged 2 commits into
mainfrom
ricky/wave-pear-cloud-agents/03-proactive-agents
May 21, 2026
Merged

feat(proactive-agents): pear-side proactive-agent feature (manager + UI files)#10
khaliqgant merged 2 commits into
mainfrom
ricky/wave-pear-cloud-agents/03-proactive-agents

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Spec 03 main-process + renderer scaffolding. Builds on #7 (shared scaffold).

  • proactive-agent.ts + .bundle.ts + .types.ts: ProactiveAgentManager (list/create/update/deploy/pause/resume/undeploy + run-transcript), bundle stager, routes through resolveCloudAuth.
  • components/proactive/: ProactiveAgentsSection, ProactiveAgentCard, ProactiveAgentEditor.
  • hooks/use-proactive-agent.ts.

Known gap (UI is not wired yet): ProactiveAgentsSection is defined but never rendered; AppTabKind does not include 'proactive-agent-editor'; App.tsx does not render the editor; @monaco-editor/react is not in package.json. These + vendored runtime types + the cloud proactive-personas backend are tracked in slim spec specs/03-proactive-agents.md from #5.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

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

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 2cf02a5d-120e-487e-b076-eb1a34783aff

📥 Commits

Reviewing files that changed from the base of the PR and between d66ef8b and b71c8c1.

📒 Files selected for processing (7)
  • src/main/proactive-agent.bundle.ts
  • src/main/proactive-agent.ts
  • src/main/proactive-agent.types.ts
  • src/renderer/src/components/proactive/ProactiveAgentCard.tsx
  • src/renderer/src/components/proactive/ProactiveAgentEditor.tsx
  • src/renderer/src/components/proactive/ProactiveAgentsSection.tsx
  • src/renderer/src/hooks/use-proactive-agent.ts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment on lines +194 to +202
export function mapDeployStatus(result: DeployResultWithHostedStatus): ProactiveAgentDeployStatus {
const handleStatus = result.runHandle?.status
if (handleStatus === 'starting' || handleStatus === 'warming') return 'warming'
if (handleStatus === 'failed' || handleStatus === 'error') return 'error'
if (handleStatus === 'active') return 'active'

if (result.status === 'warming' || result.status === 'error') return result.status
return 'active'
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 mapDeployStatus maps cancelled run handle status to active instead of error

The CloudRunHandleStatus type explicitly includes 'cancelled' (proactive-agent.bundle.ts:84), but mapDeployStatus has no branch handling it. When handleStatus === 'cancelled', none of the three status checks match, so execution falls through to the default return 'active' at line 201. This means a cancelled deployment is reported as successfully active. The deployResultError function (proactive-agent.bundle.ts:204-211) independently may or may not find an error message, leading to either a silent false success or a contradictory { status: 'active', error: '...' } result returned to the caller at proactive-agent.ts:272-281.

Suggested change
export function mapDeployStatus(result: DeployResultWithHostedStatus): ProactiveAgentDeployStatus {
const handleStatus = result.runHandle?.status
if (handleStatus === 'starting' || handleStatus === 'warming') return 'warming'
if (handleStatus === 'failed' || handleStatus === 'error') return 'error'
if (handleStatus === 'active') return 'active'
if (result.status === 'warming' || result.status === 'error') return result.status
return 'active'
}
export function mapDeployStatus(result: DeployResultWithHostedStatus): ProactiveAgentDeployStatus {
const handleStatus = result.runHandle?.status
if (handleStatus === 'starting' || handleStatus === 'warming') return 'warming'
if (handleStatus === 'failed' || handleStatus === 'cancelled' || handleStatus === 'error') return 'error'
if (handleStatus === 'active') return 'active'
if (result.status === 'warming' || result.status === 'error') return result.status
return 'active'
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@khaliqgant khaliqgant changed the base branch from wave/pear-shared-scaffold to main May 21, 2026 14:08
khaliqgant and others added 2 commits May 21, 2026 16:09
…UI files)

Spec 03 main-process + renderer scaffolding:
- src/main/proactive-agent.ts + .bundle.ts + .types.ts: ProactiveAgentManager
  (list/create/update/deploy/pause/resume/undeploy + run-transcript), bundle
  stager for handler source, route through resolveCloudAuth.
- components/proactive/: ProactiveAgentsSection, ProactiveAgentCard,
  ProactiveAgentEditor.
- hooks/use-proactive-agent.ts.

Builds on shared scaffolding (#7). NOTE: the UI is not wired yet —
ProactiveAgentsSection is defined but never rendered, the AppTabKind union does
not include 'proactive-agent-editor', App.tsx does not render the editor, and
@monaco-editor/react is not in package.json. Those gaps, plus vendored runtime
types and the cloud proactive-personas backend (routes/schema/runtime), are
tracked in specs/03-proactive-agents.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CloudRunHandleStatus includes 'cancelled' but mapDeployStatus had no branch
for it, so a cancelled deployment fell through to the default 'active' and
was reported as a successful one (or produced a contradictory
{ status: 'active', error: '…' } pair).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@khaliqgant khaliqgant force-pushed the ricky/wave-pear-cloud-agents/03-proactive-agents branch from 0013d77 to b71c8c1 Compare May 21, 2026 14:09
@khaliqgant khaliqgant merged commit 85cb431 into main May 21, 2026
1 check passed
miyaontherelay added a commit that referenced this pull request Jun 8, 2026
Fix #11: WebGL doesn't repaint while the host is display:none. When the
visible effect runs after a hidden→visible transition, call the new
runtime.refreshOnShow() so the canvas redraws.

Fix #10: the runtime captures opts.getInputSrtt once at first acquire.
Rebind on each effect run via setInputSrttGetter so a remount with a
fresh inputSrttRef can't leave the predictor reading a stale ref.

Fix #14 (detach guard) was implemented inside the runtime in the prior
commit by tracking lastMountedContainer — no use-terminal change
needed.
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