Skip to content

Fix percent-encoded file paths in tool args, add date fallback for filenames#16

Merged
curtisalexander merged 4 commits intomainfrom
claude/fix-file-paths-dates-tSnHZ
Feb 24, 2026
Merged

Fix percent-encoded file paths in tool args, add date fallback for filenames#16
curtisalexander merged 4 commits intomainfrom
claude/fix-file-paths-dates-tSnHZ

Conversation

@curtisalexander
Copy link
Owner

  • Decode percent-encoded strings (e.g. %3A → :) in tool argument
    values before rendering. This fixes file paths like C%3A\Users...
    showing encoded colons in Edit, Read, and multi-key tool arg displays.
  • Fall back to file modification date when session.date_created is None,
    so output filenames still get YYYY-MM-DD prefixes matching the HTML header.
  • Add test for percent-decode behavior in render_tool_args.

https://claude.ai/code/session_01UJUBqBwFHqndJeTQJY25sd

…lenames

- Decode percent-encoded strings (e.g. %3A → :) in tool argument
  values before rendering. This fixes file paths like C%3A\Users\...
  showing encoded colons in Edit, Read, and multi-key tool arg displays.
- Fall back to file modification date when session.date_created is None,
  so output filenames still get YYYY-MM-DD prefixes matching the HTML header.
- Add test for percent-decode behavior in render_tool_args.

https://claude.ai/code/session_01UJUBqBwFHqndJeTQJY25sd
The initial fix decoded ALL string values in tool args, which could
corrupt non-path content (e.g. regex patterns containing %3A). Now:

- Only keys identified as paths (file_path, path, directory, etc.) get
  decoded via the new is_path_key() check.
- New decode_path() helper strips file:/// URI prefixes before decoding,
  handling both Unix (/home/user) and Windows (C:/Users) paths.
- Workspace directory also uses decode_path() for consistency.
- Added tests for is_path_key, decode_path, file URI stripping, and
  verifying non-path keys are left untouched.

https://claude.ai/code/session_01UJUBqBwFHqndJeTQJY25sd
List all four files that must be updated when bumping versions,
and fix stale v0.4.0 example URL.

https://claude.ai/code/session_01UJUBqBwFHqndJeTQJY25sd
@curtisalexander curtisalexander merged commit b91ac82 into main Feb 24, 2026
3 checks passed
@curtisalexander curtisalexander deleted the claude/fix-file-paths-dates-tSnHZ branch February 24, 2026 21:39
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.

2 participants