feat(studio): redesign LIGHT tab to Lumetri style and fix mobile inpaint freeze with worker proxy and patch cache

This commit is contained in:
2026-10-14 11:01:52 +07:00
parent e9cc2bb15a
commit d52d4c4281
5 changed files with 560 additions and 135 deletions
+8 -1
View File
@@ -29,7 +29,7 @@ import { clearSession, forgetPhoto, loadPhoto, loadState, savePhoto, saveState,
import { analyzeCustomFrame, clearCustomFrame, loadCustomFrame, saveCustomFrame, type CustomFrameData } from './engine/customFrame';
import { keep } from './remember';
import { preloadSuperRes, upscaleJpeg } from './engine/superRes';
import { preloadInpaint } from './engine/inpaint';
import { preloadInpaint, clearInpaintCache } from './engine/inpaint';
import { api, type Photo, type SavedRecipe } from './api';
import { refreshAuth, useAuth } from './auth';
import { TIERS } from './config/tiers';
@@ -1515,6 +1515,7 @@ export function Workspace() {
);
const clearHealSpots = useCallback(() => {
remember();
clearInpaintCache();
// The field is what "this photo was healed" means, so CLEAR drops it rather
// than leaving an empty list behind.
setAdjustment({ heal: undefined });
@@ -1563,6 +1564,7 @@ export function Workspace() {
const editBrushSpots = useCallback(
(spots: (HealSpot | MosaicSpot)[], undo: boolean) => {
if (undo) remember();
clearInpaintCache();
const list = spots.length ? spots : undefined;
if (brushTool === 'mosaic') setAdjustment({ mosaic: list as MosaicSpot[] | undefined });
else setAdjustment({ heal: list as HealSpot[] | undefined });
@@ -4272,6 +4274,11 @@ export function Workspace() {
pro={pro}
onPro={promptPro}
slots={developSlots}
baseFilter={recipe.baseFilter}
onBaseFilterChange={(filter) => {
remember();
setRecipe((prev) => ({ ...prev, baseFilter: filter as Recipe['baseFilter'], isCustom: true }));
}}
/>
</>
) : (