Skip to content

fix(desktop): remove viewed checkboxes from v2 diff sidebar#3480

Merged
AviPeltz merged 10 commits into
mainfrom
calico-wrench
Apr 16, 2026
Merged

fix(desktop): remove viewed checkboxes from v2 diff sidebar#3480
AviPeltz merged 10 commits into
mainfrom
calico-wrench

Conversation

@AviPeltz
Copy link
Copy Markdown
Collaborator

@AviPeltz AviPeltz commented Apr 15, 2026

Summary

  • Removes the "viewed" checkboxes from the v2 diff viewer sidebar file list
  • Cleans up viewedSet/onSetViewed props through the component chain (FileRowChangesFileListChangesTabContentuseChangesTab)
  • Deletes the now-unused partitionByViewed utility

Test plan

  • Open a v2 workspace with file changes
  • Verify the sidebar file list no longer shows checkboxes
  • Verify clicking a file row still opens the diff

Summary by cubic

Removed the “viewed” checkboxes and updated the v2 diff sidebar to match v1. Changes (default) and Files are the top tabs; Review now lives under Changes with Diffs, uses v1 icons (LuGitCompareArrows, LuFile), compacts to icon-only under 200px with tooltips, centers the empty Review state, and the sidebar remembers your last tab and subtab.

  • Refactors
    • Removed viewedSet/onSetViewed and the partitionByViewed utility; FileRow is now a single clickable row.
    • Matched v1 tab styles using getSidebarHeaderTabButtonClassName and sidebarHeaderTabTriggerClassName; added count badges on Diffs/Review.
    • Persisted activeTab and changesSubtab in the workspace local state schema; lowered the compact breakpoint to 200px; simplified WorkspaceSidebar (removed unnecessary memoization) and fixed a duplicate key in compact mode.

Written for commit 3207f8f. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor

    • Removed per-file "viewed" tracking and its UI — files are no longer partitioned or visually dimmed as viewed.
  • New Features

    • Sidebar persists active tab and Changes subtab across sessions.
    • "Changes" unified with internal "Diffs" and "Review" subtabs; tab header actions and badges update by subtab.
    • Compact sidebar mode: tab buttons show icons (with tooltips when compact); "All files" label changed to "Files."

The sidebar file list no longer shows checkboxes for marking files as
viewed. Removes the Checkbox component, viewed/onSetViewed props, and
the partitionByViewed utility from the changes sidebar pipeline.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

Removed per-file "viewed" tracking (props, checkbox UI, and partitioning util) so change lists render in original order; added persisted sidebar state with a combined "changes" tab that has internal "diffs"/"review" subtabs, responsive compact header support, and an optional icon on tab definitions.

Changes

Cohort / File(s) Summary
Changes list props & hook
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/ChangesFileList.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesTabContent/ChangesTabContent.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/useChangesTab.tsx
Removed viewedSet and onSetViewed props/usage; stopped computing/using partitionByViewed; file lists now render files in provided order and no longer pass viewed handlers.
File row UI
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/components/FileRow/FileRow.tsx
Removed viewed and onSetViewed props and checkbox UI; replaced outer wrapper with a <button> that calls onSelect; removed viewed-dependent opacity styling.
Partition utility removal
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/utils/partitionByViewed/partitionByViewed.ts, .../index.ts
Deleted partitionByViewed implementation and its re-export from the barrel file.
Sidebar tab & header changes
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/SidebarHeader/SidebarHeader.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/types.ts
Added persisted activeTab and changesSubtab state and gating setters, consolidated tabs into a parent "changes" tab with internal subtabs (diffs/review), introduced compact detection and passed it to SidebarHeader, updated tab button rendering to support icons and tooltips, and added optional icon to SidebarTabDefinition.
Local state schema
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
Extended workspaceLocalStateSchema.sidebarState with activeTab: z.enum(["changes","files"]).default("changes") and changesSubtab: z.enum(["diffs","review"]).default("diffs").

Sequence Diagram(s)

sequenceDiagram
    participant Sidebar as WorkspaceSidebar
    participant Store as CollectionsStore
    participant Header as SidebarHeader
    participant Content as ChangesTabContent
    participant List as ChangesFileList

    Sidebar->>Store: read workspaceLocalState (activeTab, changesSubtab)
    Note right of Store: persisted UI state
    Sidebar->>Header: render(compact, tabs, activeTab)
    Sidebar->>Content: render(selected subtab content)
    Content->>List: render(files)
    List-->>Content: user selects file (onSelect)
    Content-->>Sidebar: notify selection
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I nudged the checkboxes to rest,
Files line up as they were dressed,
One tab now guards two tiny quests,
Compact ears perk—icons impressed. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(desktop): remove viewed checkboxes from v2 diff sidebar' is clear, concise, and accurately summarizes the primary change—removing the viewed checkboxes from the sidebar. It follows conventional commit format and matches the main objective.
Description check ✅ Passed The PR description covers the main changes and test plan, but lacks complete alignment with the template structure and detail on some areas.

✏️ 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 calico-wrench

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 15, 2026

Greptile Summary

This PR removes the "viewed" file-tracking checkbox feature from the v2 diff sidebar file list by propagating the prop deletion cleanly up the component chain (FileRowChangesFileListChangesTabContentuseChangesTab) and deleting the now-unused partitionByViewed utility.

Key changes:

  • FileRow is simplified from a div+nested-button pattern to a single <button>, which also fixes a nested-interactive-element accessibility issue
  • The useViewedFiles hook is correctly retained in DiffPane.tsx where it is still needed for the main diff viewer's viewed-state tracking — the scope of removal is limited to the sidebar file list only
  • useMemo import in ChangesFileList is properly removed along with the sorted-files memo it was powering
  • The partitionByViewed utility (and its barrel export) is fully deleted with no remaining consumers

Confidence Score: 5/5

Safe to merge — clean, well-scoped removal of a UI feature with no logic gaps or regressions.

All prop removals are consistent across the full component chain, the useViewedFiles hook is correctly retained where still needed (DiffPane), the nested-button accessibility issue is fixed as a side-effect, and the deleted partitionByViewed utility has no remaining consumers. No new code paths are introduced and no state is orphaned.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/useChangesTab.tsx Removes useViewedFiles hook and stops passing viewedSet/setViewed down to ChangesTabContent — clean and correct.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesTabContent/ChangesTabContent.tsx Removes viewedSet/onSetViewed from props interface and no longer forwards them to ChangesFileList — consistent with the rest of the cleanup.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/ChangesFileList.tsx Removes viewedSet/onSetViewed props, drops the partitionByViewed sort, and removes unused useMemo import — clean simplification.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/components/FileRow/FileRow.tsx Replaces the div+nested-button pattern with a single button, removes viewed/onSetViewed props and Checkbox import — accessibility improvement and clean removal.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/utils/partitionByViewed/partitionByViewed.ts Deleted — utility no longer needed after viewed-state is removed from the sidebar file list.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before"]
        A1[useChangesTab] -->|viewedSet, setViewed| B1[ChangesTabContent]
        B1 -->|viewedSet, onSetViewed| C1[ChangesFileList]
        C1 -->|partitionByViewed sort| D1[files array]
        D1 -->|viewed, onSetViewed| E1[FileRow]
        E1 --> F1[Checkbox + button nested inside div]
    end

    subgraph After["After"]
        A2[useChangesTab] --> B2[ChangesTabContent]
        B2 --> C2[ChangesFileList]
        C2 --> D2[files array - original order]
        D2 --> E2[FileRow]
        E2 --> F2[Single button element]
    end

    subgraph Retained["useViewedFiles still used in"]
        G[DiffPane.tsx] -->|viewedSet, setViewed| H[DiffFileEntry per file]
    end
Loading

Reviews (1): Last reviewed commit: "fix(desktop): remove viewed checkboxes f..." | Re-trigger Greptile

…nges

Match the v1 sidebar layout: top-level tabs are Changes (GitCompareArrows
icon) and Files (FileText icon). Review is now a subtab within Changes
alongside Diffs, using the same Tabs/TabsTrigger pattern as v1.
Use LuGitCompareArrows and LuFile from react-icons/lu (same as v1),
getSidebarHeaderTabButtonClassName for the top-level tab buttons, and
sidebarHeaderTabTriggerClassName for the Diffs/Review subtabs — matching
the v1 sidebar layout and styling exactly.
Make the tab content wrapper a flex column so TabsContent can fill the
available height, allowing the "Open a pull request" message to center
vertically instead of sticking to the top.
When the sidebar width drops below 250px, the Changes and Files tabs
collapse to icon-only buttons with tooltips, matching v1 behavior.
Uses the same getSidebarHeaderTabButtonClassName compact mode.
Store activeTab (Changes/Files) and changesSubtab (Diffs/Review) in the
workspace local state collection so the sidebar reopens to the same tab
the user last had open.
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.

