Skip to content

Feature: Plan indicator and preview pane for Copilot session plans #21

@wbreza

Description

@wbreza

Summary

Add the ability to see at a glance which sessions have a Copilot-generated plan (plan.md), and view the rendered plan content in the session detail pane.

Motivation

When working with Copilot CLI, agents frequently generate plan.md files in ~/.copilot/session-state/{session-id}/. Currently there's no way to discover or view these plans from within dispatch. Users must manually navigate to the session directory to read them. Surfacing plans directly in dispatch would make it easy to review, compare, and resume planned work.

Proposed UX

1. Cyan Plan Indicator Dot

Add a new cyan circle indicator (●) to sessions that have a plan.md file. This sits alongside the existing attention status dots:

Indicator Color Meaning
Primary (#7C6FF4) Needs input
Green (#4ADE80) AI working
Gold (#C19C00) Running, quiet
Dimmed (#71717A) Not running
Orange (#F97316) Interrupted
Cyan (new) Has plan

2. Right-Click Context Menu: "View Plan"

Add a right-click context menu to sessions. When a session has a plan.md, include a "View Plan" option. (Right-click currently does nothing — handleMouse returns nil for right-clicks.)

3. Plan Preview in Detail Pane

When "View Plan" is selected (or via another trigger), switch the session detail PreviewPanel to a plan preview mode that renders the plan.md content as formatted markdown.

  • Use Glamour or similar for markdown rendering
  • Support scrolling for long plans
  • Provide a way to switch back to the normal session detail view

Technical Notes

  • Plan location: ~/.copilot/session-state/{session-id}/plan.md
  • Existing event: session.plan_changed event type already exists in �ttention.go:208 — could be leveraged to detect plan creation/updates
  • Indicator pattern: Follow the existing �ttentionDotStyle() dynamic lookup pattern (never capture lipgloss.Style in package-level vars — they go stale after SetTheme())
  • Right-click: model.go:1289-1454 — handleMouse() currently ignores right-clicks; this would be the first context menu in the app
  • Preview pane: components/preview.go — the PreviewPanel would need a new rendering mode or a sibling component for plan content

Acceptance Criteria

  • Cyan dot appears next to sessions that have a plan.md file
  • Right-click on a session with a plan shows a "View Plan" context menu option
  • Selecting "View Plan" renders the plan markdown in the detail pane
  • Plan view supports scrolling for long plans
  • User can return to normal session detail view
  • Indicator updates if plan is created/deleted while dispatch is running
  • All existing tests pass with no regressions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions