diff --git a/src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts b/src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts index 7ad8c6f5f86..6b585156749 100644 --- a/src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts +++ b/src/renderer/src/components/sidebar/add-remote-host-ssh-actions.ts @@ -43,7 +43,7 @@ export async function saveNewSshHostFromForm({ }: { form: EditingTarget ssh: SshApi - recordSshRepoReadoptions: (readoptions: SshRepoReadoption[]) => void + recordSshRepoReadoptions: (readoptions: readonly SshRepoReadoption[]) => void setSshTargetsMetadata: (targets: SshTarget[]) => void recordFeatureInteraction: (feature: 'ssh') => void }): Promise<'saved' | 'validation-failed' | 'failed'> { @@ -170,7 +170,7 @@ export async function addAllSshConfigHostsToOrca({ recordFeatureInteraction }: { ssh: SshApi - recordSshRepoReadoptions: (readoptions: SshRepoReadoption[]) => void + recordSshRepoReadoptions: (readoptions: readonly SshRepoReadoption[]) => void setSshTargetsMetadata: (targets: SshTarget[]) => void recordFeatureInteraction: (feature: 'ssh') => void }): Promise<{ kind: 'added'; count: number } | { kind: 'already-synced' } | { kind: 'failed' }> { diff --git a/src/renderer/src/store/slices/repos.ts b/src/renderer/src/store/slices/repos.ts index d5bd49f5a95..fd96ad3e572 100644 --- a/src/renderer/src/store/slices/repos.ts +++ b/src/renderer/src/store/slices/repos.ts @@ -1781,8 +1781,8 @@ export type RepoSlice = { activeRepoId: string | null // Monotonic sequence so overlapping catalog fetches can drop stale same-host results (#7020). reposFetchGeneration: number - pendingSshRepoReadoptions: SshRepoReadoption[] - recordSshRepoReadoptions: (readoptions: SshRepoReadoption[]) => void + pendingSshRepoReadoptions: readonly SshRepoReadoption[] + recordSshRepoReadoptions: (readoptions: readonly SshRepoReadoption[]) => void fetchRepos: (options?: RuntimeCatalogFetchOptions) => Promise fetchReposForAllHosts: (options?: AllHostCatalogFetchOptions) => Promise awaitLocalRepoCatalogSettlement: () => Promise diff --git a/src/renderer/src/store/slices/superseded-ssh-repo-rows.ts b/src/renderer/src/store/slices/superseded-ssh-repo-rows.ts index 4b20cfa6edf..c18e0f6e5af 100644 --- a/src/renderer/src/store/slices/superseded-ssh-repo-rows.ts +++ b/src/renderer/src/store/slices/superseded-ssh-repo-rows.ts @@ -4,7 +4,7 @@ import { getRepoExecutionHostId, toSshExecutionHostId } from '../../../../shared export type SshRepoReconciliation = { repos: readonly Repo[] - pendingReadoptions: SshRepoReadoption[] + pendingReadoptions: readonly SshRepoReadoption[] } function repoBelongsToTarget(repo: Repo, targetId: string): boolean { @@ -69,7 +69,7 @@ export function reconcileReadoptedSshRepoRows( export function mergeSshRepoReadoptions( pending: readonly SshRepoReadoption[], incoming: readonly SshRepoReadoption[] -): SshRepoReadoption[] { +): readonly SshRepoReadoption[] { const repoIdsByMigration = new Map>() for (const readoption of [...pending, ...incoming]) { const key = `${readoption.oldTargetId}\0${readoption.newTargetId}`