Skip to content

fix(wework): unify project space tooltips - #2607

Merged
qdaxb merged 3 commits into
mainfrom
fix/unify-wework-tooltips
Aug 12, 2026
Merged

qdaxb merged 3 commits into
mainfrom
fix/unify-wework-tooltips

Conversation

@qdaxb

@qdaxb qdaxb commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replace native title tooltips and missing hints across project-space controls with the shared Tooltip component
  • render shared tooltips through a portal with viewport collision handling so clipped sidebars, cards, and tables do not hide them
  • preserve localized aria-label values and document the durable tooltip rule

Root cause

Project-space controls used three different hint patterns: native browser titles, the shared Tooltip, or no visible hint. The shared Tooltip also rendered inside its trigger container, so overflow clipping prevented consistent reuse in compact panels.

Validation

  • pnpm --filter wework exec eslint <changed files>
  • pnpm --filter wework typecheck
  • pnpm --filter wework test src/components/ui/tooltip.test.tsx src/features/todo/CloudTodoWorkspace.test.tsx src/features/todo/ProjectSpaceChatSidebar.test.tsx (61 tests)
  • pnpm --filter wework test src/features/todo/CloudFilesView.test.tsx
  • pre-push Wework ESLint, TypeScript, and full unit-test suite
  • isolated Tauri app started successfully; interactive verification was blocked after startup by local executor/Cargo lock contention and unavailable backend at 127.0.0.1:8000

Summary by CodeRabbit

  • New Features

    • Added consistent tooltips to compact controls across navigation, projects, tasks, files, conversations, and window controls.
    • Tooltips provide localized labels, reveal truncated content, and clarify actions such as copying, renaming, opening, deleting, and creating items.
    • Improved tooltip positioning so messages remain visible within clipped or scrollable areas.
  • Accessibility

    • Preserved accessible names for icon-only controls while replacing native browser title popups with consistent guidance.
  • Bug Fixes

    • Tooltips now hide correctly after pointer exit, Escape, scrolling, or resizing.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7580698d-0eae-46b7-9e3b-dc9e11eebdd9

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce0c4b and 41ffd4c.

📒 Files selected for processing (8)
  • wework/src/components/ui/tooltip.test.tsx
  • wework/src/components/ui/tooltip.tsx
  • wework/src/features/todo/CloudFilesView.tsx
  • wework/src/features/todo/CloudProjectManageView.tsx
  • wework/src/features/todo/CloudTodoBoardCard.tsx
  • wework/src/features/todo/CloudTodoWorkspace.tsx
  • wework/src/i18n/locales/en/common.json
  • wework/src/i18n/locales/zh-CN/common.json
📝 Walkthrough

Walkthrough

The shared Tooltip now renders delayed, viewport-aware overlays through a body portal. Desktop and Todo controls replace native title hints with localized tooltip labels while preserving existing actions and accessibility attributes.

Changes

Tooltip adoption

Layer / File(s) Summary
Shared portal tooltip behavior
wework/DESIGN.md, wework/src/components/ui/tooltip.tsx, wework/src/components/ui/tooltip.test.tsx
The shared Tooltip uses body portals, measured positioning, viewport clamping, side flipping, and dismissal cleanup. Tests cover delayed rendering, pointer leave, Escape, and overflow containers.
Desktop window control tooltips
wework/src/components/layout/DesktopWindowControls.tsx
Sidebar toggle and conditional new-chat controls use bottom-start tooltips.
Todo control tooltip coverage
wework/src/features/todo/CloudFilesView.tsx, wework/src/features/todo/CloudProjectManageView.tsx, wework/src/features/todo/CloudProjectsHome.tsx, wework/src/features/todo/CloudTodoBoardCard.tsx, wework/src/features/todo/CloudTodoWorkspace.tsx, wework/src/features/todo/ProjectSpaceChatSidebar.tsx
Todo controls use shared tooltips for actions, truncated content, copy state, and localized labels. Existing handlers and accessibility attributes remain unchanged.

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

Sequence Diagram(s)

sequenceDiagram
  participant TooltipTrigger
  participant Tooltip
  participant document.body
  TooltipTrigger->>Tooltip: pointer enter
  Tooltip->>document.body: render delayed portaled tooltip
  Tooltip->>Tooltip: measure and clamp position
  TooltipTrigger->>Tooltip: pointer leave or Escape
  Tooltip->>document.body: remove tooltip
Loading

Possibly related PRs

Suggested reviewers: micro66

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: standardizing project-space tooltips.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/unify-wework-tooltips

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

🤖 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 `@wework/src/components/ui/tooltip.tsx`:
- Around line 134-137: Update the tooltip className in the tooltip component to
remove whitespace-nowrap and add wrapping and word-breaking utilities, keeping
long unbroken labels such as entry.relative_path inside the max-width and
viewport padding. Read and follow DESIGN.md before making this UI behavior
change.
- Around line 23-25: Read DESIGN.md, then update the tooltip interaction
implementation around SHOW_DELAY_MS to record recent tooltip dismissal and apply
the required 300ms warm handoff when moving between nearby tooltips, while
preserving the existing 700ms delay for initial activation and the current
viewport padding and trigger gap behavior.

In `@wework/src/features/todo/CloudFilesView.tsx`:
- Around line 242-279: Replace the static Chinese tooltip and action labels with
the local `@/hooks/useTranslation` wrapper and add matching keys in both
src/i18n/locales/en/ and src/i18n/locales/zh-CN/. Apply this to
rename/open/delete labels in wework/src/features/todo/CloudFilesView.tsx:242-279
and delivery-file labels in CloudFilesView.tsx:310-341; member removal and
rename confirmation/cancellation labels in
wework/src/features/todo/CloudProjectManageView.tsx:485-495 and :607-624;
task-actions labels in wework/src/features/todo/CloudTodoBoardCard.tsx:179-193;
task-search and task-creation labels in
wework/src/features/todo/CloudTodoWorkspace.tsx:2098-2142; and column
task-creation labels in CloudTodoWorkspace.tsx:2419-2435.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 004b0403-b889-44fe-adc1-06a4cab43664

📥 Commits

Reviewing files that changed from the base of the PR and between 09aa68b and 1ce0c4b.

📒 Files selected for processing (10)
  • wework/DESIGN.md
  • wework/src/components/layout/DesktopWindowControls.tsx
  • wework/src/components/ui/tooltip.test.tsx
  • wework/src/components/ui/tooltip.tsx
  • wework/src/features/todo/CloudFilesView.tsx
  • wework/src/features/todo/CloudProjectManageView.tsx
  • wework/src/features/todo/CloudProjectsHome.tsx
  • wework/src/features/todo/CloudTodoBoardCard.tsx
  • wework/src/features/todo/CloudTodoWorkspace.tsx
  • wework/src/features/todo/ProjectSpaceChatSidebar.tsx

Comment thread wework/src/components/ui/tooltip.tsx Resolved
Comment thread wework/src/components/ui/tooltip.tsx Resolved
@qdaxb
qdaxb force-pushed the fix/unify-wework-tooltips branch from 1ce0c4b to 41ffd4c Compare August 12, 2026 06:33
@qdaxb
qdaxb added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 46307b3 Aug 12, 2026
69 of 71 checks passed
@qdaxb
qdaxb deleted the fix/unify-wework-tooltips branch August 12, 2026 07:14
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