Skip to content

Doctor: add "Fix" button per item for Claude Code-automatable issues #284

@yustme

Description

@yustme

Problem

The Doctor page shows individual check results (pass / warn / fail) but offers no action path — the user has to read the description, figure out the fix themselves, and run it manually.

For warnings/failures that have a well-known, mechanical fix (e.g. install a plugin, set an env var, run a single CLI command), this is unnecessary friction. Claude Code is already available in the environment and can execute these fixes automatically.

Proposed solution

Add a contextual Fix button next to each Doctor item that has a known remediation. When clicked:

  1. The button triggers the fix action inline — either directly via the API/CLI (for simple ops like setting an env var or running a kbagent command), or by spawning a Claude Code session with the exact fix prompt pre-filled.
  2. After the fix runs, re-run the affected check and update its status live.

Concrete examples from today's warnings

Check Current message Fix action
Claude Code plugin "kbagent Claude Code plugin not installed. Run: /plugin marketplace add padak/keboola_agent_cli …" Button opens Claude Code (or calls the API) and runs the two /plugin commands automatically
Conversation ID KBAGENT_CONVERSATION_ID not set. API requests will not include X-Conversation-ID header. Button sets the env var in the local config / shell profile and re-checks

Why Claude Code specifically

Claude Code already has the context of the project and the kbagent CLI installed. Fixes like "install this plugin" or "run this command" are exactly the kind of one-shot automation it handles well. The Doctor page knows what is wrong and what command fixes it — it's a natural fit to hand that off to an AI agent rather than making the user copy-paste from a warning message.

Scope

Not every check needs a Fix button — only those where the remediation is deterministic and safe (no destructive side effects). Checks that are informational or require human judgment (e.g. "project token may be expiring soon") can stay as-is.

UX sketch

⚠ Claude Code plugin
  kbagent Claude Code plugin not installed.
  [Fix →]   ← small button, right-aligned or inline after the description

Clicking "Fix →" either:

  • Runs the fix immediately and shows a spinner → green checkmark on success, or
  • Opens a pre-filled Claude Code prompt with the exact command so the user can review before confirming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions