Skip to content

feat(ai-agent): add local run button#3690

Merged
michaeljguarino merged 1 commit into
masterfrom
sebastian/prod-4883-add-buttondialog-to-console-ui-to-show-run-locally-command
Jun 9, 2026
Merged

feat(ai-agent): add local run button#3690
michaeljguarino merged 1 commit into
masterfrom
sebastian/prod-4883-add-buttondialog-to-console-ui-to-show-run-locally-command

Conversation

@floreks

@floreks floreks commented Jun 9, 2026

Copy link
Copy Markdown
Member
  • Add upload field in agent.graphql to support local session resumption
  • Introduce AIAgentRunLocalButton component for running agent sessions locally
  • Integrate AIAgentRunLocalButton into AIAgentRun for local session handling

Blocked by pluralsh/plural-cli#760

localhost_3000_ai_agent-runs_30108e44-8853-422c-8b1b-2c190b9c3938

Test Plan

Test environment: https://console.plrl-dev-aws.onplural.sh/

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

- Add `upload` field in `agent.graphql` to support local session resumption
- Introduce `AIAgentRunLocalButton` component for running agent sessions locally
- Integrate `AIAgentRunLocalButton` into `AIAgentRun` for local session handling
@floreks floreks self-assigned this Jun 9, 2026
@floreks floreks added the enhancement New feature or request label Jun 9, 2026
@linear

linear Bot commented Jun 9, 2026

Copy link
Copy Markdown

PROD-4883

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a "Run locally" button to the AI agent run detail page, allowing users to resume an agent session from their local terminal using the Plural CLI. The button is gated on run?.upload?.session and opens a modal with copy-paste instructions.

  • Extends the AgentRunTiny GraphQL fragment with upload { id session } so the session URL is available in all queries and subscriptions that use it.
  • Introduces AIAgentRunLocalButton, a display-only component that renders a two-step modal (cd /path/to/repositoryplural agents resume <runId>) and formats the repository as a link when it starts with http, otherwise as inline code.

Confidence Score: 5/5

Changes are additive and display-only — no mutations, no data model changes on the frontend side, and the button only appears when the server-provided session URL is present.

The new component is a modal with static instructional text and a formatted command string derived from an already-fetched runId. The GraphQL fragment change is additive and the generated files are consistent with it. No existing behaviour is altered.

No files require special attention.

Important Files Changed

Filename Overview
assets/src/components/ai/agent-runs/details/AIAgentRunLocalButton.tsx New component: renders a 'Run locally' button that opens a modal with step-by-step instructions for resuming the agent session via plural agents resume <runId>; straightforward display-only component with no side effects
assets/src/components/ai/agent-runs/details/AIAgentRun.tsx Integrates AIAgentRunLocalButton into the run detail header; button conditionally rendered when run?.upload?.session is truthy
assets/src/graph/ai/agent.graphql Adds upload { id session } to the AgentRunTiny fragment, making the session URL available wherever that fragment is used (queries and subscriptions)
assets/src/generated/graphql.ts Auto-generated GraphQL types and operations updated to include the AgentRunUpload type and upload field on AgentRunTinyFragment
assets/src/generated/persisted-queries/client.json Auto-generated persisted query hashes updated to reflect the new GraphQL fragment shape

Reviews (1): Last reviewed commit: "feat(ai-agent): add local run button" | Re-trigger Greptile

@michaeljguarino michaeljguarino merged commit 27d86f5 into master Jun 9, 2026
15 checks passed
@michaeljguarino michaeljguarino deleted the sebastian/prod-4883-add-buttondialog-to-console-ui-to-show-run-locally-command branch June 9, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants