Skip to content

Dashboard: inline action results should auto-dismiss after a few seconds #64

@albertgwo

Description

@albertgwo

Description

After an inline action completes (e.g., pull, push), the success message persists permanently in the dashboard. The Sync section shows the result text (e.g., "✓ Fetched 1 commit(s) — Pulled — 1 plugin(s) installed, settings updated") indefinitely. If the user wants to repeat the same action, there is no way to re-trigger it because the result display has replaced the original action item.

Expected behavior

After an inline action completes:

  1. Show the success/error result for 3-5 seconds
  2. Auto-dismiss the result and revert to the original action state
  3. The user can then re-trigger the same action if needed

This matches the lazygit pattern from the design doc: actions execute inline, results display briefly, then the screen returns to its normal state so actions remain re-triggerable.

Current behavior

The result message replaces the action item permanently. The only way to clear it is to leave and re-enter the dashboard, which re-detects state.

Screenshot

The Sync section shows a persistent pull result instead of reverting to the "Pull and apply now" action:

Screenshot

✓ Fetched 1 commit(s) — Pulled — 1 plugin(s) installed, settings updated

Suggested approach

Use tea.Tick to schedule a delayed message (e.g., actionResultDismissMsg) after 3-5 seconds. When received, clear the result from the recommendation/action item and re-run buildRecommendations to restore the normal action state. This keeps the Bubble Tea message-driven pattern and avoids goroutine complexity.

// When storing a result, also start a dismiss timer:
case actionResultMsg:
    // ... store result ...
    return m, tea.Tick(4*time.Second, func(time.Time) tea.Msg {
        return actionResultDismissMsg{itemIndex: msg.itemIndex}
    })

case actionResultDismissMsg:
    // Clear result, rebuild recommendations
    delete(m.executionResults, msg.itemIndex)
    m.recommendations = buildRecommendations(m.state)

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