Skip to content

Operator-readable diagnosis modal (S5) #386

Closed

Description

@vybe

Summary

Replace raw git error output in conflict modal with human-readable diagnosis.

Context

Problem P4: The modal shows raw git output like:
```
Rebasing (1/2) error: could not apply 1d945e0... Add polymarket trader configuration
```

A non-developer cannot understand this. The buttons ("Pull First" / "Force Push") don't map to operator intent.

Acceptance Criteria

Backend: Conflict classification

  • New utility to classify conflicts into enum:
    • AHEAD_ONLY — simple push needed
    • BEHIND_ONLY — simple pull needed
    • PARALLEL_HISTORY — diverged commits (P2)
    • UNCOMMITTED_LOCAL — local changes blocking operation
    • AUTH_FAILURE — credentials issue
    • WORKING_BRANCH_EXTERNAL_WRITE — P6 case (external rewrite)
    • UNKNOWN — fallback

Frontend: Modal redesign

  • Title: Plain English. "Your agent cannot sync." not "Push Conflict"
  • Body: Bullet list of what's true:
    • "Main has N new commits your agent doesn't have"
    • "Your agent has M local commits main doesn't have"
    • "The histories diverged N commits ago"
  • Recommendation: One sentence naming recommended action
  • Expandable: "Git details" section for devs (raw stderr)

Per-class copy

  • PARALLEL_HISTORY → "Adopt latest upstream" recommendation
  • BEHIND_ONLY → "Pull latest" recommendation
  • WORKING_BRANCH_EXTERNAL_WRITE → "Your branch was modified externally"
  • UNKNOWN → "Contact admin — unknown state"

Technical Notes

Files to modify:

  • src/backend/services/git_service.py — classification utility
  • docker/base-image/agent_server/routers/git.py — include classification in 409 response
  • src/frontend/src/components/GitConflictModal.vue — modal redesign

Part of Epic #381

Activity

  1. added
    priority-p2
    type-feature
    on Apr 18, 2026
  2. added
    complexity-low
    theme-reliability
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p2theme-reliabilitytype-feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions