Skip to content

fix(wiki): use as_posix() for Seeded path display (#643 follow-up)#719

Merged
memtomem merged 1 commit intomainfrom
fix/wiki-cmd-seeded-posix-display
May 2, 2026
Merged

fix(wiki): use as_posix() for Seeded path display (#643 follow-up)#719
memtomem merged 1 commit intomainfrom
fix/wiki-cmd-seeded-posix-display

Conversation

@memtomem
Copy link
Copy Markdown
Owner

@memtomem memtomem commented May 2, 2026

Summary

  • Cosmetic Windows UX fix flagged in PR test(windows): normalize path separators in 8 wiki override assertions (#643) #718's "out of scope" note. mm wiki {skill,agent,command} override printed two adjacent path lines with mixed separators on Windows:
    Seeded skills\hello\overrides\codex.md
    # next: cd C:\... && git add skills/hello/overrides/codex.md && git commit
    
  • The git add hint hardcodes / (line 75); the Seeded line interpolated a Path object so it picked up \ from os.sep on Windows. Both lines describe the same logical path on the same screen — the inconsistency was purely visual but confusing.
  • One-line fix: f"Seeded {rel.as_posix()}".

What's NOT changed

click.echo(str(result.path)) (line 72) and click.edit(filename=str(result.path)) (line 87) intentionally stay platform-native. Those lines hand the absolute path to shell-pipeline consumers and to $EDITOR respectively — Windows shells / CMD / PowerShell / notepad.exe prefer backslashes for absolute paths. Same trade-off PR #711 documented for norm_path().

Test plan

🤖 Generated with Claude Code

`mm wiki {skill,agent,command} override` printed two adjacent path lines
on Windows with mixed separators on the same screen:

    Seeded skills\hello\overrides\codex.md           # Path f-string → \
    # next: cd C:\... && git add skills/hello/overrides/codex.md && git commit
                                ^^^^ hardcoded /

The `git add` hint hardcodes `/` (and git accepts both on Windows), so
the inconsistency was purely cosmetic — but visually confusing for a
user who is about to copy the seed path. Calling `rel.as_posix()` on
the `Seeded` line aligns the two outputs.

Follow-up to PR #718 (#643): test assertions there already normalize
`result.output.replace("\\", "/")` so the substring checks remain
correct on both platforms — `replace` becomes a no-op on Windows now
that production emits `/` natively, no test churn needed.

Out-of-scope: `click.echo(str(result.path))` (line 72, the bare
absolute path on its own line for shell capture) intentionally stays
platform-native — that line exists for shell-pipeline consumers and
should match what the OS expects (Windows shells / CMD / PowerShell
prefer backslashes for absolute paths). Same trade-off as
`click.edit(filename=str(result.path))` on line 87.

Co-Authored-By: Claude <[email protected]>
@memtomem memtomem merged commit e15e375 into main May 2, 2026
8 of 9 checks passed
@memtomem memtomem deleted the fix/wiki-cmd-seeded-posix-display branch May 2, 2026 07:18
@github-actions github-actions Bot locked and limited conversation to collaborators May 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants