Skip to content

fix(desktop): navigate to channel from inbox thread header#1847

Open
matt2e wants to merge 2 commits into
mainfrom
navigate-to-channel
Open

fix(desktop): navigate to channel from inbox thread header#1847
matt2e wants to merge 2 commits into
mainfrom
navigate-to-channel

Conversation

@matt2e

@matt2e matt2e commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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 single onOpenChannel callback into onManageChannel (management sheet, used by the manage trigger) and onOpenContext (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 existing onOpenContext navigation handler and keeps the management path on onManageChannel.

Testing

  • Split the existing home-inbox E2E test into two (shared seeding helper): one asserting the channel label navigates to #/channels/<id>?messageId=<id>, one asserting the manage trigger still opens the management sheet without leaving home.
  • Full pre-push suite passed (desktop, mobile, Tauri, Rust tests).

🤖 Generated with Claude Code

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>
@matt2e matt2e requested a review from a team as a code owner July 14, 2026 03:39
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>
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.

1 participant