Public: anyone can read this; the crew can change it.

The explorer's filter state lives in the URL, so a filtered view can be sent and reloaded #13178

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/13161-the-explorer-s-filter-state-lives-in-the → main 9 commits fork 2 threads · 2 unresolved

  • Merged. mason/13161-the-explorer-s-filter-state-lives-in-the was merged into main as acec0d9.

Review

Sign in to review this change.
7 files changed +199 −19
docs/MCP.md +1 −1
@@ -109,7 +109,7 @@ bytes in `tools/list`. After changing a tool run `bun scripts/mcp-table.ts`;
109109 | `email_verify` | — | Send yourself a new verification link | 126 |
110110 | `estimate` | — | Ask an issue's base rate, or record `event` with `p50`, `p90` (instants) and `basis` | 406 |
111111 | `events` | — | Repository events | 259 |
112 | `explore` | — | The apps, people (and, for an admin, forges) you can see, ranked | 749 |
112 | `explore` | — | The apps, people (and, for an admin, forges) you can see, ranked | 774 |
113113 | `family` | — | The forge that sent this one and, for a site admin, those it sent, with state, version | 205 |
114114 | `features` | — | Apps absorbed as forge features: list, read, absorb or un-absorb, change typed settings | 357 |
115115 | `feed` | — | Your ranked home timeline; `cursor` pages; saved filter applies | 604 |
docs/features/explore.md +6 −1
@@ -44,6 +44,7 @@ What a person filters on `/explore` an agent filters with the same words. Each f
4444 | (type it) at least N forks by people | `forks=3` (0–1000) | `?forks=3` | `{ forks: "3" }` |
4545 | (type it) at least N merges in 30 days | `ships=1` (0–1000) | `?ships=1` | `{ ships: "1" }` |
4646 | (type it) awake in the last 30 days | `live=yes` (`no` is no filter) | `?live=yes` | `{ live: "yes" }` |
47 | Mine (signed in, beside the kind tabs) | `mine=yes` (`no` is no filter) | `?mine=yes` | `{ mine: "yes" }` |
4748 | the search box | `q=words` | `?q=words` | `{ q: "words" }` |
4849
4950 The one line still works everywhere: `?q=kind:app sort:forks garden` and `{ q: "kind:app sort:forks garden" }` read the same as the separate parameters, and old `/explore?q=…` links keep working. When a parameter and the same key in `q` are both given, the parameter wins (`?q=sort:name&sort=forks` sorts by forks). A parameter's value is one word; one the explorer does not take is an unknown word like any typed in `q`, and is refused the same way (below). The terminal's search line takes only the line. It takes `forks:N`, `ships:N` and `live:yes` there too (`screens/dashboard.ts` reads the line with `readExploreLine`): `forks:1 live:no` leaves the rows the page leaves, and `forks:abc` or `live:maybe` is named under `Read as:` as `forks:abc is not a count`, `live:maybe is not an answer`.
@@ -54,6 +55,10 @@ A `forks:` or `ships:` value that is not a whole number from 0 to 1000 (`abc`, `
5455
5556 An unknown filter word is refused the same way everywhere: `400` from the API (`{ "error": "unknown_filter", "message": "sort:bogus is not a sort — use score, forks, …", "suggest"? }`), an `unknown_filter` error from the MCP tool, and `400` on the page, which still draws the note, the did-you-mean link and the results. This replaces the earlier note-only answer (#7595).
5657
58 ## Mine (#13161)
59
60 `mine=yes` (or `mine:yes` in a line) keeps the viewer's own apps and the viewer's own person row: the owner is the viewer's name. Signed out it matches nothing, never everyone. Filters live in the URL, so `/explore?kind=app&mine=yes&sort=fresh` reloads and sends as the same view, and equals choosing Apps, Mine and Fresh by hand, row for row (`test/explore-url-filters.test.ts`). The terminal's search line takes `mine:yes` the same way (`mine:yes` after `/`): a guest sees no rows, the signed-in viewer sees their own (`test/tui-dashboard-explore.test.ts`). A `mine:` value other than yes or no is an unknown word like the others.
61
5762 ## Paging (#11376)
5863
5964 A list holds 60 rows a page. When there are more, `/explore` ends with a full-width **More results** button, a plain link to the same view (kind, sort, since, owner, archived and the words) plus `cursor=…`; the last page has none, and it works without JavaScript. A cursor belongs to one sort: one that is malformed, over 400 characters or made under another sort shows the first page with a one-line note, never an error. `GET /api/v1/explore` returns `next_cursor` and takes `?cursor=`, and the MCP `explore` tool takes and returns the same cursor.
@@ -77,6 +82,6 @@ Under the filters, `/explore` says how much a filter leaves: `66 results`, `2 ap
7782 In the terminal the same sentence sits in the `Read as:` line under the search box (`Read as: kind:app · 2 apps · Esc clears`); Esc clears the line.
7883
7984 ## What a row shows
80 A row shows the app's name, what it does in plain words, and the one signal that explains its place (the other numbers are left off the page; the API and the MCP still carry them all). The filter line is the search box and the kind tabs; "Sort and time" opens the sorts, the time windows and "Show archived", and stays open while one of them is set. The ranking order is unchanged.
85 A row shows the app's name, what it does in plain words, and the one signal that explains its place (the other numbers are left off the page; the API and the MCP still carry them all). The filter line is the search box, the kind tabs and, signed in, "Mine"; "Sort and time" opens the sorts, the time windows and "Show archived", and stays open while one of them is set. The ranking order is unchanged.
8186
8287 The terminal's explore screen deliberately keeps the stacked numbers (forks, ships, likes, use) that the page leaves off: a terminal row has the width for them and no second tap to reach them. The ranking is the same on both.
src/actions/explore.ts +38 −11
@@ -65,6 +65,8 @@ export interface ExploreQuery {
6565 readonly ships?: number;
6666 /** `live:yes` — awake within the signal window (30 days). */
6767 readonly live?: boolean;
68 /** `mine:yes` — only the viewer's own apps and the viewer; nothing when signed out. */
69 readonly mine?: boolean;
6870 }
6971
7072 /** The most a `forks:` or `ships:` word may ask for. */
@@ -114,8 +116,10 @@ export function parseExploreQuery(line: string): ExploreQuery {
114116 return readExploreLine(line).query;
115117 }
116118
117 /** The filter names a request may carry as separate parameters (`?kind=app&sort=forks`), beside `q`. */
118 export const EXPLORE_PARAMS = ["kind", "sort", "updated", "owner", "archived", "forks", "ships", "live"] as const;
119 /**
120 * The filter names a request may carry as separate parameters (`?kind=app&sort=forks`), beside `q`.
121 */
122 export const EXPLORE_PARAMS = ["kind", "sort", "updated", "owner", "archived", "forks", "ships", "live", "mine"] as const;
119123
120124 /**
121125 * The one line a request asks for: `q`, then each separate parameter as its
@@ -150,18 +154,25 @@ export function exploreParams(query: ExploreQuery): string {
150154 if (query.forks !== undefined) p.set("forks", String(query.forks));
151155 if (query.ships !== undefined) p.set("ships", String(query.ships));
152156 if (query.live === true) p.set("live", "yes");
157 if (query.mine === true) p.set("mine", "yes");
153158 if (query.text !== "") p.set("q", query.text);
154159 return p.toString();
155160 }
156161
157 const EXPLORE_KEYS = /(^|\s)(kind|sort|updated|owner|archived|forks|ships|live):/i;
162 const EXPLORE_KEYS = /(^|\s)(kind|sort|updated|owner|archived|forks|ships|live|mine):/i;
158163
159 /** Whether a line has any word the explorer reads as a key, so every surface takes it as the explorer's. */
164 /**
165 * Whether a line has any word the explorer reads as a key, so every surface takes it as the
166 * explorer's.
167 */
160168 export function isExploreLine(line: string): boolean {
161169 return EXPLORE_KEYS.test(line);
162170 }
163171
164 /** The query and the `kind:`, `sort:`, `updated:`, `archived:` and `owner:` words it did not take, as typed. */
172 /**
173 * The query and the `kind:`, `sort:`, `updated:`, `archived:` and `owner:` words it did not take,
174 * as typed.
175 */
165176 export interface ExploreRead {
166177 readonly query: ExploreQuery;
167178 readonly unknown: readonly string[];
@@ -177,6 +188,7 @@ export function readExploreLine(line: string): ExploreRead {
177188 let forks: number | undefined;
178189 let ships: number | undefined;
179190 let live = false;
191 let mine = false;
180192 const words: string[] = [];
181193 for (const word of line
182194 .trim()
@@ -209,6 +221,9 @@ export function readExploreLine(line: string): ExploreRead {
209221 } else if (k === "live" && value !== "") {
210222 if (["yes", "no"].includes(value.toLowerCase())) live = value.toLowerCase() === "yes";
211223 else unknown.push(word);
224 } else if (k === "mine" && value !== "") {
225 if (["yes", "no"].includes(value.toLowerCase())) mine = value.toLowerCase() === "yes";
226 else unknown.push(word);
212227 } else if (k === "q" && value !== "") words.push(value);
213228 else words.push(word);
214229 }
@@ -223,6 +238,7 @@ export function readExploreLine(line: string): ExploreRead {
223238 ...(forks === undefined ? {} : { forks }),
224239 ...(ships === undefined ? {} : { ships }),
225240 ...(live ? { live } : {}),
241 ...(mine ? { mine } : {}),
226242 },
227243 unknown: unknown.slice(0, 5),
228244 };
@@ -242,7 +258,7 @@ export function exploreNote(unknown: readonly string[]): string {
242258 const shown = word.length > 40 ? `${word.slice(0, 39)}…` : word;
243259 if (key === "owner") return `${shown} is not a name`;
244260 if (key === "updated") return `${shown} is not a window — use ${Object.keys(WINDOWS).join(", ")}`;
245 if (key === "archived" || key === "live") return `${shown} is not an answer — use yes, no`;
261 if (key === "archived" || key === "live" || key === "mine") return `${shown} is not an answer — use yes, no`;
246262 if (key === "forks" || key === "ships") return `${shown} is not a count — use a whole number from 0 to ${COUNT_MAX}`;
247263 const sort = key === "sort";
248264 return `${shown} is not a ${sort ? "sort" : "kind"} — use ${(sort ? SORTS : KIND_WORDS).join(", ")}`;
@@ -320,6 +336,7 @@ export function exploreLine(query: ExploreQuery): string {
320336 query.forks === undefined ? "" : `forks:${query.forks}`,
321337 query.ships === undefined ? "" : `ships:${query.ships}`,
322338 query.live === true ? "live:yes" : "",
339 query.mine === true ? "mine:yes" : "",
323340 query.text,
324341 ]
325342 .filter((p) => p !== "")
@@ -380,7 +397,10 @@ export function whyOf(
380397 return best === undefined ? undefined : { signal: best[0], text: text[best[0]] };
381398 }
382399
383 /** The one fork action an app row offers: the page's button and the MCP row's `action` say these words. */
400 /**
401 * The one fork action an app row offers: the page's button and the MCP row's `action` say these
402 * words.
403 */
384404 export const MAKE_IT_YOURS = { do: "make_it_yours", label: "Make it yours" } as const;
385405
386406 export interface ExploreRow {
@@ -434,6 +454,7 @@ export const exploreFiltered = (q: ExploreQuery): boolean =>
434454 q.forks !== undefined ||
435455 q.ships !== undefined ||
436456 q.live === true ||
457 q.mine === true ||
437458 q.sort !== "score";
438459
439460 /**
@@ -476,7 +497,10 @@ export async function explore(
476497 return described(app, rows.slice(0, ROWS), stamp);
477498 }
478499
479 /** The rows as the API and the MCP send them: each with its `why` line when the ranking has one to say (omitted otherwise). */
500 /**
501 * The rows as the API and the MCP send them: each with its `why` line when the ranking has one to
502 * say (omitted otherwise).
503 */
480504 export function rowsWithWhy(app: App, query: ExploreQuery, items: readonly ExploreRow[]): (ExploreRow & { why?: string })[] {
481505 const weights = frontWeights(app.db);
482506 const now = Date.now();
@@ -587,7 +611,7 @@ async function everything(
587611 /** The forges this forge spawned, for a site admin asking for them. */
588612 async function forges(app: App, viewer: User | undefined, query: ExploreQuery): Promise<ExploreRow[]> {
589613 // A spawned forge carries no time, so a window leaves it out.
590 if (query.updated !== "all" || query.owner !== undefined) return [];
614 if (query.updated !== "all" || query.owner !== undefined || query.mine === true) return [];
591615 // Nor does it carry forks, ships or a wake time, so a number asked for leaves it out.
592616 if ((query.forks ?? 0) > 0 || (query.ships ?? 0) > 0 || query.live === true) return [];
593617 if (viewer?.isAdmin !== true || (query.kind !== "all" && query.kind !== "forge")) return [];
@@ -727,7 +751,8 @@ function rank(
727751 });
728752
729753 const text = query.text.toLowerCase();
730 const only = query.owner?.toLowerCase();
754 // `mine` is the viewer's own name as an owner; signed out it is a name no row has.
755 const only = (query.mine === true ? (viewer?.username ?? "\0") : query.owner)?.toLowerCase();
731756 // Kept rows are shared by every request that reads them: none may change.
732757 const freeze = (row: ExploreRow): ExploreRow => {
733758 Object.freeze(row.numbers);
@@ -751,7 +776,9 @@ function rank(
751776 /** What a like adds to the score sort: modest next to forks (3) and ships (2). */
752777 export const LIKE_WEIGHT = 0.5;
753778
754 /** Likes on posts about each repository; the caller passes only repositories the viewer may read. */
779 /**
780 * Likes on posts about each repository; the caller passes only repositories the viewer may read.
781 */
755782 function likesByRepo(db: Database, repoIds: readonly string[]): Map<string, number> {
756783 const out = new Map<string, number>();
757784 if (repoIds.length === 0) return out;
src/web/studio/explore.ts +11 −1
@@ -71,7 +71,7 @@ const shorten = (term: string): string =>
7171 term.length > 24 ? `${term.slice(0, 23)}…` : term;
7272
7373 /** The query with one optional key left out. */
74 function dropped(query: ExploreQuery, key: "forks" | "ships" | "live" | "owner"): ExploreQuery {
74 function dropped(query: ExploreQuery, key: "forks" | "ships" | "live" | "owner" | "mine"): ExploreQuery {
7575 const copy: Record<string, unknown> = { ...query };
7676 delete copy[key];
7777 return copy as unknown as ExploreQuery;
@@ -91,6 +91,7 @@ function terms(query: ExploreQuery): { term: string; without: ExploreQuery }[] {
9191 if (query.forks !== undefined) out.push({ term: `forks:${query.forks}`, without: dropped(query, "forks") });
9292 if (query.ships !== undefined) out.push({ term: `ships:${query.ships}`, without: dropped(query, "ships") });
9393 if (query.live === true) out.push({ term: "live:yes", without: dropped(query, "live") });
94 if (query.mine === true) out.push({ term: "mine:yes", without: dropped(query, "mine") });
9495 const words = query.text.split(/\s+/).filter((w) => w !== "");
9596 words.forEach((word, i) =>
9697 out.push({
@@ -237,6 +238,15 @@ export async function explorePage(ctx: Ctx): Promise<Response> {
237238 })),
238239 "Kind",
239240 )}
241 ${ctx.auth.user === undefined
242 ? html``
243 : seg([
244 {
245 label: "Mine",
246 href: href(query.mine === true ? dropped(query, "mine") : { ...query, mine: true }),
247 current: query.mine === true,
248 },
249 ])}
outdated

Opening the 'Sort and time' details for mine makes the section's name wrong; once Mine moves out, drop this condition.

240250 </div>
241251 ${chipRow(query)}
242252 ${returned ? html`<p class="muted mb" role="status">That page link is not one for this list, so this is the first page.</p>` : html``}
test/explore-budget.test.ts +16 −2
@@ -1,4 +1,7 @@
1 /** The ranked read behind explore answers under its budget over 200 repositories, and never shares a private row (#10946). */
1 /**
2 * The ranked read behind explore answers under its budget over 200 repositories, and never shares a
3 * private row (#10946).
4 */
25 import { afterAll, beforeAll, expect, test } from "bun:test";
36 import { mkdtemp, rm } from "node:fs/promises";
47 import { tmpdir } from "node:os";
@@ -19,7 +22,10 @@ let owner: User;
1922 let stranger: User;
2023 const all = parseExploreQuery("");
2124 const budget = budgetFor("/explore#read")!;
22 /** The best of a few reads, so one stall on a loaded machine is not a finding; a slow read is slow every time. */
25 /**
26 * The best of a few reads, so one stall on a loaded machine is not a finding; a slow read is slow
27 * every time.
28 */
2329 async function best(read: () => Promise<unknown>, runs = 3) {
2430 let low = Infinity;
2531 for (let i = 0; i < runs; i++) {
@@ -74,6 +80,14 @@ test("a read is under the budget for every sort", async () => {
7480 }
7581 });
7682
83 test("mine=yes is under the budget, and shows only the viewer's own", async () => {
84 const q = parseExploreQuery("kind:app mine:yes");
85 expect(await best(() => explore(app, owner, q))).toBeLessThan(budget.p95Ms);
86 expect((await explore(app, owner, q)).every((r) => r.name.startsWith("olive/"))).toBe(true);
87 expect(await explore(app, stranger, q)).toEqual([]);
88 expect(await explore(app, undefined, q)).toEqual([]);
89 });
90
7791 test("a private app is not shown to another viewer after the owner's read is warm", async () => {
7892 await explore(app, owner, all);
7993 const mine = (await explore(app, owner, all)).map((r) => r.name);
test/explore-url-filters.test.ts added +107
@@ -0,0 +1,107 @@
1 /**
2 * The explorer's filters (kind, sort, freshness, mine) live in the URL: a link renders what
3 * choosing by hand does (#13161).
4 */
5 import { afterAll, beforeAll, expect, test } from "bun:test";
6 import { mkdtemp, rm } from "node:fs/promises";
7 import { tmpdir } from "node:os";
8 import { join } from "node:path";
9 import { createApp, type App } from "../src/app.ts";
10 import { createRepo } from "../src/actions/repos.ts";
11 import { createApp as insertApp } from "../src/core/apps.ts";
12 import { exploreLineFrom, exploreParams, readExploreLine } from "../src/actions/explore.ts";
13 import { createSession } from "../src/core/sessions.ts";
14 import { createUser } from "../src/core/users.ts";
15 import { serve, type Servers } from "../src/http/server.ts";
16 import { quietLogs } from "./helpers/globals.ts";
17 import { proveAll } from "./helpers/verified.ts";
18 import { promote } from "./helpers/members.ts";
19
20 quietLogs();
21 let dir: string;
22 let app: App;
23 let servers: Servers;
24 let olive = "";
25 let pine = "";
26
27 beforeAll(async () => {
28 dir = await mkdtemp(join(tmpdir(), "forge-explore-filters-"));
29 app = createApp({ dataDir: dir, port: 0 });
30 for (const [owner, names] of [["olive", ["garden", "kiln"]], ["pine", ["loom"]]] as const) {
31 const made = await createUser(app.db, { origin: "seed", username: owner, email: `${owner}@forge.local`, password: "a-good-passphrase", adminIfFirst: false });
32 if (!made.ok) throw new Error(made.error);
33 proveAll(app);
34 promote(app.db, made.value);
35 const cookie = `forge_session=${createSession(app.db, made.value.id).token}`;
36 if (owner === "olive") olive = cookie;
37 else pine = cookie;
38 for (const n of names) {
39 const repo = await createRepo(app, made.value, { name: n, visibility: "public" });
40 if (!repo.ok) throw new Error(String(repo.error));
41 const rec = insertApp(app.db, { repoId: repo.value.id, slug: `${owner}-${n}`, access: "public" });
42 if (!rec.ok) throw new Error(rec.error);
43 }
44 }
45 servers = await serve(app);
46 });
47 afterAll(async () => {
48 await servers.stop();
49 app.db.close();
50 await rm(dir, { recursive: true, force: true });
51 });
52
53 const get = async (path: string, cookie = "") => {
54 const res = await fetch(`${servers.url}${path}`, { headers: cookie === "" ? {} : { cookie } });
55 return { status: res.status, html: await res.text() };
56 };
57 const listed = (html: string): string[] => {
58 const list = /<ul class="list">([\s\S]*?)<\/ul>/.exec(html);
59 return list === null ? [] : [...list[1]!.matchAll(/<li[^>]*>[\s\S]*?<a href="(\/[^"?]*)">/g)].map((m) => m[1]!);
60 };
61 /** The href of the control whose visible text is `label`, as the page wrote it. */
62 const linkTo = (html: string, label: string): string => {
63 const found = new RegExp(`<a[^>]*href="([^"]+)"[^>]*>\\s*${label}\\s*</a>`).exec(html);
64 if (found === null) throw new Error(`no control named ${label}`);
65 return found[1]!.replace(/&amp;/g, "&");
66 };
67
68 test("mine round-trips through the query string and narrows to the viewer's own", async () => {
69 expect(readExploreLine("mine:yes").query.mine).toBe(true);
70 expect(exploreLineFrom((n) => (n === "mine" ? "yes" : null))).toBe("mine:yes");
71 expect(exploreParams(readExploreLine("kind:app mine:yes").query)).toBe("kind=app&mine=yes");
72 expect(listed((await get("/explore?kind=app&mine=yes&sort=name", olive)).html)).toEqual(["/olive/garden", "/olive/kiln"]);
73 expect(listed((await get("/explore?kind=app&mine=yes", pine)).html)).toEqual(["/pine/loom"]);
74 // Signed out, nothing is yours.
75 expect(listed((await get("/explore?kind=app&mine=yes")).html)).toEqual([]);
76 });
77
78 test("the cache is keyed by the filters: mine and not mine never answer for each other", async () => {
79 const all = listed((await get("/explore?kind=app", olive)).html);
80 const mine = listed((await get("/explore?kind=app&mine=yes", olive)).html);
81 expect(all.length).toBe(3);
82 expect(mine.length).toBe(2);
83 expect(listed((await get("/explore?kind=app", olive)).html)).toEqual(all);
84 });
85
86 test("a link with three filters renders the same rows as choosing them by hand", async () => {
87 // The by-hand route reaches sort=fresh; the link names that same sort, and the lists match in
88 // order.
89 const linked = await get("/explore?kind=app&mine=yes&sort=fresh", olive);
90 let page = await get("/explore", olive);
91 for (const label of ["Apps", "Mine", "Fresh"]) page = await get(linkTo(page.html, label), olive);
92 expect(listed(page.html)).toEqual(listed(linked.html));
93 expect(listed(page.html).length).toBe(2);
94 // Signed out there is no Mine control, and the link shows no rows.
95 expect((await get("/explore?kind=app")).html).not.toContain(">Mine<");
96 });
97
98 test("an unknown filter value is ignored with a one-line note, never a 500", async () => {
99 const plain = listed((await get("/explore", olive)).html);
100 for (const qs of ["?mine=maybe", "?kind=zzz", "?sort=zzz", "?since=9y"]) {
101 const res = await get(`/explore${qs}`, olive);
102 expect(res.status).toBe(200);
103 expect(res.html).toContain('role="status"');
104 expect(listed(res.html)).toEqual(plain);
105 }
106 expect((await get("/explore?mine=maybe", olive)).html).toContain("mine:maybe is not an answer — use yes, no");
107 });
test/tui-dashboard-explore.test.ts +20 −3
@@ -1,4 +1,7 @@
1 /** The launcher's search line with `kind:` or `sort:` is the explorer's, ranked by the page's action (#7325). */
1 /**
2 * The launcher's search line with `kind:` or `sort:` is the explorer's, ranked by the page's action
3 * (#7325).
4 */
25 import { afterAll, beforeAll, expect, test } from "bun:test";
36 import { mkdtemp, rm } from "node:fs/promises";
47 import { tmpdir } from "node:os";
@@ -64,7 +67,8 @@ afterAll(async () => {
6467 await rm(dir, { recursive: true, force: true });
6568 });
6669
67 async function typed(line: string, then: string[] = [], user: User | undefined = alice): Promise<string> {
70 async function typed(line: string, then: string[] = [], who: User | null = alice): Promise<string> {
71 const user = who ?? undefined; // null is a guest; leaving it out is alice
6872 const terminal = headlessTerminal(200, 32);
6973 const { app } = createForgeApp(
7074 forge,
@@ -127,11 +131,24 @@ test("enter on an app row opens it", async () => {
127131 test("a guest's explorer rows hold no private repository; its owner's do", async () => {
128132 expect(await typed("kind:app", [], bob)).toContain("bob/vault");
129133 expect(await typed("kind:app", [], alice)).not.toContain("bob/vault");
130 const guest = await typed("kind:app", [], undefined);
134 const guest = await typed("kind:app", [], null);
131135 expect(guest).toContain("alice/zed");
132136 expect(guest).not.toContain("bob/vault");
133137 });
134138
139 test("mine:yes shows the signed-in viewer's own apps and a guest none", async () => {
140 const own = await typed("kind:app mine:yes", [], alice);
141 expect(own).toContain("alice/zed");
142 expect(own).not.toContain("bob/vault");
143 expect(own).toContain("Read as: kind:app mine:yes");
144 const theirs = await typed("kind:app mine:yes", [], bob);
145 expect(theirs).toContain("bob/vault");
146 expect(theirs).not.toContain("alice/zed");
147 const guest = await typed("kind:app mine:yes", [], null);
148 expect(guest).not.toContain("alice/zed");
149 expect(guest).not.toContain("bob/vault");
150 });
151
135152 test("pin, mark and archive on an explorer row say they do not apply", async () => {
136153 const text = await typed("kind:app sort:forks", ["enter", "p"]);
137154 expect(text).toContain("act on your repositories");

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs