mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
* perf(store): keep the repo list's identity through workspace hydration
buildRuntimeSessionPlaceholders opened with `repos.slice()`, so every workspace
session hydration handed the store a brand-new `repos` array — including the
common case where the session referenced no unknown runtime workspace and the
contents were identical. `repos` is selected whole at 46 sites, so each
hydration rerendered all of them for no data change.
The appends below already build a new array rather than mutating, and the
sibling `nextWorktreesByRepo` in the same function was already copy-on-write;
this just gives `repos` the same treatment. No consumer of the returned array
mutates it in place.
* perf(store): keep worktreesByRepo identity through workspace hydration too
addHydratedSshWorktreePlaceholders opens with `{ ...sourceWorktreesByRepo }`, the
same unconditional copy as the repos.slice() above it, in the sibling function the
same hydration calls. A session needing no SSH placeholder is the common case, so
worktreesByRepo got a new identity on every hydration with identical contents.
15 sites select that map whole, the sidebar worktree list among them.
* chore(store): tighten the copy-on-write comments in hydration placeholders