No issues found across 6 files

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.

🧹 Nitpick comments (2)
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts (1)

40-41: Consider using z.enum for activeTab for stricter validation.

changesSubtab correctly uses z.enum(["diffs", "review"]), but activeTab uses z.string() which accepts any value. Using z.enum(["changes", "files"]) would catch invalid tab IDs early and align with the constrained approach used for changesSubtab.

That said, z.string() is more flexible if you anticipate adding tabs without schema migrations—this is a reasonable trade-off.

♻️ Optional: Constrain activeTab to known values
-		activeTab: z.string().default("changes"),
+		activeTab: z.enum(["changes", "files"]).default("changes"),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts`
around lines 40 - 41, Replace the loose z.string() schema for activeTab with a
z.enum that matches the expected tab IDs to enforce stricter validation: update
the activeTab schema (next to changesSubtab) to use
z.enum(["changes","files"]).default("changes") so invalid tab values are
rejected at validation time while keeping changesSubtab as-is; if you
intentionally want open-ended tabs, leave activeTab as z.string() but add a
comment explaining the choice.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx (1)

28-52: Consider extracting IconButton to its own file.

Per coding guidelines, components should follow "one component per file". IconButton is a small helper, but if it might be reused elsewhere, consider moving it to IconButton/IconButton.tsx with a barrel export.

This is a minor suggestion given it's currently only used within this file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx
around lines 28 - 52, Extract the IconButton component into its own file: create
IconButton/IconButton.tsx exporting the IconButton component (preserve the props
signature: icon: React.ComponentType<{ className?: string }>, tooltip: string,
onClick?: () => void) and keep the JSX using Tooltip, TooltipTrigger,
TooltipContent and Button as-is; add a barrel export (IconButton/index.ts) that
re-exports the component, then update the original file to import { IconButton }
from the new barrel location where IconButton was used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx:
- Around line 28-52: Extract the IconButton component into its own file: create
IconButton/IconButton.tsx exporting the IconButton component (preserve the props
signature: icon: React.ComponentType<{ className?: string }>, tooltip: string,
onClick?: () => void) and keep the JSX using Tooltip, TooltipTrigger,
TooltipContent and Button as-is; add a barrel export (IconButton/index.ts) that
re-exports the component, then update the original file to import { IconButton }
from the new barrel location where IconButton was used.

In
`@apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts`:
- Around line 40-41: Replace the loose z.string() schema for activeTab with a
z.enum that matches the expected tab IDs to enforce stricter validation: update
the activeTab schema (next to changesSubtab) to use
z.enum(["changes","files"]).default("changes") so invalid tab values are
rejected at validation time while keeping changesSubtab as-is; if you
intentionally want open-ended tabs, leave activeTab as z.string() but add a
comment explaining the choice.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b244d4f-ade6-4b66-9b0b-1b52c28b0b9f

📥 Commits

Reviewing files that changed from the base of the PR and between 7e219d1 and 84f97bb.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/SidebarHeader/SidebarHeader.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/types.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/types.ts

- Remove duplicate React key on compact tab button (SidebarHeader)
- Stabilize setActiveTab/setChangesSubtab callbacks via refs so they
  don't bust the combinedChangesTab useMemo on every collection update
- Narrow activeTab schema from z.string() to z.enum(["changes","files"])
  with a runtime guard in the setter
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 (changes from recent commits).

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/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts:40">
P2: Make `activeTab` backward-compatible for persisted data by coercing unknown values to a safe default instead of hard-failing validation.</violation>
</file>

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

sectionId: z.string().uuid().nullable().default(null),
changesFilter: changesFilterSchema.default({ kind: "all" }),
baseBranch: z.string().nullable().default(null),
activeTab: z.enum(["changes", "files"]).default("changes"),
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 15, 2026

Choose a reason for hiding this comment

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

P2: Make activeTab backward-compatible for persisted data by coercing unknown values to a safe default instead of hard-failing validation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts, line 40:

<comment>Make `activeTab` backward-compatible for persisted data by coercing unknown values to a safe default instead of hard-failing validation.</comment>

<file context>
@@ -37,7 +37,7 @@ export const workspaceLocalStateSchema = z.object({
 		changesFilter: changesFilterSchema.default({ kind: "all" }),
 		baseBranch: z.string().nullable().default(null),
-		activeTab: z.string().default("changes"),
+		activeTab: z.enum(["changes", "files"]).default("changes"),
 		changesSubtab: z.enum(["diffs", "review"]).default("diffs"),
 	}),
</file context>
Suggested change
activeTab: z.enum(["changes", "files"]).default("changes"),
activeTab: z.enum(["changes", "files"]).catch("changes").default("changes"),
Fix with Cubic

…orkspaceSidebar

No memo boundaries downstream benefit from stable references, so plain
functions and plain objects are simpler and equivalent.
# Conflicts:
#	apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
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.

🧹 Nitpick comments (2)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx (2)

143-161: Badge visibility logic differs between Diffs and Review.

The Diffs badge renders when changesTab.badge != null (including zero), while the Review badge requires reviewTab.badge != null && reviewTab.badge > 0. This means a "0" badge would show for Diffs but not for Review.

If intentional (e.g., always showing diff count), consider adding a brief comment. Otherwise, align the conditions for consistency.

Option to align badge logic
-							{changesTab.badge != null && (
+							{changesTab.badge != null && changesTab.badge > 0 && (
 								<span className="text-[11px] text-muted-foreground/60 tabular-nums">
 									{changesTab.badge}
 								</span>
 							)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx
around lines 143 - 161, In WorkspaceSidebar (inside the TabsTrigger for "Diffs"
and "Review") the badge visibility logic is inconsistent: the Diffs badge checks
changesTab.badge != null (showing zero), while Review uses reviewTab.badge !=
null && reviewTab.badge > 0 (hides zero). Make them consistent by choosing one
rule and applying it to both triggers (either show when badge != null or show
only when badge > 0); update the checks on changesTab.badge and reviewTab.badge
accordingly and add a brief inline comment next to the chosen condition in
WorkspaceSidebar to indicate that displaying zero is intentional if you opt to
keep that behavior.

28-52: Consider extracting IconButton to its own file.

The coding guidelines suggest keeping one component per file. IconButton could be co-located in a separate file within this component's folder (e.g., IconButton/IconButton.tsx) or moved to a shared location if reused elsewhere.

This is a minor suggestion given the component's small size and single usage.

As per coding guidelines: "/components//*.tsx: Keep one component per file; no multi-component files"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx
around lines 28 - 52, The IconButton inner component should be extracted into
its own file to follow the "one component per file" rule: create a new component
file (e.g., IconButton.tsx next to WorkspaceSidebar) that exports the IconButton
function/component with the same props and JSX, preserve its prop types (icon:
React.ComponentType<{ className?: string }>, tooltip: string, onClick?: () =>
void) and keep the same usage of Tooltip, TooltipTrigger, TooltipContent and
Button; then replace the local IconButton declaration in WorkspaceSidebar.tsx
with an import of the new IconButton and ensure any necessary imports (Tooltip,
TooltipTrigger, TooltipContent, Button, React) are present in the new file and
the parent file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx:
- Around line 143-161: In WorkspaceSidebar (inside the TabsTrigger for "Diffs"
and "Review") the badge visibility logic is inconsistent: the Diffs badge checks
changesTab.badge != null (showing zero), while Review uses reviewTab.badge !=
null && reviewTab.badge > 0 (hides zero). Make them consistent by choosing one
rule and applying it to both triggers (either show when badge != null or show
only when badge > 0); update the checks on changesTab.badge and reviewTab.badge
accordingly and add a brief inline comment next to the chosen condition in
WorkspaceSidebar to indicate that displaying zero is intentional if you opt to
keep that behavior.
- Around line 28-52: The IconButton inner component should be extracted into its
own file to follow the "one component per file" rule: create a new component
file (e.g., IconButton.tsx next to WorkspaceSidebar) that exports the IconButton
function/component with the same props and JSX, preserve its prop types (icon:
React.ComponentType<{ className?: string }>, tooltip: string, onClick?: () =>
void) and keep the same usage of Tooltip, TooltipTrigger, TooltipContent and
Button; then replace the local IconButton declaration in WorkspaceSidebar.tsx
with an import of the new IconButton and ensure any necessary imports (Tooltip,
TooltipTrigger, TooltipContent, Button, React) are present in the new file and
the parent file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 77bfc545-91b2-49fc-a8a3-c46c63e87204

📥 Commits

Reviewing files that changed from the base of the PR and between 735e729 and 3207f8f.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesTabContent/ChangesTabContent.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/useChangesTab.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
💤 Files with no reviewable changes (2)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/useChangesTab.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesTabContent/ChangesTabContent.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts

@AviPeltz AviPeltz merged commit ec45c78 into main Apr 16, 2026
7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

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