Skip to content

chat ui#1579

Merged
yujonglee merged 3 commits intomainfrom
jj-branch-22
Oct 19, 2025
Merged

chat ui#1579
yujonglee merged 3 commits intomainfrom
jj-branch-22

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

📝 Walkthrough

Walkthrough

Removed action buttons from the empty chat body, replaced native buttons with UI Button components in the chat header, and added a controlled Select dropdown plus layout and focus/refocus behavior changes to the chat input UI. (50 words)

Changes

Cohort / File(s) Summary
Empty state cleanup
apps/desktop2/src/components/chat/body/empty.tsx
Removed lucide-react import and deleted the icon-labeled action-button block; component now renders only the image and two text paragraphs.
Header button refactoring
apps/desktop2/src/components/chat/header.tsx
Replaced native <button> elements with Button components from @hypr/ui (using variant="ghost", size="icon"), updated icon sizing to size={16}, and adjusted surrounding layout/classNames to match the Button API.
Input context mode selection & layout
apps/desktop2/src/components/chat/input.tsx
Introduced a controlled Select for context mode (Auto, All Notes, All Tabs, Current Tab) with open-state handling that refocuses the editor on close; replaced several icon buttons with Button components, reorganized controls into left (context/paperclip) and right (mic/send) groups, and adjusted padding/border styling and editor wrapper.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ChatInput as ChatInput
    participant ContextSelect as Select
    participant Editor

    User->>ChatInput: Click context/select button
    ChatInput->>ContextSelect: setOpen(true)
    Note right of ContextSelect #DDEBF7: Select opens (options visible)
    User->>ContextSelect: Choose option / close
    ContextSelect->>ChatInput: onOpenChange(false)
    ChatInput->>Editor: editor?.focus()  -- refocus after close

    User->>ChatInput: Click Send
    ChatInput->>Editor: handleSubmit() -> collect content
    ChatInput->>Editor: clear content / update UI
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Chat right panel expansion #1565: Edits the same chat UI components (chat/header.tsx, chat/input.tsx, chat/body/empty.tsx) and likely overlaps with these UI refactor and layout changes.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "chat ui" is extremely vague and generic, failing to convey meaningful information about the specific changes in the pull request. While the changes are indeed related to chat UI components, the title does not clarify what was actually modified—it could apply to virtually any chat UI update. The specific changes involve replacing native buttons with Button components, updating icon sizes, restructuring layouts, and removing UI elements, none of which are reflected in the minimal two-word title. Consider using a more specific and descriptive title that highlights the primary change, such as "Replace native buttons with Button components in chat UI" or "Refactor chat UI components with updated Button styling and layout." This would help teammates quickly understand the nature of the changeset when scanning pull request history.
Description Check ❓ Inconclusive No pull request description was provided by the author, leaving no information to evaluate against the changeset. Without any description content, it is impossible to determine whether a description would be related to the changes or provide context about the modification's intent, scope, or rationale. Add a pull request description that explains the purpose and scope of the changes. For example, describe that this PR refactors the chat UI components to use Button components from the hypr-ui library instead of native buttons, updates icon sizing, and restructures layouts for consistency across empty.tsx, header.tsx, and input.tsx.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jj-branch-22

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c82979 and 8b3050b.

📒 Files selected for processing (2)
  • apps/desktop2/src/components/chat/header.tsx (9 hunks)
  • apps/desktop2/src/components/chat/input.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/desktop2/src/components/chat/input.tsx
  • apps/desktop2/src/components/chat/header.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci (macos, macos-14)

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
apps/desktop2/src/components/chat/header.tsx (2)

107-121: Pass an array to cn as per coding guidelines.

Line 109 passes a single string to cn, but the coding guidelines require: "Always pass an array to cn when composing Tailwind classNames".

As per coding guidelines.

Apply this diff:

       <Button
         variant="ghost"
-        className="flex items-center gap-2 h-auto px-2 py-1.5 group"
+        className={cn(["flex items-center gap-2 h-auto px-2 py-1.5 group"])}
       >

1-209: Fix dprint formatting issues.

The pipeline indicates this file has dprint formatting violations that need to be resolved.

apps/desktop2/src/components/chat/input.tsx (1)

1-159: Fix dprint formatting issues.

The pipeline indicates this file has dprint formatting violations that need to be resolved.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae5c149 and f8798f6.

📒 Files selected for processing (3)
  • apps/desktop2/src/components/chat/body/empty.tsx (0 hunks)
  • apps/desktop2/src/components/chat/header.tsx (9 hunks)
  • apps/desktop2/src/components/chat/input.tsx (4 hunks)
💤 Files with no reviewable changes (1)
  • apps/desktop2/src/components/chat/body/empty.tsx
🧰 Additional context used
📓 Path-based instructions (2)
apps/desktop2/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (apps/desktop2/.cursor/rules/style.mdc)

apps/desktop2/**/*.{tsx,jsx}: When there are many Tailwind classNames with conditional logic, use the cn utility imported as import { cn } from "@hypr/ui/lib/utils"
Always pass an array to cn when composing Tailwind classNames
Split cn array entries by logical grouping when composing Tailwind classNames

Files:

  • apps/desktop2/src/components/chat/input.tsx
  • apps/desktop2/src/components/chat/header.tsx
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • apps/desktop2/src/components/chat/input.tsx
  • apps/desktop2/src/components/chat/header.tsx
🧬 Code graph analysis (2)
apps/desktop2/src/components/chat/input.tsx (2)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/button.tsx (1)
  • Button (38-69)
apps/desktop2/src/components/chat/header.tsx (1)
packages/ui/src/components/ui/button.tsx (1)
  • Button (38-69)
🪛 GitHub Actions: .github/workflows/fmt.yaml
apps/desktop2/src/components/chat/input.tsx

[error] 1-1: dprint formatting check failed. File is not formatted according to dprint rules.

apps/desktop2/src/components/chat/header.tsx

[error] 1-1: dprint formatting check failed. File is not formatted according to dprint rules.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ci (macos, macos-14)
  • GitHub Check: zizmor
🔇 Additional comments (1)
apps/desktop2/src/components/chat/input.tsx (1)

103-143: LGTM! Well-structured layout with good UX practices.

The two-column layout cleanly separates attachment/context controls from action buttons. The requestAnimationFrame refocus (lines 117-119) is a good practice to prevent focus conflicts when the Select closes.

@yujonglee yujonglee merged commit 354fd66 into main Oct 19, 2025
5 checks passed
@yujonglee yujonglee deleted the jj-branch-22 branch October 19, 2025 07:30
@coderabbitai coderabbitai bot mentioned this pull request Nov 11, 2025
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.

2 participants