Skip to content

New bundle chat initial impl#1559

Merged
yujonglee merged 26 commits intomainfrom
chat-porting
Oct 12, 2025
Merged

New bundle chat initial impl#1559
yujonglee merged 26 commits intomainfrom
chat-porting

Conversation

@yujonglee
Copy link
Contributor

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a new chat system in apps/desktop2 (UI components, session, transport, route), integrates a Chat window in the Tauri/Hypr Windows plugin, introduces a useAutoCloser hook, updates dependencies, removes legacy floating chat/org components, and tweaks navigation/devtools wiring and sidebar/profile logic.

Changes

Cohort / File(s) Summary
Repo metadata & docs
/.gitignore, apps/desktop2/.cursor/rules/style.mdc, packages/nango/.cursor/rules/nango.mdc
Removed ignore entries; added style/cursor rules and a long-form Nango integration guide.
Dependency bumps
apps/desktop/package.json, apps/desktop2/package.json, apps/pro/package.json, apps/web/package.json, /package.json, packages/tiptap/package.json, packages/ui/package.json, packages/utils/package.json, packages/db/package.json
Multiple package version updates and new deps (AI/streaming, re-resizable, tiny tweaks to @types/node).
Desktop (v1) listener cleanup
apps/desktop/src/routes/__root.tsx
Removed Tauri "debug" event listener and its effect.
Chat UI components (new)
apps/desktop2/src/components/chat/body.tsx, .../header.tsx, .../index.tsx, .../input.tsx, .../interactive.tsx, .../session.tsx, .../trigger.tsx, .../view.tsx
New chat components: body (markdown, autoscroll), header (groups/actions/pop-out), floating/button entry, TipTap-based input, draggable/resizable container, session orchestration, and ChatView.
Chat infra (new)
apps/desktop2/src/transport.ts, apps/desktop2/src/store/tinybase/persisted.ts, apps/desktop2/src/styles/globals.css
Added CustomChatTransport (OpenAI-compatible streaming), persisted useConfig now returns user_id, and imported Streamdown stylesheet.
Routing & shell updates
apps/desktop2/src/routes/__root.tsx, apps/desktop2/src/routes/app/chat.tsx, apps/desktop2/src/routes/app/main/_layout.index.tsx, apps/desktop2/src/routes/app.tsx
Sync Tauri/Hypr navigation into TanStack Router, export Devtools const, add /app/chat route, swap old FloatingChatButton to new ChatFloatingButton, and remove manual Sync button.
UX utilities & minor UI tweaks
apps/desktop2/src/hooks/useAutoCloser.ts, apps/desktop2/src/components/main/sidebar/profile/index.tsx, apps/desktop2/src/components/main/sidebar/index.tsx
New useAutoCloser hook (ESC/outside); adopted in Profile; sidebar class composition refactor.
Removals (legacy)
apps/desktop2/src/components/floating-chat-button.tsx, apps/desktop2/src/components/org.tsx
Removed legacy FloatingChatButton and Org editor components.
Windows plugin: Chat window & API
plugins/windows/build.rs, plugins/windows/src/commands.rs, plugins/windows/src/ext.rs, plugins/windows/src/lib.rs, plugins/windows/src/window/v1.rs
Added window_is_exists command/trait method; introduced AppWindow::Chat variant and builder (routes to /app/chat) and registered the command.
Minor UI data change
apps/desktop2/src/components/main/body/sessions/floating-regenerate-button.tsx
Reordered TEMPLATES array entries (no behavioral changes).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Trigger as ChatFloatingButton
  participant Container as InteractiveContainer
  participant View as ChatView
  participant Session as ChatSession
  participant Transport as CustomChatTransport
  participant Model as Local Model (lmstudio)

  User->>Trigger: click open
  Trigger->>Container: open panel
  Container->>View: render UI
  View->>Session: sendMessage(content)
  Session->>Transport: sendMessages(messages, options)
  Transport-->>Model: streamText(...)
  Model-->>Transport: stream chunks
  Transport-->>Session: UI message chunks
  Session-->>View: update messages
  View-->>User: render messages
  alt sustained drag to edge
    Container->>Trigger: onPopOut()
    Trigger->>Windows: request chat window show
    Trigger->>Windows: emit navigate event (delayed)
  end
