Skip to content

feat(tui): show recent activity in inspector panel - #211

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/tui-inspector-recent-activity
Aug 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/tui-inspector-recent-activity

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

  • Added a "RECENT ACTIVITY" section to the INSPECTOR panel's Task tab, below the existing key/value block, sourced from self.activity (ActivityFeed) — the same feed already backing the bottom panel's Activity tab and the Runtime tab's "Recent" list, so no second event-tracking mechanism was introduced.
  • Each entry gets a colored status dot via a new status_glyph::status_dot() compact variant (●, colored via theme::ok/warn/danger/info), reusing the existing status_glyph module rather than duplicating status→color logic. Added Status::Info and impl From<FeedbackSeverity> for Status so ActivityItem::severity maps straight onto it.
  • Up to 8 entries shown, most recent first, truncated with an ellipsis (not wrapped) to the actual inspector panel width passed in at render time (inner.width, threaded through SidebarWidget::lines).
  • SidebarModel.activity changed from Vec<String> to Vec<SidebarActivityEntry> (summary + status) so the color survives from ActivityFeed through to render; updated the one production call site (app/render.rs) and the Runtime tab's existing "Recent" list to match.
  • Aligned the Task tab's key/value rows (Objective, Stage, Changes, Validation, Elapsed, Repository) into a fixed-width key column (kv_aligned, TASK_KEY_WIDTH) so values line up vertically — previously each row's value started wherever its label happened to end.
  • Verified against layout::MIN_HEIGHT (18): the panel's existing lines.truncate(height) already guards against overflow, favoring the key/value block over the newer activity list when height is tight; added a test rendering at a constrained height to confirm no panic and that core content survives.

Test plan

  • cargo fmt --all -- --check
  • cargo test --package forge-tui --lib (707 passed), including new tests: status_dot_uses_plain_semantic_colors, feedback_severity_maps_to_status, task_lines_show_recent_activity_most_recent_first_with_dots_and_ellipsis, task_lines_cap_recent_activity_at_eight_entries, task_key_value_rows_align_values_in_a_fixed_column, task_view_truncates_gracefully_at_minimum_supported_height.
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant