diff --git a/src/applications/audit/query/PhabricatorCommitSearchEngine.php b/src/applications/audit/query/PhabricatorCommitSearchEngine.php index 52cfe1f94f..6811427c93 100644 --- a/src/applications/audit/query/PhabricatorCommitSearchEngine.php +++ b/src/applications/audit/query/PhabricatorCommitSearchEngine.php @@ -178,10 +178,13 @@ final class PhabricatorCommitSearchEngine $groups = $bucket->newResultGroups($query, $commits); foreach ($groups as $group) { - $views[] = id(clone $template) - ->setHeader($group->getName()) - ->setNoDataString($group->getNoDataString()) - ->setCommits($group->getObjects()); + // Don't show groups in Dashboard Panels + if ($group->getObjects() || !$this->isPanelContext()) { + $views[] = id(clone $template) + ->setHeader($group->getName()) + ->setNoDataString($group->getNoDataString()) + ->setCommits($group->getObjects()); + } } } catch (Exception $ex) { $this->addError($ex->getMessage()); @@ -189,7 +192,13 @@ final class PhabricatorCommitSearchEngine } else { $views[] = id(clone $template) ->setCommits($commits) - ->setNoDataString(pht('No matching commits.')); + ->setNoDataString(pht('No commits found.')); + } + + if (!$views) { + $views[] = id(new PhabricatorAuditListView()) + ->setViewer($viewer) + ->setNoDataString(pht('No commits found.')); } if (count($views) == 1) {