Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

758 B
Raw Blame
export function resolveProjectOrderManualDefaultNoticeDismissed(args: {
  rawDismissed: unknown
  rawProjectOrderBy: unknown
  isExistingProfile: boolean
}): boolean {
  if (args.rawDismissed === true) {
    return true
  }
  if (!args.isExistingProfile) {
    return true
  }
  // Why: users who already opted into recent ordering keep it without a notice.
  if (args.rawProjectOrderBy === 'recent') {
    return true
  }
  return false
}

export function isExistingPersistedProfile(args: {
  repoCount: number
  onboardingClosedAt: number | null | undefined
  ui: unknown
}): boolean {
  return (
    args.repoCount > 0 ||
    args.onboardingClosedAt != null ||
    (args.ui != null && typeof args.ui === 'object' && Object.keys(args.ui).length > 0)
  )
}