Skip to content

Show terminal-clickable changed files above TUI Current Activity #66

@roackb2

Description

@roackb2

Problem

When Heddle edits files in TUI chat, the user currently has to scroll upward through the conversation to find edit previews and understand what changed. The terminal-rendered diff preview is useful for quick confirmation, but it is not ideal for real code review.

Often the user wants to inspect the changed files in a mature IDE/editor. Today that means manually finding the path in the terminal, copying it, and opening it elsewhere.

The screenshot shows an edit preview for:

src/__tests__/integration/tools/tools.test.ts

followed by Recent activity / Current Activity. The changed file path is visible in the older conversation output, but there is no stable, compact changed-files section near the live activity area.

Desired behavior

Add a TUI section above Recent activity / Current Activity that summarizes files changed during the current run/session context.

Example shape:

Changed files
  modified  src/__tests__/integration/tools/tools.test.ts
  modified  src/core/tools/toolkits/coding-files/search-files.ts

The paths should be rendered in a terminal-friendly way so recent terminals can recognize them as clickable file paths. Clicking should open the file in the user's default editor/IDE where supported by the terminal environment.

The goal is likely just to show correct workspace-relative or absolute paths in the right format, not to implement custom click handling.

Placement and UX constraints

  • The changed-files section should appear above Recent activity / Current Activity.
  • It should be separate from recent activity so large file-change lists do not obscure what Heddle is currently doing.
  • It should stay compact by default.
  • It should not make live progress harder to see.
  • It should handle large edit sessions gracefully, for example by showing the first N files plus a +M more line, grouping by status, or otherwise capping vertical height.
  • It should update as Heddle makes changes during a run.

Likely implementation area

Relevant existing pieces:

  • TUI panels:
    • src/cli/chat/components/ActivityPanel.tsx
    • src/cli/chat/components/ConversationPanel.tsx
    • src/cli/chat/App.tsx
  • Edit preview history formatting:
    • src/cli/chat/utils/format.ts
    • formatEditPreviewHistoryMessage(...)
  • Existing workspace diff/review machinery already used by the control plane:
    • src/server/features/control-plane/services/workspace-diff.ts
    • workspaceChanges / workspaceFileDiff routes
    • web review surfaces that show Current workspace changes
  • Mutation/diff tracking areas:
    • src/core/agent/mutation-tracking.ts
    • edit-file preview/result metadata from coding file tools

The implementation should prefer reusing existing changed-file detection or diff tracking rather than inventing a second unrelated source of truth.

Acceptance criteria

  • While a TUI chat run is editing files, a Changed files section appears above Current Activity.
  • The section lists changed file paths with enough status/action context to be useful, such as modified/created/deleted/renamed when available.
  • File paths are rendered in a terminal-clickable-friendly format. Prefer workspace-relative paths if those are reliably clickable from the current working directory; use absolute paths if needed for broad terminal/editor support.
  • The section updates as additional files are changed during the run.
  • Large changed-file lists are capped or summarized so Current Activity remains visible.
  • The feature reuses existing diff/change tracking where practical.
  • Tests cover changed-file collection/projection and compact rendering behavior.

UX rationale

Heddle already has mechanisms to track diffs and changed files. Surfacing a compact changed-file list in the TUI gives users a quick bridge from agent activity to real code review in their editor, without forcing them to scroll through terminal diff output or copy paths by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions