[Chat] Fix navigation stacking on messages links in split view (#10741)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-06-05 16:38:48 +03:00
committed by GitHub
parent 3cdc0604ca
commit f81bb6f494
3 changed files with 15 additions and 0 deletions
@@ -481,6 +481,9 @@ function BaseChatItem({
<Link
to={`/messages/${convo.view.id}`}
// In split view, this list stays mounted alongside the open convo,
// so push would stack duplicate routes on repeated clicks.
action={isWithinSplitView ? 'navigate' : 'push'}
label={title}
accessibilityHint={accessibilityHint}
accessibilityActions={
@@ -11,10 +11,12 @@ export function InboxRequests({
count,
more,
variant,
action,
}: {
count: number
more: boolean
variant?: 'ghost' | 'solid'
action?: 'push' | 'navigate'
}) {
const {t: l} = useLingui()
@@ -41,6 +43,7 @@ export function InboxRequests({
<Link
label={label}
to="/messages/inbox"
action={action}
size="small"
variant={unread ? 'solid' : 'ghost'}
color={unread ? 'primary_subtle' : 'secondary'}
@@ -66,6 +69,7 @@ export function InboxRequests({
<Link
label={label}
to="/messages/inbox"
action={action}
color={unread ? 'primary_subtle' : 'secondary'}
size="small">
<ButtonIcon icon={InboxIcon} />