Plan Timeline
The plan timeline renders log entries as a flat chronological list grouped by execution run. It serves as the secondary view (behind the campaign graph) on the plan details page, useful for auditing every action the executor took.
Execution Run Grouping
Section titled “Execution Run Grouping”Log entries are grouped into collapsible sections by execution run. Each group is bounded by ExecutionStarted / ExecutionEnded system events.
struct ExecutionGroup { timestamp: String, // From ExecutionEnded, or first entry entries: Vec<PlanLogDisplay>, // Visible entries (ExecutionStarted excluded)}The group_by_execution() function walks entries chronologically, splitting on ExecutionEnded markers. If entries exist without a closing marker, they form a “currently running” group.
Collapse Behavior
Section titled “Collapse Behavior”- The most recent group opens by default.
- All older groups start collapsed.
- State is tracked in a
HashSet<usize>of open group indices. - Each group header shows a timestamp badge and entry count.
Pending vs. Completed Split
Section titled “Pending vs. Completed Split”The timeline separates entries into two sections:
| Section | Position | Content |
|---|---|---|
| Pending | Top | Tool calls awaiting approval or user answers |
| History | Below | Completed entries grouped by execution run |
Pending entries render with approve/reject buttons (or an answer form for AskUser calls). Once resolved, they move into the history section on the next data refresh.
Markdown Rendering
Section titled “Markdown Rendering”All text content renders through the Markdown component (powered by pulldown-cmark with tables, strikethrough, and tasklists enabled):
| Content | Where |
|---|---|
| Email body | SendEmail tool call card |
| SMS body | SendSms tool call card |
| Note content | WriteInteractionNote, UpdateSystemNote cards |
| Questions | AskUser card |
| Plan description | Details header |
| Completion summary | CompletePlan card |
| Failure reason | FailPlan card |
| Model reasoning | CollapsibleReasoning component |
Collapsible Sub-Components
Section titled “Collapsible Sub-Components”Three components handle expandable data retrieved by the executor:
CollapsibleReasoning
Section titled “CollapsibleReasoning”Wraps ModelReasoning system entries. Shows a “Reasoning” header with a brain icon — click to expand the AI’s internal reasoning text.
ExpandableNotes
Section titled “ExpandableNotes”Renders notes retrieved by GetContactNotes. Shows a “N note(s) retrieved” toggle. Each note displays its timestamp, a “System” badge if applicable, and markdown content.
ExpandableMessages
Section titled “ExpandableMessages”Renders messages retrieved by GetConversationHistory. Shows a “N message(s) retrieved” toggle. Inbound messages use bg-muted/30, outbound use bg-primary/10. Each shows direction, channel badge, timestamp, and body.
Tool Call Cards
Section titled “Tool Call Cards”Each tool call renders inside a Card with:
- Header — icon + tool name + status badge (Pending, Approved, Rejected, Expired, Failed)
- Structured detail — fields specific to the tool type
- Action controls — approve/reject buttons or answer form for pending entries
Tool Types and Icons
Section titled “Tool Types and Icons”| Tool | Icon | Key Fields |
|---|---|---|
| Send Email | Mail | To, Subject, Body (markdown), Scheduled/Expires |
| Send SMS | MessageSquare | To, Body (markdown), Scheduled/Expires |
| List Contacts | Users | Contact name badges |
| Get Contact Details | User | Name, Email, Phone |
| Get Contact Notes | FileText | Expandable notes list |
| Conversation History | MessagesSquare | Expandable messages list |
| Write Note | PenLine | Markdown content |
| Update System Note | Settings | Markdown content |
| Question | MessageCircleQuestionMark | Question text, option badges, answer |
| Plan Completed | CircleCheck | Summary (markdown) |
| Plan Failed | CircleX | Reason (markdown) |
| Scheduled | Clock | Delay minutes, reason, scheduled time |
AskUser Interaction
Section titled “AskUser Interaction”When the executor asks a question, the timeline shows:
- The question rendered as markdown
- If options exist — clickable badges that submit the answer on click
- If
allow_free_text— a text input with submit button - After answered — the selected option highlighted in primary color, others dimmed
Key Files
Section titled “Key Files”| File | Purpose |
|---|---|
src/mods/plan/components/plan_timeline_component.rs | Timeline component, grouping logic, all sub-components |
src/mods/plan/views/plan_details_view.rs | Parent view with tab switcher (Graph / Timeline) |
src/mods/plan/types/plan_log_entry_type.rs | PlanLogEntry, PlanLogEntryToolCall, PlanLogEntrySystem enums |