Skip to content

Apply relativeToCwd to active tool shimmer label#61

Merged
mcintyre94 merged 2 commits intomainfrom
display-tool-call-summaries-with-working-directory-643a726f
Mar 11, 2026
Merged

Apply relativeToCwd to active tool shimmer label#61
mcintyre94 merged 2 commits intomainfrom
display-tool-call-summaries-with-working-directory-643a726f

Conversation

@mcintyre94
Copy link
Copy Markdown
Owner

Summary

  • The shimmer label shown while a bash tool is actively running was displaying full paths (e.g. Running find /home/sprite/project/src...) instead of the relative form (Running find ./src...) used everywhere else in the chat UI
  • Fixed by applying .relativeToCwd(workingDirectory) in activeToolLabel on ChatViewModel, consistent with ToolStepRow, the cancelled-tool inline label, and ToolInputDetailView
  • Added a test activeToolLabel_relativisesCwd to cover the new behaviour

Test plan

  • Existing activeToolLabel tests still pass
  • New activeToolLabel_relativisesCwd test passes
  • On device/simulator: trigger a bash tool (e.g. a find command referencing the project dir) and confirm the shimmer shows ./ instead of the full /home/sprite/project/ path

🤖 Generated with Claude Code

The shimmer label shown while a tool is actively running was displaying
full paths like "Running find /home/sprite/project/src..." instead of
the relative form "Running find ./src..." used everywhere else.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Mar 11, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

previewContent in ToolStepRow (the 2-line result snippet shown below the
label) was rendering raw paths from tool output. file_path inputs for
Read, Write and Edit in ToolInputDetailView were also showing full paths.
Apply relativeToCwd consistently in both places.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mcintyre94 mcintyre94 merged commit 5fcacdd into main Mar 11, 2026
2 checks passed
@mcintyre94 mcintyre94 deleted the display-tool-call-summaries-with-working-directory-643a726f branch March 11, 2026 23:24
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