fix codeRabbit comments

This commit is contained in:
Alan Trebugeais committed 2026-05-09 00:25:40 +02:00
1 parent 7791443098
commit 5fd9db323c
3 files changed
+48 -4

No files matched your search

+10 -1
View File
@@ -1458,8 +1458,17 @@ export function SettingsPanel({
const resetBackgroundSection = () => {
onBackgroundBlurChange?.(initialEditorPreferences.backgroundBlur);
const preferredWallpaper = initialEditorPreferences.wallpaper;
const hasPreferredWallpaper =
(preferredWallpaper && builtInWallpaperPaths.includes(preferredWallpaper)) ||
(preferredWallpaper && extensionWallpaperPaths.includes(preferredWallpaper)) ||
(preferredWallpaper && customImages.includes(preferredWallpaper)) ||
(preferredWallpaper && isHexWallpaper(preferredWallpaper)) ||
(preferredWallpaper && GRADIENTS.includes(preferredWallpaper));
onWallpaperChange(
initialEditorPreferences.wallpaper ||
(hasPreferredWallpaper ? preferredWallpaper : "") ||
builtInWallpaperPaths[0] ||
extensionWallpaperPaths[0] ||
BUILT_IN_WALLPAPERS[0]?.publicPath ||
+38 -1
View File
@@ -74,6 +74,31 @@ function getContributedCursorStylesSignature() {
.join("|");
}
function getRegisteredFramesSignature() {
return extensionHost
.getFrames()
.map(
(frame) =>
`${frame.id}:${frame.filePath}:${frame.thumbnailPath}:${frame.appearance ?? ""}`,
)
.sort()
.join("|");
}
function getExtensionSettingsSignature() {
return extensionHost
.getSettingsPanels()
.flatMap((registeredPanel) => {
const { extensionId, panel } = registeredPanel;
return panel.fields.map((field) => {
const value = extensionHost.getExtensionSetting(extensionId, field.id);
return `${extensionId}:${panel.id}:${field.id}:${JSON.stringify(value)}`;
});
})
.sort()
.join("|");
}
import { extensionHost } from "@/lib/extensions";
import {
mapCursorToCanvasNormalized,
@@ -433,7 +458,19 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
const [frameUpdateCounter, setFrameUpdateCounter] = useState(0);
useEffect(() => {
let framesSignature = getRegisteredFramesSignature();
let settingsSignature = getExtensionSettingsSignature();
return extensionHost.onChange(() => {
const nextFramesSignature = getRegisteredFramesSignature();
const nextSettingsSignature = getExtensionSettingsSignature();
if (
nextFramesSignature === framesSignature &&
nextSettingsSignature === settingsSignature
) {
return;
}
framesSignature = nextFramesSignature;
settingsSignature = nextSettingsSignature;
setFrameUpdateCounter((c) => c + 1);
});
}, []);
@@ -1077,7 +1114,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
return () => {
cancelled = true;
};
}, [frame, frameUpdateCounter]);
}, [aspectRatio, borderRadius, cropRegion, frame, frameUpdateCounter, padding]);
const selectedZoom = useMemo(() => {
if (!selectedZoomId) return null;
-2
View File
@@ -472,7 +472,6 @@ export class ExtensionHost {
borderRadius: layout.borderRadius,
padding: normalizedPadding,
};
this.notifyListeners();
}
setZoomState(
@@ -483,7 +482,6 @@ export class ExtensionHost {
setShadowConfig(config: { enabled: boolean; intensity: number }): void {
this._shadowConfig = config;
this.notifyListeners();
}
setCursorTelemetry(