Skip to content

Use fade-out effect for workspace tab text overflow + make input more aesthetic#226

Merged
Kitenite merged 2 commits intomainfrom
indigo-wind-7
Dec 1, 2025
Merged

Use fade-out effect for workspace tab text overflow + make input more aesthetic#226
Kitenite merged 2 commits intomainfrom
indigo-wind-7

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 1, 2025

Summary

  • Replace ellipsis truncation with gradient mask fade for workspace tab names
  • Creates a cleaner visual effect when tab names overflow

Test plan

  • Open desktop app with multiple workspaces
  • Verify long workspace names fade out smoothly instead of showing "..."

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Rename fields now use an enhanced input with a lightweight "ghost" appearance for a cleaner edit experience.
  • Style

    • Improved workspace title truncation using a subtle right-edge gradient mask for smoother visual fading and consistent layout.

✏️ Tip: You can customize this high-level summary in your review settings.

Replace ellipsis truncation with gradient mask fade for cleaner
overflow handling on workspace tab names.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Dec 1, 2025 11:31pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 1, 2025

Walkthrough

Replaces native inputs with a variant-aware Input component and adds a ghost variant; updates title truncation to use an overflow-hidden element with a rightward gradient CSS mask. Changes touch workspace tab UIs and the shared Input component API and styling.

Changes

Cohort / File(s) Summary
Workspace top-bar tab UI
apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
Replaced native rename input with the shared Input (ghost variant) and changed title truncation from a simple truncate class to overflow-hidden plus CSS maskImage / -webkit-mask-image gradient for fade/truncation.
Sidebar tab item UI
apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
Replaced native rename <input> with the shared Input component; removed explicit type="text", added variant="ghost", and simplified className/styling for the rename field.
Shared UI input component
packages/ui/src/components/input.tsx
Introduced inputVariants (including default and ghost), added InputProps interface with optional variant, and updated Input to accept variant (default "default") and compute classes via cn(inputVariants[variant], className) instead of a single hard-coded class string.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review packages/ui/src/components/input.tsx for correct typing, variant mapping, and class composition behavior.
  • Verify usages in both WorkspaceItem.tsx and TabItem/index.tsx handle ref, events, and accessibility same as previous native inputs.
  • Check CSS mask fallback/compatibility and visual regressions across breakpoints and long titles.
  • Confirm no regressions in rename flow, focus/blur behavior, and screen-reader announcements.

Poem

🐇 I nibble at classes, trim a line of code,
A ghostly input hops along the road.
Titles now fade with a gentle sigh,
Rename and sparkle — a carrot in the sky! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 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.
Description check ❓ Inconclusive The description is incomplete relative to the template; it lacks required sections including Related Issues, Type of Change, Testing details, and Additional Notes. Complete the description by filling in all template sections, particularly documenting the Type of Change (appears to be a mix of Refactor and New Feature) and expanding the Testing section with specific verification steps.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: replacing ellipsis truncation with a fade-out effect for workspace tabs and updating input styling.
✨ 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 indigo-wind-7

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a91288c and 7dd6483.

📒 Files selected for processing (3)
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx (2 hunks)
  • packages/ui/src/components/input.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid using any type - use explicit types instead for type safety
Use camelCase for variable and function names following existing codebase patterns
Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications
Follow existing patterns and match the codebase style when writing new code

Files:

  • packages/ui/src/components/input.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
**/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/components/**/*.tsx: Create one folder per component with structure: ComponentName/ComponentName.tsx + index.ts for barrel export
Co-locate tests next to the component file they test (e.g., ComponentName.test.tsx)
Co-locate dependencies (utils, hooks, constants, config, stories) next to the file using them
Use nested components/ subdirectory within a parent component only if a sub-component is used 2+ times within that parent; otherwise keep it in the parent's components/ folder
One component per file - avoid multi-component files

Files:

  • packages/ui/src/components/input.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
packages/ui/src/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Use shadcn/ui components and TailwindCSS v4 for all UI component styling in the shared UI package

Files:

  • packages/ui/src/components/input.tsx
apps/desktop/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: Please use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net, etc.) in renderer process code - browser environment only

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
apps/desktop/src/renderer/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Call IPC methods using window.ipcRenderer.invoke() with object parameters - TypeScript will infer the exact response type automatically

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
🧠 Learnings (3)
📚 Learning: 2025-11-28T01:03:47.963Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T01:03:47.963Z
Learning: Applies to packages/ui/src/**/*.tsx : Use shadcn/ui components and TailwindCSS v4 for all UI component styling in the shared UI package

Applied to files:

  • packages/ui/src/components/input.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
