Skip to content

fix(refs): tighten inbox/saved thread URL routing#32

Merged
amix merged 1 commit into
mainfrom
amix/tighten-inbox-thread-url-routing
Jun 17, 2026
Merged

fix(refs): tighten inbox/saved thread URL routing#32
amix merged 1 commit into
mainfrom
amix/tighten-inbox-thread-url-routing

Conversation

@amix

@amix amix commented Jun 16, 2026

Copy link
Copy Markdown
Member

Context

Follow-up to #30. Doistbot flagged that inbox/saved branches parsed all trailing route pairs, so a malformed URL like inbox/t/TH1/msg/CV1 could be misrouted as a conversation.

What was changed

  • After inbox/saved, only t/{thread} with an optional c/{comment} suffix is classified; extra segments stay unclassified.
  • Grouped the branch by route prefix (removes the duplicated condition).
  • Added saved thread test cases + a strictness regression test.

Refs

Review: #30 (review)

@doistbot doistbot requested a review from Bloomca June 16, 2026 10:05

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tightens inbox and saved URL routing to accept only t/{thread} with an optional c/{comment} suffix, preventing malformed trailing segments from being misrouted. No issues were flagged.

Share FeedbackReview Logs

@Bloomca Bloomca left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me, but I think we can improve the documentation with some examples as the logic is hard to read

Comment thread src/lib/refs.test.ts Outdated
Comment thread src/lib/refs.ts Outdated
Only classify `t/{thread}` with an optional `c/{comment}` suffix after
inbox/saved; extra trailing segments stay unclassified so malformed URLs
aren't misrouted (e.g. as a conversation). Groups the branch by route
prefix and adds saved-thread + strictness test coverage.

Addresses review on #30.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@amix amix force-pushed the amix/tighten-inbox-thread-url-routing branch from 1e8d409 to c6dfbe6 Compare June 17, 2026 05:32
@amix

amix commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

@Bloomca I did a jab at making it less arcane. I’ll merge this in, but please if you disagree, I can do a follow-up PR to clean things up 👍

@amix amix merged commit 8a0090e into main Jun 17, 2026
5 checks passed
@amix amix deleted the amix/tighten-inbox-thread-url-routing branch June 17, 2026 05:42
doist-release-bot Bot added a commit that referenced this pull request Jun 17, 2026
## [1.6.5](v1.6.4...v1.6.5) (2026-06-17)

### Bug Fixes

* **refs:** tighten inbox/saved thread URL routing ([#32](#32)) ([8a0090e](8a0090e))
@doist-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.6.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants