Skip to content

Commit ef1c124

Browse files
coderabbit and chores
1 parent 0c1e4fe commit ef1c124

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+473
-422
lines changed

apps/desktop/src/components/main/body/shared.tsx

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -112,34 +112,24 @@ export function TabItemBase(
112112
isHovered ? "opacity-100" : "opacity-0",
113113
)}
114114
>
115-
{active
116-
? (
117-
<button
118-
onClick={(e) => {
119-
e.stopPropagation();
120-
handleCloseThis();
121-
}}
122-
className="flex items-center justify-center text-red-600 hover:text-red-700"
123-
>
124-
<span className="w-3 h-3 bg-red-600 hover:bg-red-700 rounded-none transition-colors" />
125-
</button>
126-
)
127-
: (
128-
<button
129-
onClick={(e) => {
130-
e.stopPropagation();
131-
handleCloseThis();
132-
}}
133-
className={cn(
134-
"flex items-center justify-center transition-colors",
135-
selected
136-
? "text-neutral-700 hover:text-neutral-900"
137-
: "text-neutral-500 hover:text-neutral-700",
138-
)}
139-
>
140-
<X size={16} />
141-
</button>
115+
<button
116+
onClick={(e) => {
117+
e.stopPropagation();
118+
handleCloseThis();
119+
}}
120+
className={cn(
121+
[
122+
"flex items-center justify-center transition-colors",
123+
active
124+
? "text-red-600 hover:text-red-700"
125+
: selected
126+
? "text-neutral-700 hover:text-neutral-900"
127+
: "text-neutral-500 hover:text-neutral-700",
128+
],
142129
)}
130+
>
131+
<X size={16} />
132+
</button>
143133
</div>
144134
</div>
145135
<span className="truncate">{title}</span>

apps/desktop/src/components/main/sidebar/profile/index.tsx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,27 @@ function ProfileButton(
250250
return (
251251
<button
252252
className={cn(
253-
"flex w-full items-center gap-2.5",
254-
"px-4 py-2",
255-
"text-left",
256-
"transition-all duration-300",
257-
"hover:bg-neutral-100",
258-
isExpanded && "bg-neutral-50 border-t border-neutral-100",
253+
[
254+
"flex w-full items-center gap-2.5",
255+
"px-4 py-2",
256+
"text-left",
257+
"transition-all duration-300",
258+
"hover:bg-neutral-100",
259+
isExpanded && "bg-neutral-50 border-t border-neutral-100",
260+
],
259261
)}
260262
onClick={onClick}
261263
>
262264
<div
263265
className={cn(
264-
"flex size-8 flex-shrink-0 items-center justify-center",
265-
"overflow-hidden rounded-full",
266-
"border border-white/60 border-t border-neutral-400",
267-
"bg-gradient-to-br from-indigo-400 to-purple-500",
268-
"shadow-sm",
269-
"transition-transform duration-300",
266+
[
267+
"flex size-8 flex-shrink-0 items-center justify-center",
268+
"overflow-hidden rounded-full",
269+
"border border-white/60 border-t border-neutral-400",
270+
"bg-gradient-to-br from-indigo-400 to-purple-500",
271+
"shadow-sm",
272+
"transition-transform duration-300",
273+
],
270274
)}
271275
>
272276
<img
@@ -281,9 +285,11 @@ function ProfileButton(
281285
<div className="flex items-center gap-1.5">
282286
<ChevronUpIcon
283287
className={cn(
284-
"h-4 w-4",
285-
"transition-transform duration-300",
286-
isExpanded ? "rotate-180 text-neutral-500" : "text-neutral-400",
288+
[
289+
"h-4 w-4",
290+
"transition-transform duration-300",
291+
isExpanded ? "rotate-180 text-neutral-500" : "text-neutral-400",
292+
],
287293
)}
288294
/>
289295
</div>

apps/desktop/src/components/main/sidebar/profile/ota/index.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { clsx } from "clsx";
2-
import { AlertCircle, CheckCircle, Download, RefreshCw, X } from "lucide-react";
3-
41
import { Spinner } from "@hypr/ui/components/ui/spinner";
52
import { cn } from "@hypr/utils";
3+
4+
import { AlertCircle, CheckCircle, Download, RefreshCw, X } from "lucide-react";
5+
66
import { MenuItem } from "../shared";
77
import { useOTA } from "./task";
88

@@ -50,12 +50,8 @@ export function UpdateChecker() {
5050
e.stopPropagation();
5151
handleCheckForUpdate();
5252
}}
53-
className={clsx(
54-
"rounded-full",
55-
"px-2 py-0.5",
56-
"bg-red-50",
57-
"text-xs font-semibold text-red-600",
58-
"hover:bg-red-100",
53+
className={cn(
54+
["rounded-full", "px-2 py-0.5", "bg-red-50", "text-xs font-semibold text-red-600", "hover:bg-red-100"],
5955
)}
6056
>
6157
Retry
@@ -163,10 +159,12 @@ function MenuItemLikeContainer({ children }: { children: React.ReactNode }) {
163159
return (
164160
<div
165161
className={cn(
166-
"flex w-full items-center gap-2.5 rounded-lg",
167-
"px-4 py-1.5",
168-
"text-sm text-black",
169-
"transition-colors hover:bg-neutral-100",
162+
[
163+
"flex w-full items-center gap-2.5 rounded-lg",
164+
"px-4 py-1.5",
165+
"text-sm text-black",
166+
"transition-colors hover:bg-neutral-100",
167+
],
170168
)}
171169
>
172170
{children}

apps/desktop/src/components/settings/billing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function SettingsBilling() {
2424
{PLANS.map((plan, index) => (
2525
<div
2626
key={plan.id}
27-
className={cn(index === 0 && "border-r border-neutral-200")}
27+
className={cn([index === 0 && "border-r border-neutral-200"])}
2828
>
2929
<BillingPlanCard
3030
plan={plan}

apps/desktop/src/components/settings/general/permissions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ function PermissionRow({
2424
const isDenied = status === "denied";
2525

2626
const displayMessage = isAuthorized
27-
? "Good to go :)"
27+
? "Permission granted"
2828
: isDenied
29-
? "You should toggle in the Settings manually"
29+
? "Please enable this permission in System Settings"
3030
: description;
3131

3232
const buttonText = isAuthorized
@@ -38,7 +38,7 @@ function PermissionRow({
3838
return (
3939
<div className="flex items-start justify-between gap-4">
4040
<div className="flex-1">
41-
<div className={cn("flex items-center gap-2 mb-1", !isAuthorized && "text-red-500")}>
41+
<div className={cn(["flex items-center gap-2 mb-1", !isAuthorized && "text-red-500"])}>
4242
{!isAuthorized && <AlertCircleIcon className="size-4" />}
4343
<h3 className="text-sm font-medium">
4444
{title}

apps/desktop/src/components/settings/template/remote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function useSuggestedTemplates(query: string) {
6363
return data.filter((template) => {
6464
const titleMatch = template.title.toLowerCase().includes(lowerQuery);
6565
const categoryMatch = template.category?.toLowerCase().includes(lowerQuery);
66-
const targetsMatch = template.targets?.some((target) => target.toLowerCase().includes(lowerQuery));
66+
const targetsMatch = template.targets?.some((target) => target?.toLowerCase().includes(lowerQuery));
6767

6868
return titleMatch || categoryMatch || targetsMatch;
6969
});

apps/web/src/components/mock-window.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export function MockWindow({
1515
return (
1616
<div
1717
className={cn(
18-
"bg-white shadow-lg border border-neutral-200 border-b-0 overflow-hidden",
19-
isMobile ? "rounded-t-lg" : "w-full max-w-lg rounded-t-xl",
18+
[
19+
"bg-white shadow-lg border border-neutral-200 border-b-0 overflow-hidden",
20+
isMobile ? "rounded-t-lg" : "w-full max-w-lg rounded-t-xl",
21+
],
2022
)}
2123
>
2224
<div className="flex items-center gap-2 px-4 py-3 border-b border-neutral-200 bg-neutral-50">

apps/web/src/components/social-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function SocialCard({
7676
className="hover:opacity-70 transition-opacity"
7777
onClick={(e) => e.stopPropagation()}
7878
>
79-
<svg className={cn("size-5 shrink-0", config.iconColor)} fill="currentColor" viewBox="0 0 24 24">
79+
<svg className={cn(["size-5 shrink-0", config.iconColor])} fill="currentColor" viewBox="0 0 24 24">
8080
<path d={config.iconPath} />
8181
</svg>
8282
</a>

apps/web/src/routes/_view/index.tsx

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -947,26 +947,23 @@ function HowItWorksSection() {
947947
<ul className="space-y-2 text-neutral-700 list-disc pl-4">
948948
<li
949949
className={cn(
950-
"transition-opacity duration-500",
951-
enhancedLines >= 1 ? "opacity-100" : "opacity-0",
950+
["transition-opacity duration-500", enhancedLines >= 1 ? "opacity-100" : "opacity-0"],
952951
)}
953952
>
954953
Sarah presented the new mobile UI update, which includes a streamlined navigation bar and improved
955954
button placements for better accessibility.
956955
</li>
957956
<li
958957
className={cn(
959-
"transition-opacity duration-500",
960-
enhancedLines >= 2 ? "opacity-100" : "opacity-0",
958+
["transition-opacity duration-500", enhancedLines >= 2 ? "opacity-100" : "opacity-0"],
961959
)}
962960
>
963961
Ben confirmed that API adjustments are needed to support dynamic UI changes, particularly for
964962
fetching personalized user data more efficiently.
965963
</li>
966964
<li
967965
className={cn(
968-
"transition-opacity duration-500",
969-
enhancedLines >= 3 ? "opacity-100" : "opacity-0",
966+
["transition-opacity duration-500", enhancedLines >= 3 ? "opacity-100" : "opacity-0"],
970967
)}
971968
>
972969
The UI update will be implemented in phases, starting with core navigation improvements. Ben will
@@ -979,43 +976,38 @@ function HowItWorksSection() {
979976
<ul className="space-y-2 text-neutral-700 list-disc pl-4">
980977
<li
981978
className={cn(
982-
"transition-opacity duration-500",
983-
enhancedLines >= 4 ? "opacity-100" : "opacity-0",
979+
["transition-opacity duration-500", enhancedLines >= 4 ? "opacity-100" : "opacity-0"],
984980
)}
985981
>
986982
Alice emphasized that the new analytics dashboard must be prioritized due to increasing
987983
stakeholder demand.
988984
</li>
989985
<li
990986
className={cn(
991-
"transition-opacity duration-500",
992-
enhancedLines >= 5 ? "opacity-100" : "opacity-0",
987+
["transition-opacity duration-500", enhancedLines >= 5 ? "opacity-100" : "opacity-0"],
993988
)}
994989
>
995990
The new dashboard will feature real-time user engagement metrics and a customizable reporting
996991
system.
997992
</li>
998993
<li
999994
className={cn(
1000-
"transition-opacity duration-500",
1001-
enhancedLines >= 6 ? "opacity-100" : "opacity-0",
995+
["transition-opacity duration-500", enhancedLines >= 6 ? "opacity-100" : "opacity-0"],
1002996
)}
1003997
>
1004998
Ben mentioned that backend infrastructure needs optimization to handle real-time data processing.
1005999
</li>
10061000
<li
10071001
className={cn(
1008-
"transition-opacity duration-500",
1009-
enhancedLines >= 6 ? "opacity-100" : "opacity-0",
1002+
["transition-opacity duration-500", enhancedLines >= 6 ? "opacity-100" : "opacity-0"],
10101003
)}
10111004
>
10121005
Mark stressed that the dashboard launch should align with marketing efforts to maximize user
10131006
adoption.
10141007
</li>
10151008
<li
10161009
className={cn(
1017-
"transition-opacity duration-500",
1018-
enhancedLines >= 6 ? "opacity-100" : "opacity-0",
1010+
["transition-opacity duration-500", enhancedLines >= 6 ? "opacity-100" : "opacity-0"],
10191011
)}
10201012
>
10211013
Development will start immediately, and a basic prototype must be ready for stakeholder review

0 commit comments

Comments
 (0)