coderepo: sort per-inbox coderepos by score

This increases the likelyhood of early solver success and looks
more logical in listings.

It's probably OK to ditch the timestamp column since the score
is far more important and we can reduce Xapians lookups this
way.  The raw score is still shown, for now, but that could
probably be a percentage in the future...
diff --git a/lib/PublicInbox/CodeSearch.pm b/lib/PublicInbox/CodeSearch.pm
index 3838fd1..2200262 100644
--- a/lib/PublicInbox/CodeSearch.pm
+++ b/lib/PublicInbox/CodeSearch.pm
@@ -266,6 +266,15 @@
 	@$todo = @pending;
 }
 
+# sort per-inbox scores from public-inbox-cindex --join
+sub _cr_score_sort ($$) {
+	my ($gits, $cr_score) = @_;
+	use sort 'stable'; # preserve manual ordering in config file
+	@$gits = sort {
+		$cr_score->{$b->{nick}} <=> $cr_score->{$a->{nick}}
+	} @$gits;
+}
+
 sub load_coderepos { # each_cindex callback
 	my ($self, $pi_cfg) = @_;
 	my $name = $self->{name};
@@ -341,6 +350,7 @@
 		}
 		if (@$gits) {
 			push @{$ibx->{-csrch}}, $self if $ibx2self;
+			_cr_score_sort $gits, $cr_score;
 		} else {
 			delete $ibx->{-repo_objs};
 			delete $ibx->{-cr_score};
@@ -359,6 +369,7 @@
 	push @$gits, @alls_gits;
 	my $cr_score = $ALL->{-cr_score} //= {};
 	$cr_score->{$_->{nick}} //= scalar(@{$_->{ibx_score}//[]}) for @$gits;
+	_cr_score_sort $gits, $cr_score;
 }
 
 sub repos_sorted {
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 79fe46a..172f502 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -227,17 +227,15 @@
 	my $cr = $cfg->repo_objs($ctx->{ibx}) or return ();
 	my $buf = 'Code repositories for project(s) associated with this '.
 		$ctx->{ibx}->thing_type . ":\n";
-	my @recs = PublicInbox::CodeSearch::repos_sorted($cfg, @$cr);
 	my $cr_score = $ctx->{ibx}->{-cr_score};
 	my $env = $ctx->{env};
-	for (@recs) {
-		my ($t, $git) = @$_;
+	for my $git (@$cr) {
 		for ($git->pub_urls($env)) {
 			my $u = m!\A(?:[a-z\+]+:)?//!i ? $_ : $top_url.$_;
 			my $nr = $cr_score->{$git->{nick}};
 			$buf .= "\n";
 			$buf .= $nr ? sprintf('% 9u', $nr) : (' 'x9);
-			$buf .= ' '.fmt_ts($t).' '.prurl($env, $u);
+			$buf .= ' '.prurl($env, $u);
 		}
 	}
 	($buf);