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

Full suite red: 5 files in check run 01m7p06fjkbtqakhhjbhqkzg94 #14351

Merged opened this in answer to

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

Merged

scout/forge:scout/14313-full-suite-red-5-files-in-check-run-01m7 → main 3 commits fork 1 thread · 1 unresolved

  • Merged. scout/14313-full-suite-red-5-files-in-check-run-01m7 was merged into main as 0fca100.

Review

Sign in to review this change.
3 files changed +15 −7
src/web/scope.ts +9 −5
@@ -344,7 +344,7 @@ interface Place {
344344 const PIN_FORM = "where-pin";
345345
346346 /** The three places, in order, for whichever situation this scope is in. */
347 function placesFor(ctx: Ctx, scope: RepoScope): Place[] {
347 function placesFor(ctx: Ctx, scope: RepoScope, knownPinned?: boolean): Place[] {
348348 const places: Place[] = [];
349349 const user = ctx.auth.user;
350350
@@ -415,7 +415,7 @@ function placesFor(ctx: Ctx, scope: RepoScope): Place[] {
415415 const pinned =
416416 repo !== undefined &&
417417 user !== undefined &&
418 isPinned(ctx.app.db, user.id, repo.id);
418 (knownPinned ?? isPinned(ctx.app.db, user.id, repo.id));
419419 if (repo !== undefined && user !== undefined) {
420420 places.push({
421421 label: "this machine",
@@ -470,8 +470,12 @@ function placeNode(place: Place): Html {
470470 * the product, so where you are reading from is never a thing you work out
471471 * from context.
472472 */
473 export function whereStrip(ctx: Ctx, scope: RepoScope): Html {
474 const places = placesFor(ctx, scope);
473 export function whereStrip(
474 ctx: Ctx,
475 scope: RepoScope,
476 knownPinned?: boolean,
477 ): Html {
478 const places = placesFor(ctx, scope, knownPinned);
475479 return html`<div
476480 class="where"
477481 aria-label="Where this repository is read from"
@@ -496,7 +500,7 @@ export function whereRow(ctx: Ctx, scope: RepoScope): Html {
496500 const canPin = repo !== undefined && user !== undefined;
497501 const pinned = canPin && isPinned(ctx.app.db, user.id, repo.id);
498502 return html`<div class="repo-where">
499 ${whereStrip(ctx, scope)}
503 ${whereStrip(ctx, scope, canPin ? pinned : undefined)}
500504 <span class="spacer"></span>
501505 ${when(
502506 canPin,
test/did-you-mean.test.ts +4 −1
@@ -21,7 +21,10 @@ let servers: Awaited<ReturnType<typeof serve>>;
2121 // wallet line (#13309).
2222 const FOUND_QUERIES = 41;
2323 const BARE_404_QUERIES = 3; // a 404 with no owner/name to suggest from
24 const NEAR_404_QUERIES = 16; // the same 404 for a mistyped repository
24 // The same 404 for a mistyped repository. One of the 17 is the noindex lookup that
outdated

Do not raise this pin without finding the cause. A mistyped-repo 404 now costs one more query and nobody knows why: this may be a regression the pin was built to catch. Bisect it (git log -S on the 404 path) and fix it, or name the commit that added it and justify it. Also remove the "was 16 ... not measured to a commit" history from the comment.

25 // answerGet makes for every /:owner/:name route before its handler runs (1e71740ab, #14305,
26 // src/http/archived_noindex.ts); on a missing repository it finds nothing.
27 const NEAR_404_QUERIES = 17;
2528 const cookies: Record<string, string> = {};
2629
2730 beforeAll(async () => {
test/not-found-search.test.ts +2 −1
@@ -40,7 +40,8 @@ test("/owner/name offers a search for name; the 404 says once that a private app
4040 expect(body).toContain('name="q" aria-label="Search this forge" placeholder="Search this forge" value="nothing"');
4141 expect(body).not.toContain("Search for nothing");
4242 expect(body).not.toContain("A private app looks the same");
43 expect(body.match(/not visible to you/g)?.length).toBe(1);
43 // The share head repeats the description in meta tags; the visible page says it once.
44 expect(body.replace(/<head>[\s\S]*?<\/head>/, "").match(/not visible to you/g)?.length).toBe(1);
4445 expect(body).toContain("Sign in");
4546 });
4647

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs