Restore lost useMemo calls in ChatView and fix threadActivities referential stability

Revert bare function calls / IIFEs back to useMemo for: modelOptions,
workLogEntries, latestTurnHasToolActivity, pendingApprovals, timelineEntries,
revertTurnCountByUserMessageId, completionSummary, and
completionDividerBeforeEntryId.

Add EMPTY_ACTIVITIES module-level constant so the ?? [] fallback doesn't
create a new array reference every render, which was defeating memoization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fd4ff8ca46Julius Marminge committed on 3/2/2026, 9:13:19 PM· committed by Julius Marmingeparent1bcfbdf
1 file changedLine totals unavailable