📚 Learning: 2025-11-28T01:03:47.963Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T01:03:47.963Z
Learning: Applies to **/*.{ts,tsx} : Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
📚 Learning: 2025-11-24T21:33:13.267Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-11-24T21:33:13.267Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : Please use alias as defined in `tsconfig.json` when possible

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
🧬 Code graph analysis (3)
packages/ui/src/components/input.tsx (1)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx (1)
packages/ui/src/components/input.tsx (1)
  • Input (29-29)
apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx (1)
packages/ui/src/components/input.tsx (1)
  • Input (29-29)
⏰ 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: Build
🔇 Additional comments (8)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/TabItem/index.tsx (2)

2-2: LGTM: Clean import from shared UI package.

The Input component import follows the project's alias convention and aligns with the shared component pattern.


136-145: LGTM: Consistent adoption of the ghost variant.

The refactor correctly replaces the native input with the shared Input component using the ghost variant. The simplified className is appropriate since the variant now handles the base styling, while preserving the layout behavior.

apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx (3)

2-2: LGTM: Appropriate shared component import.


116-126: LGTM: Consistent refactor with appropriate styling.

The Input component adoption matches the pattern in TabItem. The min-w-0 in the className is a good practice for flex items that need to allow text truncation.


129-137: LGTM: Effective gradient mask implementation for fade-out effect.

The gradient mask approach successfully replaces ellipsis truncation with a smooth fade. Using both maskImage and WebkitMaskImage ensures broad compatibility. Since this is an Electron app using modern Chromium, browser support is not a concern.

packages/ui/src/components/input.tsx (3)

5-12: LGTM: Well-designed variant system.

The inputVariants object provides a clean separation between default (full-featured input styling) and ghost (minimal inline editing) variants. The default variant preserves all original styling including focus states, disabled states, and accessibility features.


14-16: LGTM: Type-safe variant prop.

The InputProps interface cleanly extends native input props while adding type-safe variant support. Using keyof typeof inputVariants ensures autocomplete and prevents invalid variant values.


18-26: LGTM: Backward-compatible implementation.

The updated Input function correctly applies variant-based styling while maintaining backward compatibility. Defaulting variant to "default" ensures existing usage without the prop continues to work as before.


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
Copy Markdown
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: 0

🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx (1)

128-135: Gradient fade implementation looks good; consider de-duplicating the mask string

The fade-out behavior via maskImage / WebkitMaskImage matches the PR intent and keeps the diff nicely localized. One small polish you might consider is pulling the gradient string into a shared constant so it’s not duplicated and is easier to tweak later:

+const WORKSPACE_TITLE_MASK =
+  "linear-gradient(to right, black calc(100% - 16px), transparent 100%)";
+
 // ...
-        style={{
-          maskImage:
-            "linear-gradient(to right, black calc(100% - 16px), transparent 100%)",
-          WebkitMaskImage:
-            "linear-gradient(to right, black calc(100% - 16px), transparent 100%)",
-        }}
+        style={{
+          maskImage: WORKSPACE_TITLE_MASK,
+          WebkitMaskImage: WORKSPACE_TITLE_MASK,
+        }}

Also, just confirm this renders as expected across the Electron targets you support (mask properties are broadly supported in modern Chromium, but worth a quick visual pass on each platform). Based on learnings, this keeps the change minimal while improving maintainability.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1d8d2c and a91288c.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
apps/desktop/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc

Files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: Please use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary

Files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid using any type - use explicit types instead for type safety
Use camelCase for variable and function names following existing codebase patterns
Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications
Follow existing patterns and match the codebase style when writing new code

Files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
**/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/components/**/*.tsx: Create one folder per component with structure: ComponentName/ComponentName.tsx + index.ts for barrel export
Co-locate tests next to the component file they test (e.g., ComponentName.test.tsx)
Co-locate dependencies (utils, hooks, constants, config, stories) next to the file using them
Use nested components/ subdirectory within a parent component only if a sub-component is used 2+ times within that parent; otherwise keep it in the parent's components/ folder
One component per file - avoid multi-component files

Files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net, etc.) in renderer process code - browser environment only

Files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
apps/desktop/src/renderer/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Call IPC methods using window.ipcRenderer.invoke() with object parameters - TypeScript will infer the exact response type automatically

Files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T01:03:47.963Z
Learning: Applies to **/*.{ts,tsx} : Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications
📚 Learning: 2025-11-28T01:03:47.963Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T01:03:47.963Z
Learning: Applies to **/*.{ts,tsx} : Keep diffs minimal with targeted edits only - avoid unnecessary changes when making modifications

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/WorkspaceItem.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: Build

- Add ghost variant to packages/ui Input component with no background/border/ring
- Use ghost Input variant in workspace tab and sidebar tab rename inputs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Kitenite Kitenite changed the title Use fade-out effect for workspace tab text overflow Use fade-out effect for workspace tab text overflow + make input more aesthetic Dec 1, 2025
@Kitenite Kitenite merged commit 55ea08a into main Dec 1, 2025
6 of 7 checks passed
@Kitenite Kitenite deleted the indigo-wind-7 branch December 1, 2025 23:33
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