@@ -82,7 +82,9 @@ import { deriveCenteredContentHorizontalPadding, type LayoutVariant } from "../.
8282import {
8383 resolveMarkdownFontSizes ,
8484 resolveNativeMarkdownTypography ,
85+ scaledTypographyLineHeight ,
8586} from "../../lib/appearancePreferences" ;
87+ import { MOBILE_TYPOGRAPHY } from "../../lib/typography" ;
8688import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider" ;
8789import { useAppearanceCodeSurface } from "../settings/appearance/useAppearanceCodeSurface" ;
8890import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons" ;
@@ -124,11 +126,14 @@ function formatMessageTime(input: string): string {
124126const FEED_ITEM_LAYOUT_DURATION_MS = 180 ;
125127
126128// Pre-measurement heights for getFixedItemSize, mirroring renderFeedEntry's
127- // classNames. Both rows hold a single text line shorter than the fixed parts,
128- // so the height is deterministic; a drifted value costs one correction on
129+ // classNames. The fold row's min-h-11 (44px) stays taller than its single
130+ // text-sm line at every supported base font size (26px at the 22pt maximum),
131+ // so its height is a constant; a drifted value costs one correction on
129132// measure, not a persistent offset.
130133const TURN_FOLD_HEIGHT = 56 ; // min-h-11 (44) + mb-3 (12)
131- const WORKING_ROW_HEIGHT = 40 ; // py-1 (8) + text-xs line (16) + mb-4 (16)
134+ // The working row has no min-height clamp — its height follows the scaled
135+ // text-xs line height (see workingRowHeight in ThreadFeed).
136+ const WORKING_ROW_VERTICAL_EXTRAS = 24 ; // py-1 (8) + mb-4 (16)
132137
133138// Entering animations must only play for rows born just now — LegendList
134139// remounts rows when they scroll back into view, and replaying an entrance for
@@ -1319,6 +1324,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
13191324 const headerMaterialVisibleRef = useRef ( false ) ;
13201325 const previousLatestTurnRef = useRef ( props . latestTurn ) ;
13211326 const { width : windowWidth } = useWindowDimensions ( ) ;
1327+ const { appearance } = useAppearancePreferences ( ) ;
13221328 const [ viewportWidth , setViewportWidth ] = useState ( ( ) =>
13231329 props . layoutVariant === "split" ? 0 : windowWidth ,
13241330 ) ;
@@ -1695,7 +1701,11 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
16951701 // scrolling up through unmeasured content corrects each row's height as it
16961702 // mounts — the feed visibly jumps. Fixed sizes make the small chrome rows
16971703 // exact; message rows stay undefined and use LegendList's per-type running
1698- // average once one of their type has been measured.
1704+ // average once one of their type has been measured. Text-driven heights
1705+ // follow the configurable base font size via scaledTypographyLineHeight.
1706+ const workingRowHeight =
1707+ WORKING_ROW_VERTICAL_EXTRAS +
1708+ scaledTypographyLineHeight ( MOBILE_TYPOGRAPHY . label , appearance . baseFontSize ) ;
16991709 const getFixedItemSize = useCallback (
17001710 ( entry : ThreadFeedEntry ) => {
17011711 switch ( entry . type ) {
@@ -1704,18 +1714,18 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
17041714 case "work-toggle" :
17051715 return WORK_GROUP_TOGGLE_HEIGHT ;
17061716 case "working" :
1707- return WORKING_ROW_HEIGHT ;
1717+ return workingRowHeight ;
17081718 case "activity-group" :
17091719 // Expanded rows append a variable detail block — fall back to
17101720 // measurement for those groups.
17111721 return entry . activities . some ( ( activity ) => expandedWorkRows [ activity . id ] )
17121722 ? undefined
1713- : collapsedWorkLogHeight ( entry . activities ) ;
1723+ : collapsedWorkLogHeight ( entry . activities , appearance . baseFontSize ) ;
17141724 default :
17151725 return undefined ;
17161726 }
17171727 } ,
1718- [ expandedWorkRows ] ,
1728+ [ expandedWorkRows , workingRowHeight , appearance . baseFontSize ] ,
17191729 ) ;
17201730
17211731 const renderItem = useCallback (
0 commit comments