agent-ecosystem/test/renderer/components/team/activity
Mike 4c359d5185 perf(team): precompute ActivityTimeline session anchors once per render
Replace the per-item backward scan that located the most recent session
anchor with a single forward pass via useMemo.

Before: for every timeline item the render loop walked backward until
it found a lead-thought anchor, so N items produced up to N * N anchor
lookups on every render pass.

After: a single O(n) sweep builds previousSessionAnchorByIndex; render
time lookup is O(1). getItemSessionAnchorId is hoisted to module scope
so it is not recreated per render.

Behavior is unchanged. The three existing separator tests still pass,
and four new cases cover three-session transitions, long runs of
non-anchor items between thought groups, consecutive same-session
thoughts, and single-item lists.
2026-04-19 09:00:59 +05:00
..
ActivityItem.test.ts refactor(activity): reuse markdown rendering in compact previews 2026-04-18 21:57:59 +03:00
ActivityTimeline.test.ts perf(team): precompute ActivityTimeline session anchors once per render 2026-04-19 09:00:59 +05:00
collapseState.test.ts feat: enhance UI and functionality in team dialogs and components 2026-03-06 23:21:56 +02:00
LeadThoughtsGroup.test.ts refactor(activity): reuse markdown rendering in compact previews 2026-04-18 21:57:59 +03:00
PendingRepliesBlock.test.ts feat(team-ui): clarify launch and retry member states 2026-04-09 21:16:24 +03:00