Skip to content

feat(channel): URL search params for single channel navigation#2634

Merged
gbirman merged 1 commit into
mainfrom
channels-search-params
Apr 16, 2026
Merged

feat(channel): URL search params for single channel navigation#2634
gbirman merged 1 commit into
mainfrom
channels-search-params

Conversation

@gbirman
Copy link
Copy Markdown
Contributor

@gbirman gbirman commented Apr 16, 2026

uses search params to navigate in a channel when there's a single split

When navigating directly to /app/channel/{id}?channel_message_id=...&channel_thread_id=...,
the target message was only picked up when opened programmatically via props.
Fall back to URL search params when props don't set a target, and only when
there's a single split so we don't cross-apply params across multiple splits.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

Modified NewChannelBlockAdapter to compute initial ChannelTargetMessageParams through a new initialTargetMessageParams() function. The logic prioritizes URL parameters from props, then conditionally uses URL search parameters only when exactly one split exists; otherwise defaults to empty parameters.

Changes

Cohort / File(s) Summary
Initial Target Message Parameters Computation
js/app/packages/block-channel/component/NewChannelBlockAdapter.tsx
Added globalSplitManager import and introduced initialTargetMessageParams() function to conditionally compute channel target message parameters based on prop-provided URL params and split count. Changed <NewChannel /> prop from convertTargetMessage(props) to convertTargetMessage(initialTargetMessageParams()).

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description accurately describes the changeset, explaining the purpose of using search params to navigate in channels when there's a single split.
Title check ✅ Passed The title follows conventional commits format (feat:) and is under 72 characters (62 chars), accurately summarizing the main change about URL search params for single channel navigation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

@gbirman gbirman requested a review from synoet April 16, 2026 21:22
@gbirman gbirman changed the title fix(channel): read target message from URL search params on deep link feat(channel): URL search params for single channel navigation Apr 16, 2026
@gbirman gbirman merged commit 62463e2 into main Apr 16, 2026
24 checks passed
@gbirman gbirman deleted the channels-search-params branch April 16, 2026 21:23
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.

1 participant