From 68de96cac16652805f3463ab764b97c7967a129f Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Mon, 11 May 2026 21:46:23 +0200 Subject: [PATCH] Last-mile typecheck sweep: 3 small bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GuideToolOngoingView classNames clause: classNames(..., 'chat.roomId' && 'cursor-pointer') — the property name was quoted so the literal string 'chat.roomId' was always-truthy. Unquote to read the actual chat.roomId field. - NavigatorRoomSettingsModTabView: UserProfileIconView userName={ user.userId } put a number into the string-typed userName prop; the right prop for a numeric id is userId. - WiredExtraVariableEchoView resolvedVariableEntries: the inline fallback-entry literal at the bottom of the useMemo got its kind field widened to string (instead of the 'custom' literal needed by IWiredVariablePickerEntry). Lift it into a typed const + rename to namedFallback to avoid the shadowing of the upstream createFallbackVariableEntry result. --- src/components/guide-tool/views/GuideToolOngoingView.tsx | 2 +- .../views/room-settings/NavigatorRoomSettingsModTabView.tsx | 2 +- .../wired/views/extras/WiredExtraVariableEchoView.tsx | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/guide-tool/views/GuideToolOngoingView.tsx b/src/components/guide-tool/views/GuideToolOngoingView.tsx index 3c34631..5c987f4 100644 --- a/src/components/guide-tool/views/GuideToolOngoingView.tsx +++ b/src/components/guide-tool/views/GuideToolOngoingView.tsx @@ -101,7 +101,7 @@ export const GuideToolOngoingView: FC = props => { (isOwnChat(group.userId)) && GetSessionDataManager().userName } { (!isOwnChat(group.userId)) && userName } - { group.messages.map((chat, index) =>
chat.roomId ? TryVisitRoom(chat.roomId) : null }>{ chat.message }
) } + { group.messages.map((chat, index) =>
chat.roomId ? TryVisitRoom(chat.roomId) : null }>{ chat.message }
) } { (isOwnChat(group.userId)) &&
diff --git a/src/components/navigator/views/room-settings/NavigatorRoomSettingsModTabView.tsx b/src/components/navigator/views/room-settings/NavigatorRoomSettingsModTabView.tsx index 100ecad..4ce43fb 100644 --- a/src/components/navigator/views/room-settings/NavigatorRoomSettingsModTabView.tsx +++ b/src/components/navigator/views/room-settings/NavigatorRoomSettingsModTabView.tsx @@ -58,7 +58,7 @@ export const NavigatorRoomSettingsModTabView: FC - + setSelectedUserId(user.userId) }> { user.userName } ); diff --git a/src/components/wired/views/extras/WiredExtraVariableEchoView.tsx b/src/components/wired/views/extras/WiredExtraVariableEchoView.tsx index c41fa3f..43beec4 100644 --- a/src/components/wired/views/extras/WiredExtraVariableEchoView.tsx +++ b/src/components/wired/views/extras/WiredExtraVariableEchoView.tsx @@ -129,7 +129,7 @@ export const WiredExtraVariableEchoView: FC<{}> = () => if(fallbackEntry) return [ fallbackEntry, ...variableEntries ]; if(!fallbackSourceName) return variableEntries; - return [ { + const namedFallback: IWiredVariablePickerEntry = { id: sourceVariableToken, token: sourceVariableToken, label: fallbackSourceName, @@ -139,7 +139,9 @@ export const WiredExtraVariableEchoView: FC<{}> = () => hasValue: true, kind: 'custom', target: sourceTargetType - }, ...variableEntries ]; + }; + + return [ namedFallback, ...variableEntries ]; }, [ fallbackSourceName, sourceTargetType, sourceVariableToken, variableEntries ]); const selectedEntry = useMemo(() => flattenWiredVariablePickerEntries(resolvedVariableEntries).find(entry => (entry.token === sourceVariableToken)) ?? null, [ resolvedVariableEntries, sourceVariableToken ]);