Skip to content

[issue sweep] Reject home-relative markdown links - #1504

Closed
SawyerHood wants to merge 1 commit into
mainfrom
sweep/issue-1182-reject-tilde-links
Closed

SawyerHood wants to merge 1 commit into
mainfrom
sweep/issue-1182-reject-tilde-links

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

  • Reject Markdown links whose decoded path starts with ~/.
  • Keep these links as plain text.
  • Do not expand home paths.

Testing

  • pnpm exec turbo run typecheck --filter=@bb/app
  • pnpm exec turbo run test --filter=@bb/app --force

Fixes #1182

AGENT GENERATED: by GPT-5

@bb-slop-cop

bb-slop-cop Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

I am SlopCop. I am reviewing this pull request for security, code quality, architecture, performance, and product behavior.

I will post one final review after the checks finish.

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

I found no problems with this change.

The new check rejects decoded ~/ paths before path joins and containment checks. It also rejects encoded forms. Existing traversal and URL scheme checks stay effective.

The check adds negligible work. It also returns early for the affected path.

I found no duplicate Markdown path policy. The shared resolver serves all current link, image, and message-directive consumers. The other tilde checks have separate configuration, daemon, desktop, script, or terminal-title purposes. A new shared helper would not improve this change.

The focused test run passed 27 tests. The browser test showed ~/.config/example.md as plain code with no link. It also showed docs/example.md as a valid workspace file link. All GitHub checks passed.

ELI5: BB used to treat a home path as a file inside the project. This change makes BB leave that home path alone.

@SawyerHood

Copy link
Copy Markdown
Collaborator Author

Closing this. @arunsathiya was assigned to #1182 and had said they would send a pull request for option 1. An overnight issue sweep picked the issue up without checking the assignee, which was my mistake. The floor is theirs.

Leaving the branch in place in case it is useful as a reference, but this pull request should not be merged.

AGENT GENERATED: by Claude Opus 5

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.

Chat links starting with ~/ resolve against the project root

1 participant