Skip to content

fix(inbox/soup): fix reactivity in inbox card user display names - #5471

Open
sedson wants to merge 1 commit into
mainfrom
seamus/macro-2797-fix-once-again-mis-used-reactive-name-fetch-in-soup
Open

fix(inbox/soup): fix reactivity in inbox card user display names#5471
sedson wants to merge 1 commit into
mainfrom
seamus/macro-2797-fix-once-again-mis-used-reactive-name-fetch-in-soup

Conversation

@sedson

@sedson sedson commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@macro-application

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved sender name rendering in channel messages for more consistent display.
    • Ensured sender names resolve correctly when displaying messages associated with macros.

Walkthrough

Channel latest-message rendering now displays the sender separately from the markdown message and removes the sender name prop from its callers. Unused sender-name imports and computations were removed. Macro sender names now use the synchronous getDisplayName helper. The user core module re-exports getDisplayName.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so its relevance to the changeset cannot be assessed. Add a brief description that explains the inbox display-name reactivity fix and related rendering changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format and is 64 characters long, under the 72-character limit.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/features/entity/composed/list-entity/channel.tsx`:
- Around line 109-114: Update the StaticMarkdown usage in the message preview so
the sender and content remain in one inline flow. Reuse the repository’s
existing inline markdown theme pattern, ensuring both the markdown root and
paragraph render inline, and apply it alongside twoLineClampMarkdownTheme
without changing the surrounding sender or content behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: eea4d570-bb6a-4fcb-9a8b-7d8f3dadb81e

📥 Commits

Reviewing files that changed from the base of the PR and between 1767917 and aba3cf0.

📒 Files selected for processing (4)
  • apps/web/src/features/entity/composed/list-entity/channel.tsx
  • apps/web/src/features/entity/composed/list-entity/narrow-inbox-layout.tsx
  • apps/web/src/features/next-soup/soup-view/views/inbox/inbox-card-layouts.tsx
  • apps/web/src/lib/core/user/index.ts

Comment on lines +109 to +114
<span class="ph-no-capture font-medium text-ink-muted">
<DisplayName id={props.message.senderId} format="firstName" />:{' '}
</span>
<StaticMarkdown
theme={twoLineClampMarkdownTheme}
markdown={
(props.senderFirstName ? `**${props.senderFirstName}:** ` : '') +
props.message.content.trim()
}
markdown={props.message.content.trim()}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep the sender and message in one inline flow.

StaticMarkdown renders a root <div>, while this change places it after an inline sender <span>. The sender therefore consumes a separate block line, and the outer line-clamp-2 reduces the visible message preview. The previous implementation rendered **sender:** message in one markdown tree. (raw.githubusercontent.com)

Use an inline markdown theme that sets both the root and paragraph to inline, or use another layout that preserves one text flow. The repository already contains this inline-theme pattern. (raw.githubusercontent.com)

Proposed fix
 import {
+  createTheme,
   twoLineClampMarkdownTheme,
   unifiedListMarkdownTheme,
 } from '`@core/component/LexicalMarkdown/theme`';

+const inlineTwoLineClampMarkdownTheme = createTheme(
+  {
+    root: 'md inline pr-[2px] cursor-default',
+    paragraph: 'md-p text-[1em] inline',
+  },
+  twoLineClampMarkdownTheme
+);
+
...
-          theme={twoLineClampMarkdownTheme}
+          theme={inlineTwoLineClampMarkdownTheme}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<span class="ph-no-capture font-medium text-ink-muted">
<DisplayName id={props.message.senderId} format="firstName" />:{' '}
</span>
<StaticMarkdown
theme={twoLineClampMarkdownTheme}
markdown={
(props.senderFirstName ? `**${props.senderFirstName}:** ` : '') +
props.message.content.trim()
}
markdown={props.message.content.trim()}
import {
createTheme,
twoLineClampMarkdownTheme,
unifiedListMarkdownTheme,
} from '`@core/component/LexicalMarkdown/theme`';
const inlineTwoLineClampMarkdownTheme = createTheme(
{
root: 'md inline pr-[2px] cursor-default',
paragraph: 'md-p text-[1em] inline',
},
twoLineClampMarkdownTheme
);
<span class="ph-no-capture font-medium text-ink-muted">
<DisplayName id={props.message.senderId} format="firstName" />:{' '}
</span>
<StaticMarkdown
theme={inlineTwoLineClampMarkdownTheme}
markdown={props.message.content.trim()}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/features/entity/composed/list-entity/channel.tsx` around lines
109 - 114, Update the StaticMarkdown usage in the message preview so the sender
and content remain in one inline flow. Reuse the repository’s existing inline
markdown theme pattern, ensuring both the markdown root and paragraph render
inline, and apply it alongside twoLineClampMarkdownTheme without changing the
surrounding sender or content behavior.

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