Skip to content

[codex] simplify workspace controls#3714

Merged
Kitenite merged 2 commits into
mainfrom
simplify-workspace-contro
Apr 25, 2026
Merged

[codex] simplify workspace controls#3714
Kitenite merged 2 commits into
mainfrom
simplify-workspace-contro

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Apr 24, 2026

What changed

  • Replaced the workspace list sidebar dot with always-visible add/remove icon buttons in the same leading column.
  • Removed the trailing action column from the workspace list grid and header.

Why

This keeps the add/remove sidebar control in the position where the sidebar indicator previously appeared and removes the extra row-end action target.

Validation

  • bunx biome check --write apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/constants.ts apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/V2WorkspacesList.tsx apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx
  • bun run --cwd apps/desktop typecheck

Summary by cubic

Replaced the sidebar dot with always-visible add/remove buttons in the first column and removed the trailing action column. Fixed the tooltip and disabled state when trying to remove the current workspace.

  • Refactors
    • Added +/– icon buttons with tooltips in the leading column; disable remove on the current workspace and show a clear “Can’t remove the current workspace” message.
    • Updated the shared grid layout to drop the action column and widen the first column; cleaned up the header markup.

Written for commit 7149187. Summary will update on new commits.

Summary by CodeRabbit

  • Style

    • Simplified the workspaces list header by removing an unnecessary spacer.
    • Moved sidebar action controls (add/remove workspace buttons) to the left of each workspace row for improved visual consistency.
    • Adjusted grid column sizing to optimize list layout.
  • Bug Fixes

    • Prevented removal action when a workspace is the currently active route.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 356125ed-6528-4c20-bdfa-a0944ebe7e0b

📥 Commits

Reviewing files that changed from the base of the PR and between 0e4768e and 7149187.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx

📝 Walkthrough

Walkthrough

Repositions sidebar add/remove controls into the left column of the V2 Workspaces rows, updates the grid column template to enlarge the first column, and removes an unused placeholder span from the column headers.

Changes

Cohort / File(s) Summary
Row UI & interaction
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx
Moves add/remove controls into the left/center area, replaces sidebar-status dot with conditional LuMinus/LuPlus icon buttons wrapped in tooltips (side="right"), disables removal when row is the current route (calls event.preventDefault()), and updates callback deps to include isCurrentRoute.
Grid layout constant
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/constants.ts
Changes V2_WORKSPACES_ROW_GRID template: first column becomes 2.5rem and removes the trailing 2.5rem column sizing in responsive breakpoints; updates associated comment to reflect new column order.
Header cleanup
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/V2WorkspacesList.tsx
Removes an empty placeholder <span /> from the columnHeader header row.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped along the grid so bright,
Swapped dots for buttons left of sight,
A stray span left the scene, away—
Rows now prance in tidy sway. ✨

🚥 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
Title check ✅ Passed The title '[codex] simplify workspace controls' directly and clearly summarizes the main change: simplifying the workspace control mechanism by replacing the sidebar dot with icon buttons.
Description check ✅ Passed The description provides a clear 'What changed' section, explains 'Why', and includes validation steps. However, it lacks proper structure matching the template with missing required sections like Type of Change and Testing details.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch simplify-workspace-contro

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 24, 2026

Greptile Summary

This PR simplifies the workspace list controls by moving the add/remove sidebar action from a hidden trailing column into the always-visible leading column, replacing the small dot indicator. The trailing <span /> placeholder and the corresponding grid column are cleanly removed across all three files.

Confidence Score: 5/5

This PR is safe to merge — it is a clean UI refactor with no logic changes or regressions.

All three files have consistent, matching changes (grid template, header placeholder, and row component). No business logic is altered; only presentation is simplified. No P0 or P1 findings were identified.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx Sidebar dot indicator replaced with always-visible add/remove icon buttons in the leading column; trailing action div removed. Tooltip side correctly updated from left to right for the new position.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/V2WorkspacesList.tsx Removes the empty trailing <span /> grid placeholder that corresponded to the now-deleted action column.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/constants.ts Grid template updated: leading column widened from 1.25rem to 2.5rem to fit the size-7 (1.75rem) button, and the trailing 2.5rem action column removed at all breakpoints.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[V2WorkspaceRow renders] --> B{workspace.isInSidebar?}
    B -- Yes --> C[Leading column: Remove button LuMinus\nTooltip side=right\ndisabled if isCurrentRoute]
    B -- No --> D[Leading column: Add button LuPlus\nTooltip side=right]
    C --> E[Name / Host / Branch / Created columns]
    D --> E
    E --> F[Row click → navigateToV2Workspace]
