Files
orca/src/shared
NeilandOrca a73f122c61 fix(store): keep project catalog identity when repo.addedAt is 0
* fix(store): keep project catalog identity when repo.addedAt is 0

projectHostSetupProjectionFromRepos used `repo.addedAt || now`, so a
missing or zero addedAt stamped Date.now() into createdAt/updatedAt on
every refresh. #13803's reconcile then treated the project as changed
and never reused it.

Use a finite check with a stable 0 fallback, and treat 0 as unknown in
merge so a persisted createdAt is not wiped. Refresh-identity tests use
production-shaped nested fixtures plus structuredClone and go red if
the fallback is reverted.

Co-authored-by: Orca <help@stably.ai>

* type(shared): return readonly setups from getProjectHostSetupsForProject

The helper already takes a readonly catalog and returns a filter subset.
Mark the return readonly so callers cannot mutate a live setups array.

Co-authored-by: Orca <help@stably.ai>

* style: oxfmt projection files and drop stale addedAt comment

oxfmt --check failed on the addedAt identity commit. Also stop claiming
the projection still restamps Date.now() when addedAt is 0.

Co-authored-by: Orca <help@stably.ai>

* fix(store): treat createdAt 0 as unknown when merging sibling repos

Repo order decided a project's createdAt: a zero-addedAt repo seeded the
accumulator with 0, and the merge only treated the *incoming* addedAt as
unknown, so min(0, 100) kept 0 when the unknown sibling came first.

Share unknown-aware mergeCatalogCreatedAt/mergeCatalogUpdatedAt helpers and
apply them on both sides of the projection merge and of the renderer's
cross-host mergeProjectCompatibilityProject, which had the same 0-poisoning
via Math.min(base.createdAt, overlay.createdAt).

Co-authored-by: Orca <help@stably.ai>

* test(store): pass a valid updateProject payload in createdAt merge case

updateProject only accepts localWindowsRuntimePreference. The new
unknown-vs-known createdAt test used displayName and failed typecheck.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-08-13 00:37:23 -07:00
..
2026-08-12 18:53:17 -07:00
2026-08-12 18:53:17 -07:00
2026-05-31 05:55:04 -07:00
2026-08-09 19:01:35 -07:00