                 let firstTabTimestamp = firstTab.lastExecutedTime ?? firstTab.sessionData?.lastUsedTime ?? firstTab.firstCreatedTime ?? 0
                 let secondTabTimestamp = secondTab.lastExecutedTime ?? secondTab.sessionData?.lastUsedTime ?? secondTab.firstCreatedTime ?? 0
                 return firstTabTimestamp < secondTabTimestamp
+
+            } else if let firstSite = $0 as? Site, let secondSite = $1 as? Site {
+                let firstSiteATimestamp = TimeInterval.fromMicrosecondTimestamp(firstSite.latestVisit?.date ?? 0)
+                let secondSiteTimestamp = TimeInterval.fromMicrosecondTimestamp(secondSite.latestVisit?.date ?? 0)
+                return firstSiteATimestamp < secondSiteTimestamp
             } else {
                 fatalError("Error: We should never pass a type \(T.self) to this function.")
             }

            innerMetadataLoop: for (searchTerm, historyMetaList) in searchTermMetadata {
                if historyMetaList.contains(where: { metadata in
                    var stringURL: String = ""
                    if let item = item as? URL {
                        stringURL = item.absoluteString

                    } else if let item = item as? Tab, let url = item.lastKnownUrl?.absoluteString {
                        stringURL = url

    ///   filteredItems list, `[T]`, which is comprised of items from the original input
    ///   that are not part of a group.
    private static func getGroups<T: Equatable>(with profile: Profile, from items: [T], using ordering: ComparisonResult, completion: @escaping ([ASGroup<T>]?, _ filteredItems: [T]) -> Void) {
        guard (items is [Tab] || items is [Site]) else { return completion(nil, [T]()) }

        let lastTwoWeek = Int64(Date().lastTwoWeek.timeIntervalSince1970)
        profile.places.getHistoryMetadataSince(since: lastTwoWeek).uponQueue(.main) { result in
