Skip to content

Easier DMs#714

Merged
feruzm merged 2 commits into
developfrom
chats
Mar 23, 2026
Merged

Easier DMs#714
feruzm merged 2 commits into
developfrom
chats

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Mar 23, 2026

Summary by CodeRabbit

  • New Features

    • Added a "Message" button on other users' profile cards to start direct conversations.
    • Direct message conversations now auto-open when triggered from a message link.
  • Style

    • Updated share button styling on the publish success screen (simpler layout and adjusted hover behavior).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 96edceaa-fbe7-4646-94ba-e018ccd4fe09

📥 Commits

Reviewing files that changed from the base of the PR and between ab149f5 and f9dfc0f.

📒 Files selected for processing (2)
  • apps/web/src/app/(dynamicPages)/profile/[username]/_components/profile-card/index.tsx
  • apps/web/src/app/chats/_components/chats-client.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/chats/_components/chats-client.tsx

📝 Walkthrough

Walkthrough

Adds a profile "Message" link to start DMs, parses a dm query param in the chats client to auto-initiate a direct message channel and navigate to it, and simplifies the publish-success share button styling.

Changes

Cohort / File(s) Summary
Profile Messaging UI
apps/web/src/app/(dynamicPages)/profile/[username]/_components/profile-card/index.tsx
Renders an extra "Message" icon button (uses UilCommentDots) linking to /chats?dm=${encodeURIComponent(account?.name ?? "")} when viewing another user's profile; accessibility and title set via i18next.
Chats Client — DM Auto-init
apps/web/src/app/chats/_components/chats-client.tsx
Parses dm search param via useSearchParams(), adds useEffect and useRef logic to auto-trigger direct-channel creation when dm is present and bootstrap succeeded, then navigates to the created channel with router.replace(); resets guard on error.
Publish Success — Styling
apps/web/src/app/publish/_components/publish-success-state.tsx
Removed fixed sizing, circular background, and some utility classes from the share anchor; replaced with simplified brand-color, hover opacity, transition, and explicit SVG sizing classes.

Sequence Diagram(s)

sequenceDiagram
  participant Profile as Profile Card (Client)
  participant Browser as Browser (Router)
  participant Chats as Chats Client Component
  participant API as Backend (Direct Channel API)

  Profile->>Browser: user clicks /chats?dm=alice
  Browser->>Chats: navigate to /chats with dm=alice
  Chats->>Chats: read dm from search params, check bootstrap success
  Chats->>API: POST /direct-channel { target: "alice" }
  API-->>Chats: 200 { channelId }
  Chats->>Browser: router.replace(buildChannelUrl(channelId))
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

patch

Poem

🐰 I hopped from profile to chat with glee,
Clicked a little link — "come talk to me!"
The client whisked a message through the air,
A channel bloomed, then routed me there.
Stylings lightened, and I danced in peace.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Easier DMs' directly reflects the main functionality added: enabling users to initiate direct messages more conveniently from profile cards via a new message button that auto-starts DMs.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chats

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.

coderabbitai[bot]

This comment was marked as resolved.

@feruzm feruzm merged commit 1b6ccce into develop Mar 23, 2026
1 check passed
@feruzm feruzm deleted the chats branch March 23, 2026 08:52
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