Skip to content

feat(wework): 调整输入框布局;修复mac工具栏展示 - #1828

Merged
qdaxb merged 2 commits into
wecode-ai:mainfrom
Micro66:human/macaw-20260709-110015
Jul 9, 2026
Merged

qdaxb merged 2 commits into
wecode-ai:mainfrom
Micro66:human/macaw-20260709-110015

Conversation

@Micro66

@Micro66 Micro66 commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • The desktop chat composer is now a sticky footer within the conversation area, keeping input and status controls visible while scrolling.
    • Dark mode is enabled via the app’s theme class for consistent styling.
  • Bug Fixes

    • Improved system tray rendering and refresh behavior across platforms, including more reliable macOS visuals.
    • Tray icon/usage text sizing and canvas dimensions are now more stable across states.
  • Style

    • Chat markdown heading levels 1–3 now use the primary theme color for clearer hierarchy.
    • Adjusted sidebar worklist spacing for cleaner layout.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84f50bbd-6dcd-4a8e-8ac9-9fcd35ac38aa

📥 Commits

Reviewing files that changed from the base of the PR and between 9489c70 and e17c73e.

📒 Files selected for processing (1)
  • wework/src/components/layout/DesktopSidebar.tsx
✅ Files skipped from review due to trivial changes (1)
  • wework/src/components/layout/DesktopSidebar.tsx

📝 Walkthrough

Walkthrough

Refactors tray icon rendering and update caching in Tauri, moves the desktop composer into a sticky footer inside ScrollableMessageArea, updates assistant markdown heading colors, and enables class-based Tailwind dark mode.

Changes

Tray Visual Rendering Refactor

Layer / File(s) Summary
Tray pixel/color helpers and layout constants
wework/src-tauri/src/lib.rs
Adds tray usage sizing helpers and shared pixel conversion helpers used by tray drawing routines.
Cached tray visual state and update flow
wework/src-tauri/src/lib.rs
Adds TrayVisualSignature and TrayVisualState, refactors tray menu updates through update_tray_visual, enables macOS template mode, and registers tray visual state at startup.

Sticky Composer Footer and Theming

Layer / File(s) Summary
ScrollableMessageArea sticky footer support
wework/src/components/chat/ScrollableMessageArea.tsx, wework/src/components/chat/ScrollableMessageArea.test.tsx
Adds sticky footer props, layout adjustments, resize observation, and conditional scroll button placement with matching component tests.
DesktopWorkbenchMain migrates composer to sticky footer
wework/src/components/layout/DesktopWorkbenchMain.tsx
Removes floating composer measurement and pointer state, updates layout constants, and renders the composer UI through stickyFooter.
DesktopWorkbenchLayout tests updated for sticky footer
wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
Updates layout tests to assert sticky-footer classes, scroll button placement, and queued-message flow instead of floating overlay behavior.
Markdown heading color and Tailwind dark mode
wework/src/components/chat/AssistantMarkdown.tsx, wework/src/components/chat/MessageList.test.tsx, wework/tailwind.config.js, wework/src/test/theme-token-guard.test.ts
Adds text-text-primary to assistant markdown headings and enables class-based Tailwind dark mode with a guard test.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant App as Tauri App
  participant MenuState as set_tray_menu_state
  participant VisualState as TrayVisualState
  participant TrayIcon as System Tray Icon

  App->>MenuState: payload
  MenuState->>MenuState: set menu
  MenuState->>VisualState: derive TrayVisualSignature
  VisualState-->>MenuState: compare cached signature
  alt signature changed
    MenuState->>TrayIcon: update icon
    MenuState->>MenuState: clear title
    MenuState->>VisualState: cache signature
  else signature unchanged
    MenuState->>MenuState: skip redraw
  end
Loading

Possibly related PRs

  • wecode-ai/Wegent#1795: Both PRs modify wework/src-tauri/src/lib.rs tray menu/icon rendering and update logic.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the two main changes: input layout adjustments and mac toolbar rendering fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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