Skip to content

Style the no terminals open screen a bit#174

Merged
saddlepaddle merged 3 commits intomainfrom
olive-canyon-50
Nov 28, 2025
Merged

Style the no terminals open screen a bit#174
saddlepaddle merged 3 commits intomainfrom
olive-canyon-50

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Nov 28, 2025

  • WIP
  • WI p
  • WIP - almost nice

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features
    • Redesigned empty terminal view with keyboard shortcuts reference displaying commands for creating new terminals and splitting windows.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 28, 2025

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

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Nov 28, 2025 9:46pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 28, 2025

Walkthrough

The EmptyTabView component's UI has been restructured from a simple centered heading to a comprehensive empty state featuring an icon card, descriptive message, and interactive keyboard shortcut hints displaying relevant hotkeys for terminal and split operations.

Changes

Cohort / File(s) Change Summary
Empty Tab View UI Update
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx
Replaced centered "No Active Tab" UI with compact empty-state layout including icon card, "No terminal open" message, and keyboard shortcuts list. Added imports for Kbd/KbdGroup components, icon asset, and hotkey utilities. Introduced shortcuts array that maps HOTKEYS.NEW_TERMINAL and HOTKEYS.SPLIT_HORIZONTAL to display formatted keyboard hints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Single-file, localized UI change: Modifications are confined to one component with no cross-file logic dependencies
  • Straightforward rendering updates: Shift from static JSX to mapped shortcut rendering is a simple, low-complexity pattern
  • Minimal import additions: New dependencies are cosmetic/display-related (Kbd, KbdGroup, icon) with no business logic

Possibly related PRs

  • conditional render #152: Updates TabsContent's rendering logic to display EmptyTabView when no active tab exists, directly feeding into this component's UI refresh.
  • tabs mangement interaction #105: Originally introduced the EmptyTabView component; this PR extends and refines its visual presentation.

Poem

🐰✨ A tab once bare and oh-so plain,
Now glows with icons, bright and sane!
Shortcuts dance on keyboard keys,
Terminal flows and splits with ease—
Hoppy updates, a UX breeze!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete with only placeholder text and no substantive content in any required sections beyond WIP status lines. Fill in the Description section with details about the UI changes, specify the Type of Change (appears to be a Refactor), and provide Testing details and Screenshots of the new empty-state layout.
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.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Style the no terminals open screen a bit' is specific and clearly refers to the main change of styling the empty tab view component with improved UI.
✨ 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 olive-canyon-50

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

🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx (1)

1-5: LGTM! Clean imports and setup.

The imports follow the codebase guidelines by using the shared/ alias, and the shortcuts constant correctly references valid hotkey definitions.

Optionally, you could add an explicit type annotation for better type safety and documentation:

+import type { HotkeyDefinition } from "shared/hotkeys";
+
-const shortcuts = [HOTKEYS.NEW_TERMINAL, HOTKEYS.SPLIT_HORIZONTAL];
+const shortcuts: HotkeyDefinition[] = [HOTKEYS.NEW_TERMINAL, HOTKEYS.SPLIT_HORIZONTAL];
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2c425b and e082b5b.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.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/WorkspaceView/ContentView/TabsContent/EmptyTabView.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/ContentView/TabsContent/EmptyTabView.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/WorkspaceView/ContentView/TabsContent/EmptyTabView.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/WorkspaceView/ContentView/TabsContent/EmptyTabView.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/ContentView/TabsContent/EmptyTabView.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/ContentView/TabsContent/EmptyTabView.tsx
🧬 Code graph analysis (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx (2)
apps/desktop/src/shared/hotkeys.ts (2)
  • HOTKEYS (28-140)
  • formatKeysForDisplay (169-192)
packages/ui/src/components/kbd.tsx (2)
  • KbdGroup (28-28)
  • Kbd (28-28)
⏰ 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 (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx (1)

9-14: LGTM! Well-structured empty state.

The container layout and icon card styling follow good design patterns with proper use of Tailwind utilities and design tokens.

Comment on lines +17 to +26
{shortcuts.map((shortcut) => (
<div key={shortcut.label} className="flex items-center gap-2">
<KbdGroup>
{formatKeysForDisplay(shortcut.keys).map((key) => (
<Kbd key={key}>{key}</Kbd>
))}
</KbdGroup>
<span>{shortcut.label}</span>
</div>
</div>
))}
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.

⚠️ Potential issue | 🟡 Minor

Minor key uniqueness concern and accessibility opportunity.

The keyboard shortcut rendering logic works correctly for the current shortcuts, but has two areas for improvement:

  1. React key uniqueness (Line 21): The inner map uses the formatted key string as the React key. If a hotkey ever contains duplicate modifiers (e.g., "shift+shift+t"), this would create duplicate keys and trigger React warnings.

  2. Accessibility: The keyboard shortcuts section lacks semantic markup. Screen reader users won't understand that these are actionable keyboard shortcuts.

Consider these improvements:

1. Ensure unique keys by including an index:

-							{formatKeysForDisplay(shortcut.keys).map((key) => (
-								<Kbd key={key}>{key}</Kbd>
+							{formatKeysForDisplay(shortcut.keys).map((key, index) => (
+								<Kbd key={`${key}-${index}`}>{key}</Kbd>
 							))}

2. Add accessibility context:

-			<div className="flex items-center gap-4 text-xs text-muted-foreground">
+			<div 
+				className="flex items-center gap-4 text-xs text-muted-foreground"
+				role="list"
+				aria-label="Available keyboard shortcuts"
+			>
 				{shortcuts.map((shortcut) => (
-					<div key={shortcut.label} className="flex items-center gap-2">
+					<div key={shortcut.label} className="flex items-center gap-2" role="listitem">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{shortcuts.map((shortcut) => (
<div key={shortcut.label} className="flex items-center gap-2">
<KbdGroup>
{formatKeysForDisplay(shortcut.keys).map((key) => (
<Kbd key={key}>{key}</Kbd>
))}
</KbdGroup>
<span>{shortcut.label}</span>
</div>
</div>
))}
{shortcuts.map((shortcut) => (
<div key={shortcut.label} className="flex items-center gap-2">
<KbdGroup>
{formatKeysForDisplay(shortcut.keys).map((key, index) => (
<Kbd key={`${key}-${index}`}>{key}</Kbd>
))}
</KbdGroup>
<span>{shortcut.label}</span>
</div>
))}
🤖 Prompt for AI Agents
In
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/EmptyTabView.tsx
around lines 17-26, the inner map currently uses the formatted key string as the
React key which can collide for duplicated modifiers; change the key to combine
the formatted key and the map index (or another stable unique index) to
guarantee uniqueness. Also make the shortcuts semantic and accessible by
rendering them as a list (e.g., <ul> or an element with role="list" and an
appropriate aria-label) and each shortcut as a list item (e.g., <li>) and ensure
the visual keyboard UI has aria-hidden where needed and the action/label is
available to screen readers (e.g., readable text or aria-label on the list
item).

@saddlepaddle saddlepaddle merged commit f4ae2cd into main Nov 28, 2025
7 checks passed
saddlepaddle added a commit that referenced this pull request Nov 29, 2025
* WIP

* WI
p

* WIP - almost nice
@Kitenite Kitenite deleted the olive-canyon-50 branch November 29, 2025 06:30
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