fix(desktop): navigate to channel from inbox thread header#1847
Open
matt2e wants to merge 2 commits into
Open
Conversation
Clicking the #channelname header above an Inbox thread opened the channel management panel (a side effect of #1066 funneling the name click and the manage affordance through one onOpenChannel prop). Every other channel-name click in the app navigates, so restore the pre-#1066 behavior: the name click now navigates to the channel with the source message anchored (scrolled to and highlighted). - Split InboxDetailPane's onOpenChannel prop into onOpenContext (channelId, messageId, threadRootId) for the name click and onManageChannel(channelId) for the members-bar manage affordance. - Wire onOpenContext in HomeView to the existing goChannel-backed prop; onManageChannel keeps docking the ChannelManagementSheet, so #1066's inspect-without-leaving-Home flow stays reachable. - Replace the e2e test pinning the old name-click behavior with two: one asserting the name click navigates to /channels/<id>?messageId=<event>, one asserting the manage affordance still opens the panel in place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
The e2e test added with the inbox header navigation fix seeds a mention whose only e-tag is the unmarked channel id, so getThreadReference always returns a null rootId and the third argument to onOpenContext (threadRootId) was never exercised end-to-end. A regression dropping that argument — which ChannelRouteScreen needs to splice thread context into the timeline on arrival — would have gone uncaught. - Allow seedHomeInboxMention to override the seeded feed item's tags. - Add a test seeding a thread-reply mention (NIP-10 root/reply-marked e-tags) and assert the name click lands on /channels/<id>?messageId=<event>&threadRootId=<root>. - Pin the null path in the existing test by asserting threadRootId is absent from the URL for a plain channel mention. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
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
Clicking the channel name in the home inbox thread header previously opened the channel management sheet. It now navigates to the channel and jumps to the referenced message, which is what the affordance implies. Channel management is still available via the dedicated trigger in the header.
InboxDetailPane: split the singleonOpenChannelcallback intoonManageChannel(management sheet, used by the manage trigger) andonOpenContext(channel + message + thread-root navigation, used by the channel-name button). The thread root is resolved from the item's tags so the jump lands in the right thread.HomeView: wires the pane to the existingonOpenContextnavigation handler and keeps the management path ononManageChannel.Testing
#/channels/<id>?messageId=<id>, one asserting the manage trigger still opens the management sheet without leaving home.🤖 Generated with Claude Code