Skip to content

Commit 561a546

Browse files
committed
chore: align branch with main
1 parent 9bde0bc commit 561a546

11 files changed

Lines changed: 49 additions & 21 deletions

File tree

apps/server/src/prReview/Layers/PrReview.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Effect, Layer } from "effect";
22
import type {
33
PrConflictAnalysis,
4+
GitHubUserPreview,
45
PrReviewAddThreadInput,
56
PrReviewComment,
67
PrReviewConfig,
@@ -12,9 +13,11 @@ import type {
1213
PrReviewReplyToThreadInput,
1314
PrReviewResolveThreadInput,
1415
PrReviewSearchUsersInput,
16+
PrReviewSearchUsersResult,
1517
PrReviewSummary,
1618
PrReviewUserPreviewInput,
1719
PrSubmitReviewInput,
20+
PrSubmitReviewResult,
1821
PrWorkflowStepRunResult,
1922
} from "@okcode/contracts";
2023
import { GitHubCli } from "../../git/Services/GitHubCli.ts";

apps/web/src/components/CommandPalette.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ function commandScore(command: PaletteCommand, query: string): number {
9292
return best;
9393
}
9494

95+
function sortByCommandScore(
96+
commands: ReadonlyArray<PaletteCommand>,
97+
query: string,
98+
): PaletteCommand[] {
99+
return commands.toSorted((a, b) => commandScore(b, query) - commandScore(a, query));
100+
}
101+
95102
// ── Command palette component ───────────────────────────────────────
96103

97104
export function CommandPalette() {
@@ -344,9 +351,10 @@ function CommandsView() {
344351
// Filter commands by query
345352
const filtered = useMemo(() => {
346353
if (query.length === 0) return commands;
347-
return commands
348-
.filter((cmd) => commandMatchesQuery(cmd, query))
349-
.toSorted((a, b) => commandScore(b, query) - commandScore(a, query));
354+
return sortByCommandScore(
355+
commands.filter((cmd) => commandMatchesQuery(cmd, query)),
356+
query,
357+
);
350358
}, [commands, query]);
351359

352360
// Group filtered commands
@@ -492,7 +500,7 @@ function ProjectsView() {
492500
? projects.filter((p) => fuzzyMatch(query, p.name) || fuzzyMatch(query, p.cwd))
493501
: projects;
494502

495-
return [...filtered].toSorted((a, b) => {
503+
return filtered.toSorted((a, b) => {
496504
const aIndex = mruProjectIds.indexOf(a.id);
497505
const bIndex = mruProjectIds.indexOf(b.id);
498506
if (aIndex >= 0 && bIndex >= 0) return aIndex - bIndex;

apps/web/src/components/PlanChecklist.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const PlanChecklist = memo(function PlanChecklist({
5757
<div className="rounded-xl border border-border/50 bg-background/40">
5858
{items.map((item, index) => (
5959
<PlanChecklistRow
60-
key={item.text}
60+
key={`${item.status}:${item.text}`}
6161
item={item}
6262
index={index}
6363
isLast={index === items.length - 1}

apps/web/src/hooks/useTheme.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import { useCallback, useEffect, useSyncExternalStore } from "react";
2-
import {
3-
applyCustomTheme,
4-
applyFontOverride,
5-
applyRadiusOverride,
6-
getStoredCustomTheme,
7-
initCustomTheme,
8-
removeCustomTheme,
9-
} from "../lib/customTheme";
2+
import { initCustomTheme } from "../lib/customTheme";
103

114
type Theme = "light" | "dark" | "system";
125
type ColorTheme =
@@ -16,7 +9,8 @@ type ColorTheme =
169
| "midnight-clarity"
1710
| "carbon"
1811
| "vapor"
19-
| "cathedral-circuit";
12+
| "cathedral-circuit"
13+
| "custom";
2014

2115
type FontFamily = "dm-sans" | "inter" | "plus-jakarta-sans";
2216

@@ -75,7 +69,8 @@ function getStoredColorTheme(): ColorTheme {
7569
raw === "midnight-clarity" ||
7670
raw === "carbon" ||
7771
raw === "vapor" ||
78-
raw === "cathedral-circuit"
72+
raw === "cathedral-circuit" ||
73+
raw === "custom"
7974
) {
8075
return raw;
8176
}

apps/web/src/routes/_chat.settings.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { SidebarTrigger } from "../components/ui/sidebar";
3939
import { Switch } from "../components/ui/switch";
4040
import { SidebarInset } from "../components/ui/sidebar";
4141
import { Tooltip, TooltipPopup, TooltipTrigger } from "../components/ui/tooltip";
42+
import { CustomThemeDialog } from "../components/CustomThemeDialog";
4243
import { resolveAndPersistPreferredEditor } from "../editorPreferences";
4344
import { isElectron } from "../env";
4445
import { useTheme, COLOR_THEMES, FONT_FAMILIES } from "../hooks/useTheme";
@@ -47,6 +48,19 @@ import {
4748
globalEnvironmentVariablesQueryOptions,
4849
projectEnvironmentVariablesQueryOptions,
4950
} from "../lib/environmentVariablesReactQuery";
51+
import {
52+
applyCustomTheme,
53+
clearFontOverride,
54+
clearRadiusOverride,
55+
clearStoredCustomTheme,
56+
getStoredCustomTheme,
57+
getStoredFontOverride,
58+
getStoredRadiusOverride,
59+
removeCustomTheme,
60+
setStoredFontOverride,
61+
setStoredRadiusOverride,
62+
type CustomThemeData,
63+
} from "../lib/customTheme";
5064
import { serverConfigQueryOptions } from "../lib/serverReactQuery";
5165
import { cn } from "../lib/utils";
5266
import { ensureNativeApi, readNativeApi } from "../nativeApi";

apps/web/src/selection-styles.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ function readSrc(relativePath: string): string {
1616
return readFileSync(resolve(__dirname, relativePath), "utf-8");
1717
}
1818

19-
const gamma = (c: number) => (c <= 0.0031308 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055);
19+
function gamma(c: number): number {
20+
return c <= 0.0031308 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
21+
}
2022

2123
// ═══════════════════════════════════════════════════════════════════════════
2224
// oklch → sRGB conversion (used for WCAG contrast checks)

apps/web/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"lib": ["ES2023", "DOM", "DOM.Iterable"],
77
"types": ["vite/client"],
88
"paths": {
9-
"~/*": ["./src/*"]
9+
"effect": ["../../node_modules/effect"],
10+
"effect/*": ["../../node_modules/effect/*"],
11+
"~/*": ["./apps/web/src/*"]
1012
},
1113
"plugins": [
1214
{

bun.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build-desktop-artifact.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,5 +863,5 @@ const buildDesktopArtifactCli = Command.make("build-desktop-artifact", {
863863
Command.run(buildDesktopArtifactCli, { version: "0.0.0" }).pipe(
864864
Effect.scoped,
865865
Effect.provide([Logger.layer([Logger.consolePretty()]), NodeServices.layer]),
866-
(program) => NodeRuntime.runMain(program as Effect.Effect<void, never, never>),
866+
(effect) => NodeRuntime.runMain(effect as never),
867867
);

scripts/dev-runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,5 +555,5 @@ const runtimeProgram = Command.run(devRunnerCli, { version: "0.0.0" }).pipe(
555555
) as Effect.Effect<void, never, never>;
556556

557557
if (import.meta.main) {
558-
NodeRuntime.runMain(runtimeProgram);
558+
NodeRuntime.runMain(runtimeProgram as never);
559559
}

0 commit comments

Comments
 (0)