Skip to content

Commit cbad70c

Browse files
authored
🤖 fix: make Review tab toggles global instead of per-workspace (#491)
The 'Show Read' and 'Uncommitted' toggles in the Review tab were stored per-workspace, requiring users to configure them separately for each workspace. This changes them to global settings that apply across all workspaces. **Changes:** - Storage key `review-include-uncommitted:${workspaceId}` → `review-include-uncommitted` - Storage key `review-show-read:${workspaceId}` → `review-show-read` Users' preferences for these toggles will now persist when switching between workspaces. _Generated with `cmux`_
1 parent cff4cd3 commit cbad70c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/components/RightSidebar/CodeReview/ReviewPanel.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,14 @@ export const ReviewPanel: React.FC<ReviewPanelProps> = ({
154154
// Persist diff base per workspace (falls back to global default)
155155
const [diffBase, setDiffBase] = usePersistedState(`review-diff-base:${workspaceId}`, defaultBase);
156156

157-
// Persist includeUncommitted flag per workspace
157+
// Persist includeUncommitted flag globally
158158
const [includeUncommitted, setIncludeUncommitted] = usePersistedState(
159-
`review-include-uncommitted:${workspaceId}`,
159+
"review-include-uncommitted",
160160
false
161161
);
162162

163-
// Persist showReadHunks flag per workspace
164-
const [showReadHunks, setShowReadHunks] = usePersistedState(
165-
`review-show-read:${workspaceId}`,
166-
true
167-
);
163+
// Persist showReadHunks flag globally
164+
const [showReadHunks, setShowReadHunks] = usePersistedState("review-show-read", true);
168165

169166
// Initialize review state hook
170167
const { isRead, toggleRead, markAsRead, markAsUnread } = useReviewState(workspaceId);

0 commit comments

Comments
 (0)