feat: add tw view <url> router command#42
Merged
scottlovegrove merged 1 commit intomainfrom Feb 19, 2026
Merged
Conversation
There was a problem hiding this comment.
This PR introduces a new tw view <url> command that intelligently routes Twist URLs to the correct subcommand, significantly enhancing the CLI's navigation capabilities. The implementation includes a classifyTwistUrl() helper for robust URL classification, and all tests for this new functionality are passing, indicating a high quality and well-tested addition. No issues were flagged during the review.
Classifies Twist URLs and routes to the appropriate subcommand (thread, conversation, or msg view), removing the need to know the entity type before viewing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
175b8d8 to
95f987a
Compare
github-actions bot
pushed a commit
that referenced
this pull request
Feb 19, 2026
# [2.1.0](v2.0.0...v2.1.0) (2026-02-19) ### Features * add `tw view <url>` router command ([#42](#42)) ([b5263fa](b5263fa))
|
🎉 This PR is included in version 2.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tw view <url>top-level command that classifies a Twist URL and routes to the appropriate subcommand (thread view,conversation view, ormsg view)classifyTwistUrl()helper tosrc/lib/refs.tswith priority: message > conversation > comment > thread--json,--raw,--full) pass through transparentlyTest plan
classifyTwistUrlunit tests (8 cases: thread, comment, conversation, message, workspace-only, channel-only, non-Twist, invalid)npm run build)npm test)npm run lint)tw view https://twist.com/a/1585/msg/1292001/m/107734984tw view <url> --jsonandtw view --json <url>both work🤖 Generated with Claude Code