Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

style(channels): better derived thread rail color token, merge new and daily divider (#5987)

Seamusaecb02fb6bde
diff --git a/apps/web/src/features/block-pr/component/GithubMessageView.tsx b/apps/web/src/features/block-pr/component/GithubMessageView.tsx
index 1171ae44a4..a3295ed802 100644
--- a/apps/web/src/features/block-pr/component/GithubMessageView.tsx
+++ b/apps/web/src/features/block-pr/component/GithubMessageView.tsx
@@ -229,10 +229,7 @@ export function GithubMessageView(props: {
<GithubCommentMessage comment={props.comment} />
<Show when={replies().length > 0}>
<div class="relative w-full">
- <Thread.ReplyRailDecorations
- isReplying={() => false}
- firstThreadReplyNewMessage={false}
- />
+ <Thread.ReplyRailDecorations />
<Thread.RepliesContainer>
<Key each={replies()} by="id">
{(reply) => (
diff --git a/apps/web/src/features/channel/Message/DateDivider.tsx b/apps/web/src/features/channel/Message/DateDivider.tsx
index 5e37b9d1b8..68293d7dfa 100644
--- a/apps/web/src/features/channel/Message/DateDivider.tsx
+++ b/apps/web/src/features/channel/Message/DateDivider.tsx
@@ -9,18 +9,27 @@ type DateDividerProps = {
isReply?: boolean;
};
-export function DateDivider(props: DateDividerProps) {
- const shouldRender = createMemo(() => {
- if (props.isReply) return false;
- if (!props.listMeta) return false;
+export function isDateDividerVisible(
+ createdAt: string,
+ listMeta?: ChannelMessageListMeta,
+ isReply?: boolean
+): boolean {
+ if (isReply || !listMeta) return false;
+
+ if (listMeta.index === 0) return true;
- if (props.listMeta.index === 0) return true;
+ const previousCreatedAt = listMeta.previousTopLevelCreatedAt;
+ if (!previousCreatedAt) return false;
- const previousCreatedAt = props.listMeta.previousTopLevelCreatedAt;
- if (!previousCreatedAt) return false;
+ return !isSameDay(new Date(createdAt), new Date(previousCreatedAt));
+}
- return !isSameDay(new Date(props.createdAt), new Date(previousCreatedAt));
- });
+export function DateDivider(props: DateDividerProps) {
+ const shouldRender = createMemo(
+ () =>
+ isDateDividerVisible(props.createdAt, props.listMeta, props.isReply) &&
+ props.listMeta?.isFirstNewMessage !== true
+ );
return (
<Show when={shouldRender()}>
diff --git a/apps/web/src/features/channel/Message/MessageFlag.tsx b/apps/web/src/features/channel/Message/MessageFlag.tsx
index dcb270bca1..bce67447ab 100644
--- a/apps/web/src/features/channel/Message/MessageFlag.tsx
+++ b/apps/web/src/features/channel/Message/MessageFlag.tsx
@@ -27,7 +27,7 @@ export function MessageFlag(props: MessageFlagProps) {
<div
class={cn(
'absolute top-7 mobile:top-8 h-0 border-t inset-x-0',
- props.highlight ? 'border-accent/40' : 'border-rail'
+ props.highlight ? 'border-accent/40' : 'border-thread-rail'
)}
/>
{/* Plain label; its surface background carves the gap in the line. */}
diff --git a/apps/web/src/features/channel/Message/NewDivider.tsx b/apps/web/src/features/channel/Message/NewDivider.tsx
index bf409a98d6..886492f828 100644
--- a/apps/web/src/features/channel/Message/NewDivider.tsx
+++ b/apps/web/src/features/channel/Message/NewDivider.tsx
@@ -1,8 +1,11 @@
+import { formatRelativeDate } from '@core/util/time';
import { Show } from 'solid-js';
+import { isDateDividerVisible } from './DateDivider';
import type { ChannelMessageListMeta } from './list-meta';
import { MessageFlag } from './MessageFlag';
type NewDividerProps = {
+ createdAt: string;
listMeta?: ChannelMessageListMeta;
isReply?: boolean;
onDismiss?: () => void;
@@ -11,6 +14,10 @@ type NewDividerProps = {
export function NewDivider(props: NewDividerProps) {
const isVisible = () =>
!props.isReply && props.listMeta?.isFirstNewMessage === true;
+ const text = () =>
+ isDateDividerVisible(props.createdAt, props.listMeta, props.isReply)
+ ? `${formatRelativeDate(props.createdAt)} - New`
+ : 'New';
return (
<Show when={isVisible()}>
@@ -20,7 +27,7 @@ export function NewDivider(props: NewDividerProps) {
title="Mark as read"
onClick={props.onDismiss}
>
- <MessageFlag text="New" highlight />
+ <MessageFlag text={text()} highlight />
</button>
</Show>
);
diff --git a/apps/web/src/features/channel/Message/ReactionChip.tsx b/apps/web/src/features/channel/Message/ReactionChip.tsx
index ca465054af..780a753116 100644
--- a/apps/web/src/features/channel/Message/ReactionChip.tsx
+++ b/apps/web/src/features/channel/Message/ReactionChip.tsx
@@ -88,14 +88,11 @@ export function ReactionChip(props: ReactionChipProps) {
}))
}
size="sm"
- variant="outline"
+ variant={props.selected ? 'accent' : 'outline'}
class={cn(
'flex flex-row items-center h-7 min-w-7 gap-1 rounded-full',
{
- 'border-rail hover:bg-hover': props.interactive,
- 'border-rail': !props.selected && !props.interactive,
- 'text-accent border-accent bg-accent-bg hover:bg-accent-hover':
- props.selected,
+ 'border-accent/10': props.selected,
'pointer-events-auto': !props.interactive,
}
)}
diff --git a/apps/web/src/features/channel/Message/Reactions.tsx b/apps/web/src/features/channel/Message/Reactions.tsx
index 87c89e3dc1..e8d11d8e5d 100644
--- a/apps/web/src/features/channel/Message/Reactions.tsx
+++ b/apps/web/src/features/channel/Message/Reactions.tsx
@@ -70,7 +70,7 @@ export function Reactions(props: ReactionsProps) {
size: 'icon-sm',
tooltip: 'Add reaction',
variant: 'outline',
- class: 'rounded-full h-7 min-w-7 border-rail',
+ class: 'rounded-full h-7 min-w-7',
'aria-label': 'Add reaction',
onClick: (e: MouseEvent) => e.stopPropagation(),
}}
diff --git a/apps/web/src/features/channel/Message/tests/date-divider.test.tsx b/apps/web/src/features/channel/Message/tests/date-divider.test.tsx
index 1e636fb409..c7de5fc01e 100644
--- a/apps/web/src/features/channel/Message/tests/date-divider.test.tsx
+++ b/apps/web/src/features/channel/Message/tests/date-divider.test.tsx
@@ -66,6 +66,7 @@ describe('NewDivider', () => {
render(() => (
<NewDivider
+ createdAt="2026-02-21T10:00:00.000Z"
listMeta={{
index: 2,
isNewMessage: true,
@@ -80,4 +81,29 @@ describe('NewDivider', () => {
await user.click(button);
expect(onDismiss).toHaveBeenCalledOnce();
});
+
+ it('combines coincident date and new dividers into one accent divider', () => {
+ vi.useFakeTimers();
+ vi.setSystemTime(new Date('2026-02-22T12:00:00.000Z'));
+ const listMeta = {
+ index: 2,
+ isNewMessage: true,
+ isFirstNewMessage: true,
+ previousTopLevelCreatedAt: '2026-02-21T09:00:00.000Z',
+ };
+
+ render(() => (
+ <>
+ <NewDivider createdAt="2026-02-22T10:00:00.000Z" listMeta={listMeta} />
+ <DateDivider createdAt="2026-02-22T10:00:00.000Z" listMeta={listMeta} />
+ </>
+ ));
+
+ const label = screen.getByText('Today - New');
+ expect(label.classList.contains('text-accent')).toBe(true);
+ expect(
+ label.previousElementSibling?.classList.contains('border-accent/40')
+ ).toBe(true);
+ expect(screen.queryByText('Today')).toBeNull();
+ });
});
diff --git a/apps/web/src/features/channel/StandaloneThread/Replies.tsx b/apps/web/src/features/channel/StandaloneThread/Replies.tsx
index c95128e9d5..0422a377dc 100644
--- a/apps/web/src/features/channel/StandaloneThread/Replies.tsx
+++ b/apps/web/src/features/channel/StandaloneThread/Replies.tsx
@@ -56,10 +56,7 @@ export function Replies(props: RepliesProps) {
return (
<Show when={ctx.hasReplies() || ctx.isReplying()}>
<div class="relative w-full">
- <Thread.ReplyRailDecorations
- isReplying={ctx.isReplying}
- firstThreadReplyNewMessage={false}
- />
+ <Thread.ReplyRailDecorations />
<Thread.RepliesContainer>
<For each={ctx.displayReplies()}>
{(reply) => {
diff --git a/apps/web/src/features/channel/Thread/ChannelThread.tsx b/apps/web/src/features/channel/Thread/ChannelThread.tsx
index 89b62ce96c..367fee99cf 100644
--- a/apps/web/src/features/channel/Thread/ChannelThread.tsx
+++ b/apps/web/src/features/channel/Thread/ChannelThread.tsx
@@ -5,7 +5,6 @@ import { getDisplayName, tryMacroId } from '@core/user';
import { MarkMessageNotifications } from '@notifications/components/MarkMessageNotifications';
import { useThreadRepliesQuery } from '@queries/channel/thread-replies';
import type { ApiThreadReply } from '@service-storage/generated/schemas/apiThreadReply';
-import { cn } from '@ui';
import {
createEffect,
createSignal,
@@ -40,9 +39,6 @@ export function ChannelThread(props: ThreadProps) {
const displayName = () => getDisplayName(macroId());
const thread = () => props.data().thread;
const hasReplies = () => thread().reply_count > 0;
- const threadHasNewMessages = () =>
- props.listMeta?.isNewMessage === true ||
- activeReplies().some((reply) => props.isNewMessage?.(reply) === true);
const fetchRepliesEnabled = createThreadRepliesFetchGate({
threadId: () => props.data().id,
replyCount: () => thread().reply_count,
@@ -305,7 +301,6 @@ export function ChannelThread(props: ThreadProps) {
<Thread.RootRail
visible={hasReplies() || isReplyingToThread()}
grouped={props.listMeta?.isGroupedWithPrevious}
- newMessage={threadHasNewMessages()}
/>
<MarkMessageNotifications
messageId={props.data().id}
@@ -337,12 +332,7 @@ export function ChannelThread(props: ThreadProps) {
{/* Spine bridge: spans the replies container's top padding,
connecting the root segment to the reply rows' own spine
segments below. */}
- <div
- class={cn(
- 'pointer-events-none absolute top-0 -z-1 channel-rail-left border-rail left-(--left-of-channel-rail) h-(--thread-padding-y)',
- threadHasNewMessages() && 'border-accent'
- )}
- />
+ <div class="pointer-events-none absolute top-0 -z-1 channel-rail-left border-thread-rail left-(--left-of-channel-rail) h-(--thread-padding-y)" />
{/* Terminal branch: the spine's final curve into the footer
button's left edge. Its vertical part starts exactly at the
last reply row's bottom (button h-8 + mb-2 + container pb). */}
@@ -350,10 +340,7 @@ export function ChannelThread(props: ThreadProps) {
when={shouldShowCollapsedIndicator() || shouldShowReplyButton()}
>
<div
- class={cn(
- 'pointer-events-none absolute -z-1 channel-rail-left channel-rail-bottom border-rail rounded-bl-[14px] left-(--left-of-channel-rail) h-8',
- threadHasNewMessages() && 'border-accent'
- )}
+ class="pointer-events-none absolute -z-1 channel-rail-left channel-rail-bottom border-thread-rail rounded-bl-[14px] left-(--left-of-channel-rail) h-8"
style={{
bottom: 'calc(var(--thread-padding-y) + 1.5rem)',
width:
@@ -372,7 +359,6 @@ export function ChannelThread(props: ThreadProps) {
messageEditor={props.messageEditor}
participants={props.participants}
isNewMessage={props.isNewMessage}
- hasNewMessages={threadHasNewMessages()}
onReady={setReplyListHandle}
positionTarget={props.targetNavigation?.positionTarget}
selectedReplyId={replySelection.selectedId}
@@ -398,10 +384,7 @@ export function ChannelThread(props: ThreadProps) {
center. Once replies exist, it instead joins the
composer at its vertical center. */}
<div
- class={cn(
- 'pointer-events-none absolute top-0 -z-1 channel-rail-left channel-rail-bottom border-rail rounded-bl-[14px]',
- threadHasNewMessages() && 'border-accent'
- )}
+ class="pointer-events-none absolute top-0 -z-1 channel-rail-left channel-rail-bottom border-thread-rail rounded-bl-[14px]"
style={{
left: 'calc(var(--user-icon-width) / 2 + var(--message-padding-x) - var(--thread-shift) - var(--channel-rail-width) / 2)',
width:
diff --git a/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx b/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx
index c736cc6369..e1de82755b 100644
--- a/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadCollapsedIndicator.tsx
@@ -34,7 +34,7 @@ export function ThreadCollapsedIndicator(props: ThreadCollapsedIndicatorProps) {
title="Expand thread"
class={cn(
'flex items-center gap-2 text-xs w-fit h-8 touch:min-h-(--user-icon-width) border bg-surface hover:bg-hover py-1 pr-2 pl-1.5 mb-2 select-none outline-none focus-visible:bg-active rounded-full',
- local.hasNewMessages ? 'border-accent/40' : 'border-rail',
+ local.hasNewMessages ? 'border-accent/40' : 'border-thread-rail',
local.class
)}
{...rest}
diff --git a/apps/web/src/features/channel/Thread/ThreadRail.tsx b/apps/web/src/features/channel/Thread/ThreadRail.tsx
index 3aed8d3656..5c2c487c36 100644
--- a/apps/web/src/features/channel/Thread/ThreadRail.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadRail.tsx
@@ -1,16 +1,7 @@
-import { cn } from '@ui/utils/classname';
-
-interface ThreadRailProps {
- newMessage?: boolean;
-}
-
-export function ThreadRail(props: ThreadRailProps) {
+export function ThreadRail() {
return (
<div
- class={cn(
- 'pointer-events-none absolute top-0 bottom-0 channel-rail-left border-rail -z-1',
- props.newMessage && 'border-accent'
- )}
+ class="pointer-events-none absolute top-0 bottom-0 channel-rail-left border-thread-rail -z-1"
style={{
left: 'var(--left-of-channel-rail)',
}}
diff --git a/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx b/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx
index 4c720bc77f..27cd11e5dd 100644
--- a/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadReplyButton.tsx
@@ -14,7 +14,7 @@ export function ThreadReplyButton(props: ThreadReplyButtonProps) {
<button
type="button"
class={cn(
- 'w-min rounded-full icon-plus mb-2 border border-rail bg-surface hover:bg-hover flex flex-row justify-center items-center size-8 touch:min-h-(--user-icon-width) touch:min-w-(--user-icon-width) text-ink-muted hover:text-ink',
+ 'w-min rounded-full icon-plus mb-2 border border-thread-rail bg-surface hover:bg-hover flex flex-row justify-center items-center size-8 touch:min-h-(--user-icon-width) touch:min-w-(--user-icon-width) text-ink-muted hover:text-ink',
local.class
)}
ref={(el) => {
diff --git a/apps/web/src/features/channel/Thread/ThreadReplyInputConnector.tsx b/apps/web/src/features/channel/Thread/ThreadReplyInputConnector.tsx
index 04863462d0..91041d88c4 100644
--- a/apps/web/src/features/channel/Thread/ThreadReplyInputConnector.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadReplyInputConnector.tsx
@@ -13,7 +13,7 @@ export function ThreadReplyInputConnector(props: {
return (
<div
- class="pointer-events-none absolute top-0 -z-1 channel-rail-left channel-rail-bottom border-rail rounded-bl-[14px]"
+ class="pointer-events-none absolute top-0 -z-1 channel-rail-left channel-rail-bottom border-thread-rail rounded-bl-[14px]"
style={{
left: isThreadRail()
? 'calc(var(--user-icon-width) / 2 - var(--thread-shift) - var(--channel-rail-width) / 2)'
diff --git a/apps/web/src/features/channel/Thread/ThreadReplyList.tsx b/apps/web/src/features/channel/Thread/ThreadReplyList.tsx
index b79fd6876b..fad6f5606f 100644
--- a/apps/web/src/features/channel/Thread/ThreadReplyList.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadReplyList.tsx
@@ -26,8 +26,6 @@ export function ThreadReplyList(props: {
messageEditor?: MessageEditor;
participants?: Accessor<IUser[]>;
isNewMessage?: (message: NewMessageCheckable) => boolean;
- /** The thread rail is one path, so all of its pieces share this state. */
- hasNewMessages?: boolean;
onReady?: (handle: ThreadReplyListHandle) => void;
positionTarget?: (
threadRow: HTMLElement,
@@ -79,7 +77,6 @@ export function ThreadReplyList(props: {
>
<ThreadReplyRail
grouped={listMetaByReplyId()[reply.id].isGroupedWithPrevious}
- newMessage={props.hasNewMessages}
/>
<MarkMessageNotifications
messageId={reply.id}
diff --git a/apps/web/src/features/channel/Thread/ThreadReplyRail.tsx b/apps/web/src/features/channel/Thread/ThreadReplyRail.tsx
index 50b136caa1..1c87728009 100644
--- a/apps/web/src/features/channel/Thread/ThreadReplyRail.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadReplyRail.tsx
@@ -4,8 +4,6 @@ import { Show } from 'solid-js';
type ThreadReplyRailProps = {
/** Grouped replies continue the spine without another avatar branch. */
grouped?: boolean;
- /** An unread thread paints its complete rail path with the accent. */
- newMessage?: boolean;
};
/**
@@ -14,20 +12,17 @@ type ThreadReplyRailProps = {
* short of the reply avatar.
*/
export function ThreadReplyRail(props: ThreadReplyRailProps) {
- const railClass = () =>
- cn(
- 'pointer-events-none absolute -z-1 channel-rail-left border-rail',
- props.newMessage && 'border-accent'
- );
+ const railClass =
+ 'pointer-events-none absolute -z-1 channel-rail-left border-thread-rail';
const railLeft =
'calc(var(--user-icon-width) / 2 + var(--message-padding-x) - var(--thread-shift) - var(--channel-rail-width) / 2)';
return (
<>
- <div class={cn(railClass(), 'inset-y-0')} style={{ left: railLeft }} />
+ <div class={cn(railClass, 'inset-y-0')} style={{ left: railLeft }} />
<Show when={!props.grouped}>
<div
- class={cn(railClass(), 'top-0 channel-rail-bottom rounded-bl-[14px]')}
+ class={cn(railClass, 'top-0 channel-rail-bottom rounded-bl-[14px]')}
style={{
left: railLeft,
width:
diff --git a/apps/web/src/features/channel/Thread/ThreadReplyRailDecorations.tsx b/apps/web/src/features/channel/Thread/ThreadReplyRailDecorations.tsx
index c375a3282b..4b9e758af6 100644
--- a/apps/web/src/features/channel/Thread/ThreadReplyRailDecorations.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadReplyRailDecorations.tsx
@@ -1,22 +1,12 @@
-import { cn } from '@ui/utils/classname';
-import type { Accessor } from 'solid-js';
import { threadConnectorStyle } from './utils/thread-rail-geometry';
-type ThreadReplyRailProps = {
- isReplying: Accessor<boolean>;
- firstThreadReplyNewMessage?: boolean;
-};
-
-export function ThreadReplyRailDecorations(props: ThreadReplyRailProps) {
+export function ThreadReplyRailDecorations() {
return (
<>
{/* Branch elbow: continues the root message's rail segment and stops
short of the first reply's avatar by the shared rail clearance. */}
<div
- class={cn(
- 'pointer-events-none absolute top-0 -z-1 channel-rail-left channel-rail-bottom border-rail rounded-bl-[14px]',
- props.firstThreadReplyNewMessage && 'border-accent'
- )}
+ class="pointer-events-none absolute top-0 -z-1 channel-rail-left channel-rail-bottom border-thread-rail rounded-bl-[14px]"
style={{
left: threadConnectorStyle.left,
width: threadConnectorStyle.width,
diff --git a/apps/web/src/features/channel/Thread/ThreadRootRail.tsx b/apps/web/src/features/channel/Thread/ThreadRootRail.tsx
index 5e83d028ce..352405ed79 100644
--- a/apps/web/src/features/channel/Thread/ThreadRootRail.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadRootRail.tsx
@@ -1,10 +1,8 @@
-import { cn } from '@ui';
import { Show } from 'solid-js';
type ThreadRootRailProps = {
grouped?: boolean;
visible?: boolean;
- newMessage?: boolean;
};
/**
@@ -15,10 +13,7 @@ export function ThreadRootRail(props: ThreadRootRailProps) {
return (
<Show when={props.visible}>
<div
- class={cn(
- 'pointer-events-none absolute channel-rail-left border-rail -z-1 left-(--left-of-channel-rail) bottom-0',
- props.newMessage && 'border-accent'
- )}
+ class="pointer-events-none absolute channel-rail-left border-thread-rail -z-1 left-(--left-of-channel-rail) bottom-0"
style={{
top: props.grouped
? '0'
@@ -27,10 +22,7 @@ export function ThreadRootRail(props: ThreadRootRailProps) {
/>
<Show when={props.grouped}>
<div
- class={cn(
- 'pointer-events-none absolute top-2 size-1.5 rounded-full ring-1 ring-surface left-(--channel-rail-center) -translate-x-1/2',
- props.newMessage ? 'bg-accent' : 'bg-rail'
- )}
+ class="pointer-events-none absolute top-2 size-1.5 rounded-full ring-1 ring-surface bg-thread-rail left-(--channel-rail-center) -translate-x-1/2"
data-thread-fork-node
/>
</Show>
diff --git a/apps/web/src/features/channel/Thread/ThreadRow.tsx b/apps/web/src/features/channel/Thread/ThreadRow.tsx
index 850e3205d7..2994b48f8e 100644
--- a/apps/web/src/features/channel/Thread/ThreadRow.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadRow.tsx
@@ -36,6 +36,7 @@ export function ThreadRow(props: ThreadRowProps) {
{(id) => <ChannelCreatedIndicator channelId={id()} />}
</Show>
<NewDivider
+ createdAt={props.message.created_at}
listMeta={props.listMeta}
onDismiss={props.onDismissNewMessages}
/>
@@ -51,7 +52,7 @@ export function ThreadRow(props: ThreadRowProps) {
rows. */}
<Show when={props.listMeta?.threadRailBelow}>
<div
- class="pointer-events-none absolute -z-1 channel-rail-left border-rail left-(--left-of-channel-rail) bottom-0"
+ class="pointer-events-none absolute -z-1 channel-rail-left border-thread-rail left-(--left-of-channel-rail) bottom-0"
style={{
top: props.listMeta?.isGroupedWithPrevious
? '0'
diff --git a/apps/web/src/features/channel/Thread/ThreadTerminalRail.tsx b/apps/web/src/features/channel/Thread/ThreadTerminalRail.tsx
index 04ec4f40dd..5036d3c0fe 100644
--- a/apps/web/src/features/channel/Thread/ThreadTerminalRail.tsx
+++ b/apps/web/src/features/channel/Thread/ThreadTerminalRail.tsx
@@ -1,17 +1,8 @@
-import { cn } from '@ui';
-
-type ThreadTerminalRailProps = {
- newMessage?: boolean;
-};
-
/** Curves the parent spine toward the reply action without touching it. */
-export function ThreadTerminalRail(props: ThreadTerminalRailProps) {
+export function ThreadTerminalRail() {
return (
<div
- class={cn(
- 'pointer-events-none absolute -z-1 channel-rail-left channel-rail-bottom border-rail rounded-bl-[14px] left-(--left-of-channel-rail) h-8',
- props.newMessage && 'border-accent'
- )}
+ class="pointer-events-none absolute -z-1 channel-rail-left channel-rail-bottom border-thread-rail rounded-bl-[14px] left-(--left-of-channel-rail) h-8"
style={{
bottom: 'calc(var(--thread-padding-y) + 1.5rem)',
width:
diff --git a/apps/web/src/index.css b/apps/web/src/index.css
index ec6422bb2d..62c4d6faa1 100644
--- a/apps/web/src/index.css
+++ b/apps/web/src/index.css
@@ -322,11 +322,11 @@ body.tauri-ios {
--color-alert-ink: var(--color-warning-ink);
/* Utility outputs. */
- --color-channel-rail: color-mix(in oklch, var(--color-edge) 90%, var(--color-ink));
- --color-channel-rail-active: var(--color-accent);
+ /* Thread rail segments overlap to form continuous paths, so this must stay
+ opaque or their intersections render darker than the straight runs. */
+ --color-thread-rail: color-mix(in oklch, var(--color-surface) 90%, var(--color-ink));
--color-modal-overlay: oklch(0 0 0 / 0.25);
--color-drop-shadow: oklch(0.15 0 0 / 0.04);
- --color-rail: var(--color-channel-rail);
--color-skeleton: color-mix(in oklch, var(--color-ink) 10%, transparent);
--color-list-hover: color-mix(in oklch, var(--color-hover) 65%, transparent);
--color-list-highlighted: var(--color-hover);
@@ -488,6 +488,11 @@ body.tauri-ios {
@custom-variant light-mode (&:where(html[data-theme-light="true"] *));
@custom-variant dark-mode (&:where(html[data-theme-light="false"] *));
+/* Dark surfaces need a larger ink step for the thread path to remain visible.
+ Both inputs stay opaque, so overlapping rail segments still render evenly. */
+html[data-theme-light='false'] {
+ --color-thread-rail: color-mix(in oklch, var(--color-surface) 70%, var(--color-ink));
+}
/* Floating "island" chrome shared by the mobile dock buttons, header islands,
and other floating mobile controls. Consumers add their own shape classes
diff --git a/apps/web/src/lib/core/comments/discussion/Discussion.tsx b/apps/web/src/lib/core/comments/discussion/Discussion.tsx
index 73b8f4157e..9f28088427 100644
--- a/apps/web/src/lib/core/comments/discussion/Discussion.tsx
+++ b/apps/web/src/lib/core/comments/discussion/Discussion.tsx
@@ -306,10 +306,7 @@ export function DiscussionThreadView(props: {
<Show when={hasReplies() || isReplying()}>
<div class="relative w-full">
- <Thread.ReplyRailDecorations
- isReplying={isReplying}
- firstThreadReplyNewMessage={false}
- />
+ <Thread.ReplyRailDecorations />
<Thread.RepliesContainer>
<For each={replies()}>
{(reply) => {
diff --git a/apps/web/src/lib/core/linked-conversation/LinkedConversation.tsx b/apps/web/src/lib/core/linked-conversation/LinkedConversation.tsx
index ac0f235698..6c1ee1fe72 100644
--- a/apps/web/src/lib/core/linked-conversation/LinkedConversation.tsx
+++ b/apps/web/src/lib/core/linked-conversation/LinkedConversation.tsx
@@ -73,10 +73,7 @@ export function LinkedConversation(props: LinkedConversationProps) {
</Show>
<Show when={hasReplies()}>
<div class="relative w-full">
- <Thread.ReplyRailDecorations
- isReplying={() => false}
- firstThreadReplyNewMessage={false}
- />
+ <Thread.ReplyRailDecorations />
<Thread.RepliesContainer>
<For each={displayReplies()}>
{(reply) => (