Loading

Reviews (1): Last reviewed commit: "simplify workspace controls" | Re-trigger Greptile

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx`:
- Around line 136-154: In V2WorkspaceRow replace the native disabled prop on the
Button used inside TooltipTrigger with aria-disabled={isCurrentRoute} so the
Tooltip can open, and modify the onClick to guard against action when disabled
by checking isCurrentRoute (stop propagation/return) before calling
handleRemoveFromSidebar; also apply the visual disabled styles (e.g.,
"cursor-not-allowed" and reduced opacity) conditionally on the Button className
so it looks inert while still allowing pointer events.
🪄 Autofix (Beta)

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

Run ID: 7924c90d-fa28-4b47-a67c-c7a810887513

📥 Commits

Reviewing files that changed from the base of the PR and between 5aab22a and 0e4768e.

📒 Files selected for processing (3)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/V2WorkspacesList.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/constants.ts
💤 Files with no reviewable changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/V2WorkspacesList.tsx

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx:142">
P2: The `disabled` attribute suppresses pointer events, so the Radix UI Tooltip will never show on this button when `isCurrentRoute` is true — exactly the case where the "Can't remove the current workspace" message is intended to appear. Use `aria-disabled={isCurrentRoute}` instead, guard the click handler manually, and add `cursor-not-allowed opacity-50` styles when disabled (this pattern is already established in `CompareBaseBranchPicker.tsx`).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Kitenite Kitenite merged commit 99db5be into main Apr 25, 2026
6 of 7 checks passed
@Kitenite Kitenite deleted the simplify-workspace-contro branch April 25, 2026 00:11
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

MocA-Love pushed a commit to MocA-Love/superset that referenced this pull request Apr 25, 2026
* simplify workspace controls

* fix current workspace remove tooltip
MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 25, 2026
upstream の 10 commits は #426#427 で fork 固有の差分を保ちながら個別に
cherry-pick 取り込み済み。本 merge は ours strategy で **記録だけ** マージ済みに
することで behind=0 を達成し、git 履歴上の追跡を正しくする。

Cherry-pick 取り込み済 (PR #426):
- 5aab22a fix closed picker filters (superset-sh#3702) → cdb52f9
- 99db5be [codex] simplify workspace controls (superset-sh#3714) → f079606
- 186078a fix(chat): prevent ask_user question from shadowing sandbox access prompt (superset-sh#3662) → 09d6b57
- 47893c2 fix desktop workspace creation title clamp (superset-sh#3718) → 6a8c4ae
- 09323ff Add diff pane file viewer action (superset-sh#3715) → 817ed8d
- a5891c6 remove pending launch log (superset-sh#3721) → 0764d03
- c83de0c Add Tiptap table support (superset-sh#3719) → e67a885
- 486b621 [codex] Fix v2 terminal lifecycle after sleep (superset-sh#3711) → b71fbbb (+ #426 内 review fixups)

Cherry-pick 取り込み済 (PR #427):
- e07aef6 feat(desktop): play v2 notification hooks client-side (superset-sh#3675) → 27ac18a
- eae6008 [codex] Port v2 terminal hotkeys to v1 (superset-sh#3724) → 05a77b8 (+ #427 内 Windows .ps1 v2 化)

Fork 固有領域は変更ゼロで保持: 19 tRPC procedures (workspaces.githubExtended)、
AudioScheduler / Aivis TTS / notification-manager、terminal suggestion handler
(新 terminalKeyboardHandler.ts に移植)、TERMINAL_OPTIONS、SUPERSET_WORKSPACE_NAME、
MainWindowEffects、INCEPTION_AUTH_PROVIDER_ID、v1MigrationState、TiptapPromptEditor、
electron-builder.ts (dmg.size="4g", fileAssociations)、Service Status Dashboard、
Linux daemon systemd、Worktree auto-sync、Windows support、DnD scratch route 他。
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