Skip to content

fix(ui): add cursor-pointer to all buttons globally#1182

Merged
Kitenite merged 4 commits into
mainfrom
feat/add-cursor-pointer-to-clickables
Feb 4, 2026
Merged

fix(ui): add cursor-pointer to all buttons globally#1182
Kitenite merged 4 commits into
mainfrom
feat/add-cursor-pointer-to-clickables

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 4, 2026

Summary

  • Adds a global CSS rule (button, [role="button"] { cursor: pointer }) in globals.css instead of sprinkling cursor-pointer on individual button classNames
  • Removes the now-redundant cursor-pointer class from the shared Button component

Supersedes #1087 with a simpler approach — one global rule covers all current and future buttons.

Co-authored-by: samuelswandi samuel.swandi@gmail.com

Summary by CodeRabbit

  • Style

    • Added pointer cursor styling to buttons and button-like controls for clearer affordance.
  • New Features / UI

    • File view search now shows results in a dedicated result layout.
    • New-item and rename inputs repositioned/updated for more consistent create/rename behavior.
  • Bug Fixes

    • Slug availability check now maps status correctly and always resets checking state after lookup.
  • Tests

    • Updated terminal-related tests for improved structure and imports.

Instead of adding cursor-pointer to individual button classNames,
set cursor: pointer on all button and [role="button"] elements
via a single global CSS rule in globals.css.

Also removes the now-redundant cursor-pointer class from the
shared Button component.

Co-authored-by: samuelswandi <samuel.swandi@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Consolidates FilesView rendering for search vs. tree, introduces FileSearchResultItem, moves NewItemInput placement, adds global cursor: pointer for button-like elements, and applies several small formatting/refactors; no public APIs changed. (≤50 words)

Changes

Cohort / File(s) Summary
FilesView rendering & rename/new-item flow
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx
Reworks rendering to separate search results from the normal tree: search results now render FileSearchResultItem; RenameInput receives entry (uses entry.id as key) in search branch; NewItemInput is rendered at top level when newItemMode/newItemParentPath match worktreePath.
Button cursor styling
apps/desktop/src/renderer/globals.css, packages/ui/src/components/ui/button.tsx
Adds cursor: pointer for button and [role="button"] in base CSS. button.tsx only has a whitespace/formatting change to a class string; no behavioral change.
Slug availability check adjustments
apps/desktop/src/renderer/routes/_authenticated/settings/organization/components/OrganizationSettings/components/SlugDialog/SlugDialog.tsx, apps/desktop/src/renderer/routes/create-organization/page.tsx
Switched slug-availability source from result.data?.available to result.data?.status; added a finally to reset isCheckingSlug in create org flow. No exported signature changes.
Minor formatting / tests / keyboard handling
apps/desktop/src/lib/trpc/routers/workspaces/procedures/status.ts, apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/ChangesView/components/CommitInput/CommitInput.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.test.ts
Non-functional edits: if-statement reflow, minor keyboard handler/test refactor to capture handler via object, import changed to type-only for Terminal, and small formatting tweaks. No logic or API changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped through code with nimble feet,
I split the search and tree where they meet,
I nudged the cursor so buttons feel sweet,
Tidied tests and renames, neat and fleet,
A joyous rabbit hums: "This build's a treat!"

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description explains the changes and rationale but does not follow the required template structure with sections like 'Type of Change', 'Testing', etc. Fill out the provided PR template with sections for Type of Change (Refactor), Testing approach, and any other applicable sections to improve clarity.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding global cursor-pointer styling to all button elements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/add-cursor-pointer-to-clickables

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Fly.io Electric (Fly.io) View App
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

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

Caution

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

⚠️ Outside diff range comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx (1)

298-387: ⚠️ Potential issue | 🟠 Major

Search-mode new item creation can lose the input UI.

When isSearching is true, NewItemInput only renders for the root path. If a user chooses “New File/Folder” from a search result in a subfolder, newItemMode is set but no input is rendered (tree branch is hidden). This makes those actions appear broken during search.

Consider rendering NewItemInput in the search branch for non-root parent paths or exiting search when creation starts.

💡 Possible fix (render input in search mode for non-root paths)
-							{isSearching ? (
-								searchResultEntries.length > 0 ? (
-									<div className="flex flex-col">
-										{searchResultEntries.map((entry) =>
-											renameEntry?.path === entry.path ? (
-												<RenameInput
-													key={entry.id}
-													entry={entry}
-													onSubmit={handleRenameSubmit}
-													onCancel={handleRenameCancel}
-												/>
-											) : (
-												<FileSearchResultItem
-													key={entry.id}
-													entry={entry}
-													worktreePath={worktreePath}
-													onActivate={handleFileActivate}
-													onOpenInEditor={handleOpenInEditor}
-													onNewFile={handleNewFile}
-													onNewFolder={handleNewFolder}
-													onRename={handleRename}
-													onDelete={handleDeleteRequest}
-												/>
-											),
-										)}
-									</div>
-								) : (
-									<div className="flex-1 flex items-center justify-center text-muted-foreground text-sm p-4">
-										{isSearchFetching
-											? "Searching files..."
-											: "No matching files"}
-									</div>
-								)
-							) : (
+							{isSearching ? (
+								<>
+									{newItemMode &&
+										newItemParentPath !== worktreePath && (
+											<NewItemInput
+												mode={newItemMode}
+												parentPath={newItemParentPath}
+												onSubmit={handleNewItemSubmit}
+												onCancel={handleNewItemCancel}
+											/>
+										)}
+									{searchResultEntries.length > 0 ? (
+										<div className="flex flex-col">
+											{searchResultEntries.map((entry) =>
+												renameEntry?.path === entry.path ? (
+													<RenameInput
+														key={entry.id}
+														entry={entry}
+														onSubmit={handleRenameSubmit}
+														onCancel={handleRenameCancel}
+													/>
+												) : (
+													<FileSearchResultItem
+														key={entry.id}
+														entry={entry}
+														worktreePath={worktreePath}
+														onActivate={handleFileActivate}
+														onOpenInEditor={handleOpenInEditor}
+														onNewFile={handleNewFile}
+														onNewFolder={handleNewFolder}
+														onRename={handleRename}
+														onDelete={handleDeleteRequest}
+													/>
+												),
+											)}
+										</div>
+									) : (
+										<div className="flex-1 flex items-center justify-center text-muted-foreground text-sm p-4">
+											{isSearchFetching
+												? "Searching files..."
+												: "No matching files"}
+										</div>
+									)}
+								</>
+							) : (

Fix property access on checkSlug response (available → status) and
resolve TypeScript control flow narrowing issue in terminal handler tests.
@Kitenite Kitenite merged commit 2dc91ea into main Feb 4, 2026
4 of 5 checks passed
@Kitenite Kitenite deleted the feat/add-cursor-pointer-to-clickables branch February 4, 2026 16:06
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