chore: test deploy snapshot

This commit is contained in:
2026-05-29 18:20:17 +09:00
parent ffbdbf46b6
commit 737ab0a34a

View File

@@ -11,6 +11,7 @@ import { EReaderAppView } from '../../../views/play/apps/e-reader/EReaderAppView
import { import {
findReadyPlayAppEntryById, findReadyPlayAppEntryById,
getReadyPlayAppEntries, getReadyPlayAppEntries,
loadPlayAppEntriesFromServer,
getSupportedPlayAppEnvironments, getSupportedPlayAppEnvironments,
isPlayAppSupportedInEnvironment, isPlayAppSupportedInEnvironment,
type PlayAppEntry, type PlayAppEntry,
@@ -4403,6 +4404,7 @@ export function ChatSharePage() {
const composerFocusScrollTimerIdsRef = useRef<number[]>([]); const composerFocusScrollTimerIdsRef = useRef<number[]>([]);
const [isComposerViewportCompacted, setIsComposerViewportCompacted] = useState(false); const [isComposerViewportCompacted, setIsComposerViewportCompacted] = useState(false);
const [appLaunchUsage, setAppLaunchUsage] = useState<ShareAppLaunchUsageMap>(() => readShareAppLaunchUsage()); const [appLaunchUsage, setAppLaunchUsage] = useState<ShareAppLaunchUsageMap>(() => readShareAppLaunchUsage());
const [playAppEntriesRevision, setPlayAppEntriesRevision] = useState(0);
minimizedProgramsRef.current = minimizedPrograms; minimizedProgramsRef.current = minimizedPrograms;
hasSnapshotRef.current = snapshot != null; hasSnapshotRef.current = snapshot != null;
@@ -4411,6 +4413,20 @@ export function ChatSharePage() {
const isRoomSwitchingRef = useRef(isRoomSwitching); const isRoomSwitchingRef = useRef(isRoomSwitching);
isRoomSwitchingRef.current = isRoomSwitching; isRoomSwitchingRef.current = isRoomSwitching;
useEffect(() => {
let active = true;
void loadPlayAppEntriesFromServer().then(() => {
if (active) {
setPlayAppEntriesRevision((current) => current + 1);
}
});
return () => {
active = false;
};
}, []);
useLayoutEffect(() => { useLayoutEffect(() => {
const pendingStage = pendingSnapshotPerfStageRef.current; const pendingStage = pendingSnapshotPerfStageRef.current;
@@ -4427,6 +4443,7 @@ export function ChatSharePage() {
}, [snapshot]); }, [snapshot]);
const shareTokenSetting = snapshot?.share.tokenSetting ?? null; const shareTokenSetting = snapshot?.share.tokenSetting ?? null;
const shareReadyPlayAppEntries = useMemo(() => getReadyPlayAppEntries(), [playAppEntriesRevision]);
const shareAllowedAppIdSet = useMemo( const shareAllowedAppIdSet = useMemo(
() => buildShareAllowedAppIdSet(shareTokenSetting?.allowedAppIds, snapshot?.share.permissions), () => buildShareAllowedAppIdSet(shareTokenSetting?.allowedAppIds, snapshot?.share.permissions),
[shareTokenSetting?.allowedAppIds, snapshot?.share.permissions], [shareTokenSetting?.allowedAppIds, snapshot?.share.permissions],
@@ -4531,8 +4548,8 @@ export function ChatSharePage() {
[shareRuntimeQueuedItems, shareRuntimeRecentItems, shareRuntimeRunningItems], [shareRuntimeQueuedItems, shareRuntimeRecentItems, shareRuntimeRunningItems],
); );
const allowedPlayAppEntries = useMemo( const allowedPlayAppEntries = useMemo(
() => getReadyPlayAppEntries().filter((entry) => shareAllowedAppIdSet.has(entry.id)), () => shareReadyPlayAppEntries.filter((entry) => shareAllowedAppIdSet.has(entry.id)),
[shareAllowedAppIdSet], [shareAllowedAppIdSet, shareReadyPlayAppEntries],
); );
const sortedAllowedPlayAppEntries = useMemo( const sortedAllowedPlayAppEntries = useMemo(
() => [...allowedPlayAppEntries].sort((left, right) => ( () => [...allowedPlayAppEntries].sort((left, right) => (