Search as a table, Orbit-only results, and spinner fix #6

Merged
nandi merged 4 commits from orbit-search-filter into main 2026-11-27 08:09:43 +00:00
Showing only changes of commit 984494f556 - Show all commits
+9 -1
View File
@@ -801,7 +801,9 @@ async fn cmd_search(ctx : Ctx, term : String) -> Unit raise OrbitError {
listed = listed + 1 listed = listed + 1
let candidates : Array[String] = [] let candidates : Array[String] = []
for r in lines(out) { for r in lines(out) {
if contains_str(r, term) { // A name with "/" is a nested channel namespace (e.g. example/greet under
// main), not a package name that `orbit install` could use.
if valid_name(r) && contains_str(r, term) {
candidates.push(r) candidates.push(r)
} }
} }
@@ -879,6 +881,12 @@ test "search info comes from OCI annotations" {
assert_eq(bare.description, "") assert_eq(bare.description, "")
} }
///|
test "search skips nested channel namespaces" {
assert_true(valid_name("greet"))
assert_true(!valid_name("example/greet"))
}
///| ///|
test "table columns line up" { test "table columns line up" {
assert_eq(pad_right("ab", 4), "ab ") assert_eq(pad_right("ab", 4), "ab ")