Loading
sequenceDiagram
  autonumber
  participant Hypr as Hypr Windows Plugin
  participant Webview as Tauri Webview
  participant Router as TanStack Router

  Hypr-->>Webview: emit(navigate {path,search})
  Webview->>Router: useNavigationEvents -> navigate(path, search)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • initial membership implementation #1223 — Overlaps Tauri/Hypr windows and navigation plumbing changes (commands/events/ext), closely related to the new window_is_exists and Chat window.
  • tool support for local llms #1440 — Related to local-LLM transport and streaming tooling; intersects with the new CustomChatTransport and streaming paths.
  • Usechat fix 0924 #1494 — Touches the chat stack (UIMessage types, transport, and chat UI), overlapping with many chat-related additions here.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning No pull request description was provided, leaving reviewers without context or an overview of the changes, which impedes understanding of the PR’s intent. Please add a concise description summarizing the purpose, scope, and key changes of this pull request to guide reviewers and provide context.
Docstring Coverage ⚠️ Warning Docstring coverage is 13.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly highlights the main purpose of the changeset—the initial implementation of a bundled chat feature—and directly relates to the extensive chat-related additions throughout the pull request.

📜 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 c35c33f and 270298f.

⛔ Files ignored due to path filters (7)
  • apps/desktop2/src/routeTree.gen.ts is excluded by !**/*.gen.ts
  • plugins/windows/js/bindings.v1.gen.ts is excluded by !**/*.gen.ts
  • plugins/windows/permissions/autogenerated/commands/window_is_exists.toml is excluded by !plugins/**/permissions/**
  • plugins/windows/permissions/autogenerated/reference.md is excluded by !plugins/**/permissions/**
  • plugins/windows/permissions/default.toml is excluded by !plugins/**/permissions/**
  • plugins/windows/permissions/schemas/schema.json is excluded by !plugins/**/permissions/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (39)
  • .gitignore (0 hunks)
  • apps/desktop/package.json (3 hunks)
  • apps/desktop/src/routes/__root.tsx (0 hunks)
  • apps/desktop2/.cursor/rules/style.mdc (1 hunks)
  • apps/desktop2/package.json (4 hunks)
  • apps/desktop2/src/components/chat/body.tsx (1 hunks)
  • apps/desktop2/src/components/chat/header.tsx (1 hunks)
  • apps/desktop2/src/components/chat/index.tsx (1 hunks)
  • apps/desktop2/src/components/chat/input.tsx (1 hunks)
  • apps/desktop2/src/components/chat/interactive.tsx (1 hunks)
  • apps/desktop2/src/components/chat/session.tsx (1 hunks)
  • apps/desktop2/src/components/chat/trigger.tsx (1 hunks)
  • apps/desktop2/src/components/chat/view.tsx (1 hunks)
  • apps/desktop2/src/components/floating-chat-button.tsx (0 hunks)
  • apps/desktop2/src/components/main/body/sessions/floating-regenerate-button.tsx (1 hunks)
  • apps/desktop2/src/components/main/sidebar/index.tsx (1 hunks)
  • apps/desktop2/src/components/main/sidebar/profile/index.tsx (1 hunks)
  • apps/desktop2/src/components/org.tsx (0 hunks)
  • apps/desktop2/src/hooks/useAutoCloser.ts (1 hunks)
  • apps/desktop2/src/routes/__root.tsx (2 hunks)
  • apps/desktop2/src/routes/app.tsx (0 hunks)
  • apps/desktop2/src/routes/app/chat.tsx (1 hunks)
  • apps/desktop2/src/routes/app/main/_layout.index.tsx (2 hunks)
  • apps/desktop2/src/store/tinybase/persisted.ts (1 hunks)
  • apps/desktop2/src/styles/globals.css (1 hunks)
  • apps/desktop2/src/transport.ts (1 hunks)
  • apps/pro/package.json (1 hunks)
  • apps/web/package.json (2 hunks)
  • package.json (1 hunks)
  • packages/db/package.json (1 hunks)
  • packages/nango/.cursor/rules/nango.mdc (1 hunks)
  • packages/tiptap/package.json (2 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/utils/package.json (2 hunks)
  • plugins/windows/build.rs (1 hunks)
  • plugins/windows/src/commands.rs (1 hunks)
  • plugins/windows/src/ext.rs (2 hunks)
  • plugins/windows/src/lib.rs (1 hunks)
  • plugins/windows/src/window/v1.rs (5 hunks)

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: 5

🧹 Nitpick comments (3)
apps/desktop2/src/hooks/useAutoCloser.ts (1)

1-37: Hook implementation looks solid.

The useAutoCloser hook is well-structured with proper cleanup and dependency management. Both ESC key and outside-click dismissal work correctly.

Optional micro-optimization: The inline options object { enabled: esc } on Line 17 is recreated on every render. You could memoize it with useMemo if you want to avoid potential re-registrations:

+const hotkeyOptions = useMemo(() => ({ enabled: esc }), [esc]);

-useHotkeys("esc", handleClose, { enabled: esc }, [handleClose]);
+useHotkeys("esc", handleClose, hotkeyOptions, [handleClose]);

However, this is a very minor optimization and the current implementation works correctly.

apps/desktop2/src/transport.ts (2)

5-8: Consider making provider configuration dynamic.

The base URL and provider name are currently hardcoded. For better flexibility across environments or different local model setups, consider making these configurable through environment variables or user settings.

Example approach:

const provider = createOpenAICompatible({
  name: process.env.AI_PROVIDER_NAME || "lmstudio",
  baseURL: process.env.AI_BASE_URL || "http://localhost:1234/v1",
});

21-21: Consider making model name configurable.

The model name "local-model" is hardcoded. Consider making it configurable to support different model setups or allow users to switch models.

📜 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 f64efc5 and c35c33f.

⛔ Files ignored due to path filters (7)
  • apps/desktop2/src/routeTree.gen.ts is excluded by !**/*.gen.ts
  • plugins/windows/js/bindings.v1.gen.ts is excluded by !**/*.gen.ts
  • plugins/windows/permissions/autogenerated/commands/window_is_exists.toml is excluded by !plugins/**/permissions/**
  • plugins/windows/permissions/autogenerated/reference.md is excluded by !plugins/**/permissions/**
  • plugins/windows/permissions/default.toml is excluded by !plugins/**/permissions/**
  • plugins/windows/permissions/schemas/schema.json is excluded by !plugins/**/permissions/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (38)
  • .gitignore (0 hunks)
  • apps/desktop/package.json (3 hunks)
  • apps/desktop/src/routes/__root.tsx (0 hunks)
  • apps/desktop2/.cursor/rules/style.mdc (1 hunks)
  • apps/desktop2/package.json (4 hunks)
  • apps/desktop2/src/components/chat/body.tsx (1 hunks)
  • apps/desktop2/src/components/chat/header.tsx (1 hunks)
  • apps/desktop2/src/components/chat/index.tsx (1 hunks)
  • apps/desktop2/src/components/chat/input.tsx (1 hunks)
  • apps/desktop2/src/components/chat/interactive.tsx (1 hunks)
  • apps/desktop2/src/components/chat/session.tsx (1 hunks)
  • apps/desktop2/src/components/chat/trigger.tsx (1 hunks)
  • apps/desktop2/src/components/chat/view.tsx (1 hunks)
  • apps/desktop2/src/components/floating-chat-button.tsx (0 hunks)
  • apps/desktop2/src/components/main/sidebar/index.tsx (1 hunks)
  • apps/desktop2/src/components/main/sidebar/profile/index.tsx (1 hunks)
  • apps/desktop2/src/components/org.tsx (0 hunks)
  • apps/desktop2/src/hooks/useAutoCloser.ts (1 hunks)
  • apps/desktop2/src/routes/__root.tsx (2 hunks)
  • apps/desktop2/src/routes/app.tsx (0 hunks)
  • apps/desktop2/src/routes/app/chat.tsx (1 hunks)
  • apps/desktop2/src/routes/app/main/_layout.index.tsx (2 hunks)
  • apps/desktop2/src/store/tinybase/persisted.ts (1 hunks)
  • apps/desktop2/src/styles/globals.css (1 hunks)
  • apps/desktop2/src/transport.ts (1 hunks)
  • apps/pro/package.json (1 hunks)
  • apps/web/package.json (2 hunks)
  • package.json (1 hunks)
  • packages/db/package.json (1 hunks)
  • packages/nango/.cursor/rules/nango.mdc (1 hunks)
  • packages/tiptap/package.json (2 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/utils/package.json (2 hunks)
  • plugins/windows/build.rs (1 hunks)
  • plugins/windows/src/commands.rs (1 hunks)
  • plugins/windows/src/ext.rs (2 hunks)
  • plugins/windows/src/lib.rs (1 hunks)
  • plugins/windows/src/window/v1.rs (5 hunks)
💤 Files with no reviewable changes (5)
  • apps/desktop2/src/routes/app.tsx
  • .gitignore
  • apps/desktop/src/routes/__root.tsx
  • apps/desktop2/src/components/org.tsx
  • apps/desktop2/src/components/floating-chat-button.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{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/hooks/useAutoCloser.ts
  • plugins/windows/src/lib.rs
  • apps/desktop2/src/components/chat/session.tsx
  • apps/desktop2/src/components/chat/body.tsx
  • apps/desktop2/src/components/chat/interactive.tsx
  • apps/desktop2/src/transport.ts
  • apps/desktop2/src/components/chat/input.tsx
  • apps/desktop2/src/routes/app/main/_layout.index.tsx
  • plugins/windows/build.rs
  • apps/desktop2/src/components/chat/index.tsx
  • apps/desktop2/src/store/tinybase/persisted.ts
  • apps/desktop2/src/components/chat/trigger.tsx
  • apps/desktop2/src/routes/app/chat.tsx
  • apps/desktop2/src/components/chat/header.tsx
  • apps/desktop2/src/routes/__root.tsx
  • plugins/windows/src/ext.rs
  • plugins/windows/src/window/v1.rs
  • apps/desktop2/src/components/main/sidebar/index.tsx
  • apps/desktop2/src/components/chat/view.tsx
  • plugins/windows/src/commands.rs
  • apps/desktop2/src/components/main/sidebar/profile/index.tsx
🧬 Code graph analysis (17)
plugins/windows/src/lib.rs (3)
plugins/windows/js/bindings.v1.gen.ts (1)
  • commands (9-31)
plugins/windows/src/commands.rs (1)
  • window_is_exists (49-55)
plugins/windows/src/ext.rs (2)
  • window_is_exists (129-129)
  • window_is_exists (239-241)
apps/desktop2/src/components/chat/session.tsx (2)
apps/desktop2/src/transport.ts (1)
  • CustomChatTransport (10-40)
apps/desktop2/src/store/tinybase/persisted.ts (1)
  • ChatMessageStorage (128-128)
apps/desktop2/src/components/chat/body.tsx (1)
packages/utils/src/ai.ts (1)
  • UIMessage (25-25)
apps/desktop2/src/components/chat/interactive.tsx (1)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
apps/desktop2/src/transport.ts (1)
packages/utils/src/ai.ts (6)
  • ChatTransport (12-12)
  • UIMessage (25-25)
  • ChatRequestOptions (11-11)
  • UIMessageChunk (26-26)
  • streamText (23-23)
  • convertToModelMessages (13-13)
apps/desktop2/src/components/chat/input.tsx (2)
packages/tiptap/src/transcript/extensions/speaker.ts (1)
  • handleKeyDown (22-148)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
apps/desktop2/src/routes/app/main/_layout.index.tsx (1)
apps/desktop2/src/components/chat/index.tsx (1)
  • ChatFloatingButton (11-56)
apps/desktop2/src/components/chat/index.tsx (4)
apps/desktop2/src/hooks/useAutoCloser.ts (1)
  • useAutoCloser (4-37)
apps/desktop2/src/components/chat/trigger.tsx (1)
  • ChatTrigger (3-28)
apps/desktop2/src/components/chat/interactive.tsx (1)
  • InteractiveContainer (11-177)
apps/desktop2/src/components/chat/view.tsx (1)
  • ChatView (14-135)
apps/desktop2/src/components/chat/trigger.tsx (1)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
apps/desktop2/src/routes/app/chat.tsx (1)
apps/desktop2/src/components/chat/view.tsx (1)
  • ChatView (14-135)
apps/desktop2/src/components/chat/header.tsx (2)
plugins/windows/src/window/v1.rs (1)
  • title (75-82)
packages/ui/src/components/ui/dropdown-menu.tsx (3)
  • DropdownMenu (180-180)
  • DropdownMenuTrigger (194-194)
  • DropdownMenuContent (182-182)
apps/desktop2/src/routes/__root.tsx (2)
apps/desktop2/src/auth.tsx (1)
  • AuthProvider (63-122)
plugins/windows/src/ext.rs (1)
  • navigate (19-41)
plugins/windows/src/ext.rs (4)
plugins/windows/src/commands.rs (1)
  • window_is_exists (49-55)
plugins/windows/src/events.rs (2)
  • window (14-14)
  • window (34-34)
plugins/windows/js/bindings.v1.gen.ts (1)
  • AppWindow (52-52)
plugins/windows/js/bindings.gen.ts (1)
  • AppWindow (49-49)
plugins/windows/src/window/v1.rs (1)
plugins/windows/src/events.rs (3)
  • window (14-14)
  • window (34-34)
  • app (32-32)
apps/desktop2/src/components/chat/view.tsx (7)
plugins/db/js/bindings.gen.ts (1)
  • createChatGroup (124-126)
apps/desktop2/src/store/tinybase/persisted.ts (1)
  • ChatMessageStorage (128-128)
packages/utils/src/ai.ts (1)
  • UIMessage (25-25)
apps/desktop2/src/components/chat/header.tsx (1)
  • ChatHeader (11-70)
apps/desktop2/src/components/chat/session.tsx (1)
  • ChatSession (20-134)
apps/desktop2/src/components/chat/body.tsx (1)
  • ChatBody (6-26)
apps/desktop2/src/components/chat/input.tsx (1)
  • ChatMessageInput (7-89)
plugins/windows/src/commands.rs (1)
plugins/windows/src/ext.rs (2)
  • window_is_exists (129-129)
  • window_is_exists (239-241)
apps/desktop2/src/components/main/sidebar/profile/index.tsx (2)
apps/desktop2/src/store/zustand/tabs.ts (1)
  • useTabs (31-121)
apps/desktop2/src/hooks/useAutoCloser.ts (1)
  • useAutoCloser (4-37)
⏰ 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). (4)
  • GitHub Check: ci (macos, macos-14)
  • GitHub Check: ci (windows, windows-latest)
  • GitHub Check: ci (windows, windows-latest)
  • GitHub Check: ci (macos, macos-14)
🔇 Additional comments (28)
packages/ui/package.json (1)

44-44: Dependency updates look good.

The react-hook-form and @types/node updates are minor version bumps consistent with updates across the monorepo.

Also applies to: 52-52

apps/pro/package.json (1)

13-13: Dependency updates look good.

The version bumps for @modelcontextprotocol/sdk, exa-js, and @types/node are consistent with the broader dependency refresh in this PR.

Also applies to: 16-16, 22-22

packages/utils/package.json (1)

15-15: Dependency updates look good.

The AI SDK package updates align with the new chat transport implementation introduced in this PR.

Also applies to: 24-24

packages/db/package.json (1)

23-23: Dependency update looks good.

The @types/node patch update maintains type definition consistency across the monorepo.

apps/desktop2/src/components/main/sidebar/index.tsx (1)

29-34: Refactor to clsx looks good.

The transition from a static className string to clsx-based composition improves maintainability while preserving the same visual output. The explicit padding handling (p-1 pr-0) is clear and correct.

apps/web/package.json (1)

12-48: Dependency updates look good.

The version bumps across multiple packages are consistent with the broader dependency refresh in this PR. All updates appear to be minor or patch releases.

plugins/windows/src/ext.rs (1)

129-129: New window existence check looks good.

The window_is_exists method follows the existing window management pattern and provides a clean way to check window existence. The implementation correctly returns Ok(true) when the window exists and Ok(false) otherwise.

Also applies to: 239-241

apps/desktop/package.json (1)

42-43: LGTM!

Minor dependency updates are appropriate. All Lingui packages are updated consistently to 5.5.1, maintaining version alignment across the package ecosystem.

Also applies to: 44-45, 91-91, 95-95, 106-108, 115-115

apps/desktop2/src/components/main/sidebar/profile/index.tsx (1)

3-3: LGTM!

The refactor to use useAutoCloser is a good improvement that:

  • Eliminates boilerplate for outside-click and Esc key handling
  • Centralizes auto-close logic in a reusable hook
  • Updates to the versioned plugin import path (/v1)

The hook implementation (verified in context) properly handles both Esc key presses and outside clicks.

Also applies to: 5-6, 21-21

apps/desktop2/package.json (2)

15-16: LGTM!

New dependencies appropriately support the chat feature implementation:

  • @ai-sdk/openai-compatible and @ai-sdk/react: AI SDK for chat functionality
  • ai: Core AI SDK package
  • re-resizable: For draggable/resizable chat container
  • streamdown: For streaming Markdown rendering in chat

Also applies to: 39-39, 44-44, 48-48


26-26: LGTM!

Patch version updates are appropriate and maintain compatibility.

Also applies to: 49-49, 60-60

plugins/windows/build.rs (1)

6-6: LGTM!

The addition of window_is_exists command is correctly registered in the build configuration. Implementation verified in related files (commands.rs, ext.rs, lib.rs).

package.json (1)

7-7: LGTM!

Version update aligns with workspace dependencies (apps/desktop2 uses the same version).

apps/desktop2/src/routes/app/main/_layout.index.tsx (1)

5-5: LGTM!

The component refactor from FloatingChatButton to ChatFloatingButton aligns with the new chat module structure. The new implementation (verified in context) maintains equivalent functionality with enhanced window management (existence checks, pop-out support).

Also applies to: 29-29

plugins/windows/src/lib.rs (1)

55-55: LGTM!

The window_is_exists command is properly registered in the specta builder. Complete implementation chain verified:

  • Build configuration (build.rs)
  • Command implementation (commands.rs)
  • Trait definition and implementation (ext.rs)
  • TypeScript bindings (bindings.v1.gen.ts)
apps/desktop2/src/styles/globals.css (1)

7-7: Verify Lightning CSS @source import
The @source "../../node_modules/streamdown/dist/index.js" directive requires confirming:

  • Your build tool (Vite/PostCSS) supports Lightning CSS’s @source syntax
  • streamdown/dist/index.js actually exports CSS for extraction
    If it doesn’t, import a dedicated .css file or adjust the path.
apps/desktop2/src/store/tinybase/persisted.ts (1)

545-545: LGTM!

Exposing user_id in the return value allows downstream components to access it directly alongside the config object.

packages/tiptap/package.json (1)

24-52: Verify TipTap upgrade compatibility with new chat components.

The TipTap dependencies have been upgraded from 3.6.5 to 3.6.6. Since the new chat UI components (e.g., ChatInput) rely on TipTap, ensure the upgrades work as expected with the newly added features.

plugins/windows/src/commands.rs (1)

47-55: LGTM!

The window_is_exists command follows the same pattern as other window management commands and correctly delegates to the trait implementation.

apps/desktop2/src/components/chat/body.tsx (2)

9-13: LGTM!

The auto-scroll implementation correctly updates scroll position when messages change.


40-61: LGTM!

Message rendering and content extraction from parts is correctly implemented with proper role-based alignment.

apps/desktop2/src/components/chat/view.tsx (4)

27-28: LGTM!

The session key initialization and ref pattern correctly handles both new and existing chat groups.


102-134: LGTM!

The component composition and prop passing are well-structured, with proper error handling and conditional rendering.


92-100: Add missing dependency to useCallback.

The handleSelectChat callback uses setChatGroupId (line 95) but does not include it in the dependency array (line 99).

Apply this diff:

-    [onChatGroupChange],
+    [setChatGroupId, onChatGroupChange],

Likely an incorrect or invalid review comment.


85-90: Add missing dependency to useCallback.

The handleNewChat callback uses setChatGroupId (line 87) but does not include it in the dependency array (line 90).

Apply this diff:

-  }, [onChatGroupChange]);
+  }, [setChatGroupId, onChatGroupChange]);

Likely an incorrect or invalid review comment.

apps/desktop2/src/components/chat/header.tsx (3)

72-90: LGTM!

The ChatActionButton component is a clean, reusable implementation with appropriate styling and accessibility attributes.


165-212: LGTM!

The ChatGroupItem properly handles missing data (lines 176-178) and provides a well-structured chat selection UI with relative time formatting.


24-35: Replace magic 1000ms delay with an explicit event or named constant

The 1000 ms setTimeout risks emitting navigation before the chat window is ready or waiting longer than necessary. Since the current windows plugin doesn’t expose a “window ready” event, either:

  • Extract 1000 into a named constant (e.g. POP_OUT_NAVIGATE_DELAY) and document why that value is required
  • Extend the plugin to emit a ready/show event and listen for it before calling windowEmitNavigate

@yujonglee yujonglee merged commit 9298fcc into main Oct 12, 2025
6 of 7 checks passed
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