# Restore lost useMemo calls in ChatView and fix threadActivities referential stability · screen/t3code-personal

[View on GitCafe](https://git.cafe/screen/t3code-personal/commit/fd4ff8ca4648e11d945ccf2a8dea65f2037dcddc)

Repository: [screen/t3code-personal](https://git.cafe/screen/t3code-personal)

Visibility: public

Requested revision: fd4ff8ca4648e11d945ccf2a8dea65f2037dcddc

Requested commit: fd4ff8ca4648e11d945ccf2a8dea65f2037dcddc

Commit: fd4ff8ca4648e11d945ccf2a8dea65f2037dcddc

Tree: 80f1a0313c4c1ee52d56537a36fb9403f914fa8b

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
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>

```

## Parents

- [1bcfbdf2873ce21fdaf1118bf302a4427fab2226](https://git.cafe/screen/t3code-personal/commit/1bcfbdf2873ce21fdaf1118bf302a4427fab2226?format=markdown)

[Source at this commit](https://git.cafe/screen/t3code-personal/tree/fd4ff8ca4648e11d945ccf2a8dea65f2037dcddc?format=markdown)
