Skip to content

Commit bb069eb

Browse files
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6wtellaho
andcommitted
docs(desktop): restore load-bearing activeReadAt fallback comment
Restores the comment explaining why lastMessageAt is not used as an activeReadAt fallback: it is reply-inclusive and would clear unread thread/sidebar state before a real top-level position is known. Behavior unchanged. ChannelScreen.tsx sat at 999/1000 lines, so the two restored comment lines trip the file-size guard; adds a narrowly scoped 1002-line override entry noting the comment-only overage. Addresses review feedback on #1492. Co-authored-by: Taylor Ho <[email protected]> Signed-off-by: Taylor Ho <[email protected]>
1 parent 8d0becf commit bb069eb

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎desktop/scripts/check-file-sizes.mjs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ const overrides = new Map([
142142
// test. Load-bearing feature growth, queued to split publishSplitSlots path
143143
// into readStateManagerSplit.ts.
144144
["src/features/channels/readState/readStateManager.ts", 1030],
145+
// review feedback on #1492 restored the two-line load-bearing comment
146+
// documenting why `lastMessageAt` must not be an `activeReadAt` fallback
147+
// (reply-inclusive; would clear unread state early). The file was already
148+
// at the 1000 ceiling; comment-only overage, not code growth. Queued to
149+
// split with the rest of this list.
150+
["src/features/channels/ui/ChannelScreen.tsx", 1002],
145151
// Shared UI was added to this guard after splitting globals/markdown so
146152
// large shared renderers cannot grow further while follow-up splits land.
147153
["src/shared/ui/markdown.tsx", 2119],

‎desktop/src/features/channels/ui/ChannelScreen.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ export function ChannelScreen({
197197
}
198198
return null;
199199
}, [messagesQuery.data]);
200+
// No `lastMessageAt` fallback: it is reply-inclusive and would clear unread
201+
// thread/sidebar state before a real top-level position is known.
200202
const activeReadAt = latestActiveMessage
201203
? new Date(latestActiveMessage.created_at * 1_000).toISOString()
202204
: null;

0 commit comments

Comments
 (0)