Merge web/code-tab-and-fixes into main, keeping both the hero's concurrency line and its second action
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by oscabriel · committed by oscabriel · parents 59ed81f, 1534f3c · Browse files · 51 files·+1004 added−219 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
51 files+1004 added−219 removed
- tests:+616 added−45 removed
- other:+388 added−174 removed
Provenance
- Commit
2eaa076- Tree
88c8e8c- Author
oscabriel <oscarhernandeziv@gmail.com>- Committer
oscabriel <oscarhernandeziv@gmail.com>- Parent 1
59ed81f- Parent 2
1534f3c
51 files changed+1004 added−219 removed
deleted:apps/web/src/client/people.ts-8 removed
12345678import type { Handle } from "@repo/protocol/ids";import { Atom } from "effect/reactivity";
import { ContractsClient } from "../surfaces.ts";
export const creditsAtom = Atom.family((handle: Handle) => Atom.withServerValueInitial(ContractsClient.query("credits", { handle })));modified:apps/web/src/features/agents/install-page.tsx+4 added-2 removed
27 unmodified lines28 29 export const INSTALL_LEDE =30 "Every way in reaches the same gate and hears the same refusals. Install the CLI for a terminal, connect an agent over MCP, or point anything that reads text at llms.txt.";31 32-/** A config file or a sentence to paste: kept as written, scrolled sideways, never wrapped. */32+/** A config file kept as written and scrolled sideways; a sentence to paste wraps, its URLs anywhere, so a phone reads all of it. */33 const SnippetBlock = ({ snippet }: { readonly snippet: SetupSnippet }) => {34 const { copied, copy } = useCopy(snippet.text);35 36 return (37 <div className="border-rule bg-surface flex max-w-full min-w-0 items-start gap-2 border py-1 pr-1 pl-3">38 <pre39 aria-label={snippet.label}40 className={`text-mono leading-terminal min-w-0 flex-1 overflow-x-auto py-0.5 font-mono ${41- snippet.language === "text" ? "whitespace-pre-wrap" : "whitespace-pre"41+ snippet.language === "text"42+ ? "[overflow-wrap:anywhere] whitespace-pre-wrap"43+ : "whitespace-pre"44 }`}45 // oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- a scrolling region must take focus to be scrolled without a pointer (WCAG 2.1.1)46 tabIndex={0}47 >157 unmodified linesmodified:apps/web/src/features/answer/answer-page.tsx+2 added-1 removed
698 unmodified lines699 subject ?? {700 ask,701 claimant: progress?.claimant,702 kind: "ask",703+ // A family's parent waits for its children: open, but not to take.703- takeable: ask.state === "open",704+ takeable: ask.state === "open" && ask.blockedBy.length === 0,705 }706 }707 />708 }48 unmodified linesmodified:apps/web/src/features/code/code-address.ts+2 added-2 removed
6 unmodified lines7891011111213141532 unmodified lines484950515252535455563 unmodified lines6 unmodified linesimport { Option, Schema } from "effect";
import { segmentsOf } from "../shared/paths.ts";
/** The Code tab's pages: Files are `tree`, `blob` and `why`; Commits are `commits` and `commit`. *//** The Code tab's pages: Files are `tree`, `blob` and `why`; History is `commits` and `commit`. */export type CodePage = "blob" | "commit" | "commits" | "refs" | "tree" | "why";
export interface CodeAddress { readonly page: CodePage;32 unmodified lines rev, })); });
/** The pages under Files, and the rest under Commits; the refs list is neither. *//** The pages under Files, and the rest under History; the refs list is neither. */export const codeViewOf = (page: CodePage): "commits" | "files" | undefined => { if (page === "refs") { return undefined; }3 unmodified linesmodified:apps/web/src/features/code/code-bar.tsx+3 added-3 removed
1 /**2 * The Code tab's own bar, under the project's header (ADR 0041): Files or3- * Commits, the ref switcher, the revision's head commit, Go to file and3+ * History, the ref switcher, the revision's head commit, Go to file and4 * Clone. Below `columns` it also opens the file tree as a sheet. It reads5 * where it is from the path, and the head commit from the page's own read.6 */7 import { CommitView } from "@repo/protocol/domain/code";87 unmodified lines95 const view = codeViewOf(address.page);96 97 return (98 <nav99- aria-label="Files or commits"99+ aria-label="Files or history"100 className="border-input flex shrink-0 border"101 >102 <AppLink103 aria-current={view === "files" ? "page" : undefined}6 unmodified lines110 aria-current={view === "commits" ? "page" : undefined}111 className={SEGMENT}112 to={commitsHref(project, address.rev)}113 >114- Commits114+ History115 </AppLink>116 </nav>117 );118 };149 unmodified linesmodified:apps/web/src/features/code/log-page.ts+18 added
12345678910111213141516171819export const LOG_PAGE = 30;
/** * What the history shows of a page: the landings alone, the answers, the * asks' openings, or every commit. On main the landings are the default; a * tag or a fork shows every commit, since a fork's own commits are no landing, * and so does a path's history, which asks what touched the path. */export type LogShow = "all" | "answers" | "landings" | "openings";
export const LOG_SHOWS: readonly LogShow[] = [ "all", "answers", "landings", "openings",];
export const defaultShowOf = (rev: string, path?: string): LogShow => rev === "main" && path === undefined ? "landings" : "all";modified:apps/web/src/features/code/log-view.tsx+83 added-25 removed
1+/**2+ * The history of a revision: git's first-parent log, newest first, with the3+ * platform's landing record on each commit that has one. On main the landings4+ * run unbroken from the top down to the adoption, so the commits below the5+ * first one without a record came with the import, and one marker row says so6+ * in their place.7+ */8 import type { CommitView } from "@repo/protocol/domain/code";9 import type { ProjectName, RepoPath } from "@repo/protocol/ids";10 import { DateTime, Option } from "effect";11 import { LockKeyhole } from "lucide-react";12+import { Fragment } from "react";13 import type { ReactNode } from "react";14 15 import { CompactCredit } from "../shared/credits.tsx";16 import { EmptyState } from "../shared/empty.tsx";2 unmodified lines19 import { MetaCode, MetaLine, Row, RowGroup } from "../shared/row.tsx";20 import { Workspace } from "../shared/shell/workspace.tsx";21 import { When } from "../shared/time.tsx";22 import { askOf } from "../why/rows.ts";15-import { LOG_PAGE } from "./log-page.ts";23+import { defaultShowOf, LOG_PAGE } from "./log-page.ts";24+import type { LogShow } from "./log-page.ts";25 import { Pager } from "./pager.tsx";26 import { blobHref, commitHref, commitsHref, shortSha } from "./paths.ts";18-import { pinnedRev, revLabel } from "./rev.ts";27+import { isForkRev, pinnedRev, revLabel } from "./rev.ts";28 20-export type LogShow = "all" | "answers" | "openings";29+export type { LogShow } from "./log-page.ts";30 31 const dayWords = new Intl.DateTimeFormat("en", {32 dateStyle: "long",33 timeZone: "UTC",20 unmodified lines54 commit.landing === undefined55 ? undefined56 : Option.getOrUndefined(askOf(commit.landing));57 58+const isLanding = (commit: CommitView) => commit.landing !== undefined;59+60 export const shows = (show: LogShow, commit: CommitView) => {61 if (show === "all") {62 return true;63 }64 65+ if (show === "landings") {66+ return isLanding(commit);67+ }68+69 const linked = linkedOf(commit);70 71 return show === "openings"72 ? linked?.kind === "opened"73 : linked?.kind === "answers";74 };75 76+/**77+ * The commit the adoption's marker stands over: the first on the page with no78+ * landing record that follows one with. Landings run unbroken from main's top79+ * down to the adoption, and a fork's own commits sit above them, so the first80+ * break after a landing is where the import's history begins.81+ */82+export const adoptedAt = (83+ commits: readonly CommitView[]84+): CommitView | undefined =>85+ commits.find(86+ (commit, at) =>87+ !isLanding(commit) && at > 0 && isLanding(commits[at - 1] ?? commit)88+ );89+90 const LINK = "decoration-rule underline hover:decoration-current";91 92 const Raised = ({ children }: { readonly children: ReactNode }) => (93 <span className="relative z-[1]">{children}</span>94 );95 96+const AdoptedHere = ({ sha }: { readonly sha: string }) => (97+ <li98+ className="border-rule text-ui text-muted-foreground -mx-2 border-b px-2 py-2"99+ data-adopted={sha}100+ >101+ Adopted here. The commits below came with the import; no landing records102+ them.103+ </li>104+);105+106 const CommitRow = ({107 commit,108 now,109 project,21 unmodified lines131 href={commitHref(project, pinnedRev(rev, commit.sha))}132 id={commit.sha}133 meta={134 landing === undefined ? (96- <MetaLine parts={[commit.author.name, "before adoption"]} />135+ <MetaLine parts={[commit.author.name]} />136 ) : (137 <MetaLine138 parts={[139 linked === undefined ? undefined : (40 unmodified lines180 const newerPage = (from: number, path: RepoPath | undefined) =>181 path === undefined ? { from: Math.max(0, from - LOG_PAGE) } : { path };182 183 const FILTERS = [145- { label: "All", show: "all" },184+ { label: "Landings", show: "landings" },185 { label: "Answers", show: "answers" },186 { label: "Ask openings", show: "openings" },187+ { label: "Every commit", show: "all" },188 ] as const satisfies readonly {189 readonly label: string;190 readonly show: LogShow;191 }[];192 193 const FILTER =194 "text-ui text-muted-foreground hover:text-foreground aria-[current]:text-foreground flex h-10 items-center border-b-2 border-transparent px-1 no-underline aria-[current]:border-current aria-[current]:font-semibold";195 196+/** "History of" a path, main or a fork, whose history moves; "History at" a tag or a commit, which stands still. */156-const titleOf = (path: RepoPath | undefined, rev: string) => {197+export const titleOf = (path: RepoPath | undefined, rev: string) => {198 if (path !== undefined) {199 return `History of ${path}`;200 }201 161- return rev === "main" ? "Landings" : `Landings on ${revLabel(rev)}`;202+ return rev === "main" || isForkRev(rev)203+ ? `History of ${revLabel(rev)}`204+ : `History at ${revLabel(rev)}`;205 };206 164-const searchFor = (query: string, show: LogShow) => {207+const searchFor = (query: string, show: LogShow, fallback: LogShow) => {208 const search: Record<string, string> = Object.fromEntries(209 new URLSearchParams(query)210 );211 169- if (show !== "all") {212+ if (show !== fallback) {213 search.show = show;214 }215 216 return search;217 };218 219+const countsOf = (ofDay: readonly CommitView[]) => {220+ const noun = ofDay.every(isLanding) ? "landing" : "commit";221+222+ return `${ofDay.length} ${ofDay.length === 1 ? noun : `${noun}s`}`;223+};224+225 export interface LogViewProps {226 readonly commits: readonly CommitView[];227 readonly from: number;228 readonly next?: number | undefined;11 unmodified lines240 now,241 path,242 project,243 rev,195- show = "all",244+ show = defaultShowOf(rev, path),245 }: LogViewProps) => {246+ const fallback = defaultShowOf(rev, path);247 const filter = path === undefined ? {} : { path };198- const kind = show === "all" ? {} : { show };248+ const kind = show === fallback ? {} : { show };249 const shown = commits.filter((commit) => shows(show, commit));250+ const adopted = show === "all" ? adoptedAt(commits) : undefined;251 const base = commitsHref(project, rev, filter);252 const [to, query = ""] = base.split("?");253 254+ // The landings end at the adoption: once a page holds a commit no landing255+ // records, no older page holds one either.256+ const older =257+ next === undefined || (show === "landings" && !commits.every(isLanding))258+ ? undefined259+ : commitsHref(project, rev, { ...filter, ...kind, from: next });260+261 return (262 <Workspace263 title={titleOf(path, rev)}264 toolbar={2 unmodified lines267 <AppLink268 aria-current={show === each ? "page" : undefined}269 className={FILTER}270 key={each}213- search={searchFor(query, each)}271+ search={searchFor(query, each, fallback)}272 to={to ?? base}273 >274 {label}275 </AppLink>21 unmodified lines297 <div className="flex flex-col">298 {byDay(shown).map(({ commits: ofDay, day }) => (299 <div data-day={day} key={day}>300 <RowGroup243- counts={`${ofDay.length} ${ofDay.length === 1 ? "commit" : "commits"}`}301+ counts={countsOf(ofDay)}302 label={day}303 name={dayWords.format(304 DateTime.toDateUtc(ofDay[0]?.committer.at ?? now)305 )}306 >307 {ofDay.map((commit) => (308+ <Fragment key={commit.sha}>309+ {adopted?.sha === commit.sha ? (310+ <AdoptedHere sha={commit.sha} />250- <CommitRow251- commit={commit}252- key={commit.sha}253- now={now}254- project={project}255- rev={rev}256- />311+ ) : null}312+ <CommitRow313+ commit={commit}314+ now={now}315+ project={project}316+ rev={rev}317+ />318+ </Fragment>319 ))}320 </RowGroup>321 </div>322 ))}4 unmodified lines327 from > 0328 ? commitsHref(project, rev, { ...newerPage(from, path), ...kind })329 : undefined330 }269- older={270- next === undefined271- ? undefined272- : commitsHref(project, rev, { ...filter, ...kind, from: next })273- }331+ older={older}332 />333 </Workspace>334 );335 };modified:apps/web/src/features/code/paths.ts+2 added-1 removed
123456728 unmodified lines3637383939404142434471 unmodified linesimport type { ProjectName } from "@repo/protocol/ids";
import type { LogShow } from "./log-page.ts";import { revSegment } from "./rev.ts";
export const pathSegments = (path: string): string => path.split("/").map(encodeURIComponent).join("/");28 unmodified lines show, }: { readonly from?: number; readonly path?: string; readonly show?: "answers" | "openings"; readonly show?: LogShow; } = {}) => { const query = new URLSearchParams();
71 unmodified linesmodified:apps/web/src/features/code/ref-switcher.tsx+15 added-20 removed
1 /**2- * The code bar's ref switcher (ADR 0043): `main`, the project's tags, and the3- * answers in forks, each with its claimant, ask and claim state. A fork's4- * entry opens the same page in that fork, at its address5- * (`@<handle>/<ask>`), never its repo's name.2+ * The code bar's revision picker (ADR 0043): `main`, the project's tags, and3+ * the answers in claim forks, each with its claimant, ask and claim state. A4+ * fork's entry opens the same page in that fork, at its address5+ * (`@<handle>/<ask>`), never its repo's name. Its trigger reads "At main",6+ * "At v1.2.0" or "At <handle>/<ask>": a tag and a fork are revisions, not7+ * branches, so no branch is named and main carries no branch mark.8 */9 import { forkRev } from "@repo/protocol/domain/code";10 import type { ForkRef, RefsView } from "@repo/protocol/domain/code";11 import type { AskId, ProjectName } from "@repo/protocol/ids";10-import {11- ChevronDown,12- GitBranch,13- GitCommitHorizontal,14- GitFork,15- Tag,16-} from "lucide-react";12+import { ChevronDown, GitCommitHorizontal, GitFork, Tag } from "lucide-react";13 import { useState } from "react";14 import type { ComponentType } from "react";15 16 import {11 unmodified lines28 const SHOWN = 100;29 30 const ICON = "size-4 shrink-0";31 32+/** A tag's, a commit's or a fork's mark; main has none, since it is the project itself, not a ref among refs. */33 const RefMark = ({ rev }: { readonly rev: string }) => {34 if (rev === "main") {38- return <GitBranch aria-hidden="true" className={ICON} strokeWidth={1.75} />;35+ return null;36 }37 38 if (isForkRev(rev)) {39 return <GitFork aria-hidden="true" className={ICON} strokeWidth={1.75} />;93 unmodified lines133 );134 135 return (136 <div className="flex max-h-80 flex-col overflow-y-auto overscroll-contain">140- <p className={GROUP}>Branch</p>137 <ul>138 <li data-ref-choice="main">139 <AppLink140 aria-current={rev === "main" ? "true" : undefined}141 className={ROW}142 onClick={onPick}143 to={hrefAt("main")}144 >149- <RefMark rev="main" />145 main146 <span className="text-label text-muted-foreground ml-auto">147 moves only by a landing148 </span>33 unmodified lines182 </>183 )}184 {forks.length === 0 ? null : (185 <>191- <p className={GROUP}>Answers in forks</p>186+ <p className={GROUP}>Answers in claim forks</p>187 <ul>188 {forks.map((fork) => (189 <ForkEntry190 fork={fork}40 unmodified lines231 232 return (233 <Popover onOpenChange={setOpen} open={open}>234 <PopoverTrigger240- aria-label={`Revision: ${revLabel(rev)}. Switch revision`}241- className="text-ui hover:bg-surface border-input flex h-8 max-w-[16rem] min-w-0 shrink-0 cursor-pointer items-center gap-2 border px-2"235+ aria-label={`At ${revLabel(rev)}. Switch revision`}236+ className="text-ui hover:bg-surface border-input flex h-8 max-w-[16rem] min-w-0 shrink-0 cursor-pointer items-center gap-1.5 border px-2"237 data-ref={rev}238 >244- <RefMark rev={rev} />239+ <span className="shrink-0">At</span>240 <span241 className={`min-w-0 truncate ${rev === "main" ? "" : "text-mono font-mono"}`}242 >243 {revLabel(rev)}5 unmodified lines249 />250 </PopoverTrigger>251 <PopoverContent align="start" className="w-80 gap-1 p-1.5">252 <input258- aria-label="Find a tag or fork"253+ aria-label="Find a tag or answer"254 className="border-input bg-background sm:text-ui h-9 w-full border px-2 text-base sm:h-8"255 onChange={(event) => {256 setFilter(event.currentTarget.value);257 }}263- placeholder="Find a tag or fork"258+ placeholder="Find a tag or answer"259 value={filter}260 />261 {open ? (262 <Choices18 unmodified linesmodified:apps/web/src/features/explore/explore-page.tsx+8 added-2 removed
2 unmodified lines3 import { DateTime } from "effect";4 import type { ReactNode } from "react";5 6 import { LandingProjects } from "../landing/projects.ts";7+import { RUN_A_PROJECT } from "../landing/words.ts";8 import { postureLabel } from "../project/posture-label.ts";9 import { EmptyState } from "../shared/empty.tsx";10 import { AppLink } from "../shared/link.tsx";10-import { ASKS_PATH, projectPath } from "../shared/paths.ts";11+import { ASKS_PATH, IMPORT_PATH, projectPath } from "../shared/paths.ts";12 import { UnreachableNotice } from "../shared/pending.tsx";13 import { PostureBadge } from "../shared/posture.tsx";14 import { GUTTER } from "../shared/shell/gutter.ts";15 import { exploreGroups } from "./groups.ts";157 unmodified lines173 <div className="flex flex-col gap-3">174 <h1 className="text-headline">{EXPLORE_TITLE}</h1>175 <p className="text-body text-muted-foreground max-w-(--measure)">176 <Lede projects={projects} /> Looking for something to work on?{" "}176- <AppLink to={ASKS_PATH}>See every open ask</AppLink>.177+ <AppLink to={ASKS_PATH}>See every open ask</AppLink>. Have a repo of178+ your own?{" "}179+ <AppLink data-action="import" to={IMPORT_PATH}>180+ {RUN_A_PROJECT}181+ </AppLink>182+ .183 </p>184 </div>185 <Body projects={projects} />186 </main>1 unmodified linemodified:apps/web/src/features/inbox/inbox-page.tsx+6 added-2 removed
94 unmodified lines95 }: {96 readonly now: DateTime.Utc;97 readonly work: Work;98 }) => {99- const { answer, claim, stage, want } = work;99+ const { answer, claim, holds, stage, want } = work;100 const next = nextOf(work);101 102 return (103 <Row33 unmodified lines137 }138 strip={139 answer === undefined || stage === undefined ? undefined : (140 <div className="max-w-[44rem]">141- <StageStrip outcome={answer.outcome} stage={stage} />141+ <StageStrip142+ outcome={answer.outcome}143+ stage={stage}144+ {...(holds === undefined ? {} : { holds })}145+ />146 </div>147 )148 }149 title={want ?? claim.ask}273 unmodified linesmodified:apps/web/src/features/inbox/read.ts+54 added-4 removed
24 unmodified lines25 export const WORK_SHOWN = 10;26 27 const AT_ONCE = 4;28 29+/** What the answer's verdict holds, so the strip reads a stage it never needed as not needed, as the answer page does. */30+export const WorkHolds = Schema.Struct({31+ decided: Schema.Boolean,32+ heldBack: Schema.Boolean,33+});34+35 export const Work = Schema.Struct({36 answer: Schema.optionalKey(AnswerView),37 claim: ClaimView,38+ holds: Schema.optionalKey(WorkHolds),39 /** The gate stage the answer reached, from its verdict; absent while it has none. */40 stage: Schema.optionalKey(StageName),41 want: Schema.optionalKey(Schema.NonEmptyString),42 });181 unmodified lines224 }),225 }));226 };227 221-// A verdict names the stage an answer reached; a check still running names it in its outcome.222-const stageOf = (work: Work) =>228+const waitedOnPerson = Outcome.isAnyOf(["AwaitingDecision", "AwaitingFinish"]);229+230+const headKey = (project: ProjectName, { ask, head }: AnswerView) =>231+ `${project}/${ask}/${head}`;232+233+/** The heads whose answer waited on a maintainer at some round: a landing after one passed the maintainer stage. */234+const waitedHeads = (235+ answers: readonly AnswerView[],236+ again: ReadonlyMap<ProjectName, readonly AnswerView[]>,237+ claims: readonly ClaimView[]238+) => {239+ const projectOf = new Map(240+ claims.map(({ ask, project }) => [ask, project] as const)241+ );242+243+ return new Set([244+ ...answers.flatMap((answer) => {245+ const project = projectOf.get(answer.ask);246+247+ return project !== undefined && waitedOnPerson(answer.outcome)248+ ? [headKey(project, answer)]249+ : [];250+ }),251+ ...[...again].flatMap(([project, listed]) =>252+ listed.flatMap((answer) =>253+ waitedOnPerson(answer.outcome) ? [headKey(project, answer)] : []254+ )255+ ),256+ ]);257+};258+259+// A verdict names the stage an answer reached, and what it holds; a check still running names its stage in its outcome.260+const stageOf = (waited: ReadonlySet<string>) => (work: Work) =>261 Effect.gen(function* () {262 const client = yield* Client;263 const { answer, claim } = work;264 11 unmodified lines276 ? Option.some(answer.outcome.stage)277 : Option.none(),278 ]);279 280+ const holds =281+ verdict === undefined282+ ? {}283+ : {284+ holds: {285+ decided:286+ waited.has(headKey(claim.project, answer)) ||287+ waitedOnPerson(answer.outcome),288+ heldBack: verdict.heldBack.length > 0,289+ },290+ };291+292 return Option.match(stage, {293 onNone: () => work,244- onSome: (at): Work => ({ ...work, stage: at }),294+ onSome: (at): Work => ({ ...work, ...holds, stage: at }),295 });296 });297 298 const workOf = (claims: readonly ClaimView[], answers: readonly AnswerView[]) =>16 unmodified lines315 );316 317 return yield* Effect.forEach(318 pairWork({ again, answers, claims, wants }),269- stageOf,319+ stageOf(waitedHeads(answers, again, claims)),320 { concurrency: AT_ONCE }321 );322 });323 71 unmodified linesmodified:apps/web/src/features/landing/gate-drawing.tsx+10 added-2 removed
8 unmodified lines9 import { stageNames, stageRuns } from "../shared/status-line.tsx";10 import { landedPush, refusedPush } from "./transcript.ts";11 import type { Transcript as Printed } from "./transcript.ts";12 13+/**14+ * Stacked below `tablet`, each stage's caption sits under its name; in seven15+ * columns the caption fits only from `columns`, so between the two it is16+ * left out.17+ */18 const Stages = () => (19 <ol className="tablet:grid-cols-7 grid grid-cols-1 gap-x-3 gap-y-3">20 {StageName.literals.map((stage, index) => (21 <li17- className="tablet:flex-col tablet:items-center tablet:text-center flex items-baseline gap-x-3 gap-y-1"22+ className="tablet:flex-col tablet:items-center tablet:text-center flex flex-col gap-x-3 gap-y-1"23 data-stage={stage}24 key={stage}25 >26 <span className="text-ui font-medium">1 unmodified line28 {index + 1}.{" "}29 </span>30 {stageNames(stage).label}31 </span>27- <span className="text-label text-muted-foreground columns:block hidden font-normal">32+ <span33+ className="text-label text-muted-foreground tablet:hidden columns:block block font-normal"34+ data-caption={stage}35+ >36 {stageRuns(stage)}37 </span>38 </li>39 ))}89 unmodified linesmodified:apps/web/src/features/landing/landing-now-list.tsx+10 added-4 removed
1 import { RecentLanding } from "@repo/protocol/domain/recent-landing";2 import type { ShownRefusal } from "@repo/protocol/domain/recent-landing";3 import type { ProjectName } from "@repo/protocol/ids";4-import { Array as Arr, DateTime } from "effect";4+import { Array as Arr, DateTime, Option } from "effect";5 import type { ReactNode } from "react";6 7-import { commitHref, shortSha } from "../code/paths.ts";7+import { commitHref } from "../code/paths.ts";8 import { AppLink } from "../shared/link.tsx";9 import { StateMarkIcon } from "../shared/marks.tsx";10 import { askPath, projectPath } from "../shared/paths.ts";11 import { UnreachableNotice } from "../shared/pending.tsx";9 unmodified lines21 {labelOf(refusal)}22 </span>23 );24 25-/** A row's title: the ask's want as sentence text, or, when the list does not know it, the ask's id or the commit in mono. */25+/** A row's title: the ask's want as sentence text, or, when the list does not know it, the ask's id in mono. */26 const titleOf = (want: string | undefined, code: string): ReactNode =>27 want ?? <span className="text-mono font-mono">{code}</span>;28 29+/** A landing that answered or opened no ask is the project's first: its adoption, which no ask records. */30+const FIRST_LANDING = "First landing";31+32 /**33 * One row: the mark, the project over what landed or was refused, why it was refused, and when. Below `tablet` why34 * and when sit under the title in its column, so every row keeps one shape whatever the want's length.35 */52 unmodified lines88 <Row89 key={keyOf(landing)}90 outcome="landed"91 project={project}89- title={titleOf(want, answered ?? opened ?? shortSha(sha))}92+ title={Option.match(Option.fromUndefinedOr(answered ?? opened), {93+ onNone: () => want ?? FIRST_LANDING,94+ onSome: (ask) => titleOf(want, ask),95+ })}96 to={commitHref(project, sha)}97 when={98 <>99 <span className="text-landed font-medium">Landed</span>{" "}55 unmodified linesmodified:apps/web/src/features/landing/landing-page.tsx+24 added-7 removed
3 unmodified lines4 import { buttonVariants } from "../../components/ui/button.tsx";5 import { ID, LINK } from "../shared/classes.ts";6 import { CommandLine } from "../shared/command.tsx";7 import { AppLink } from "../shared/link.tsx";8-import { ASKS_PATH, EXPLORE_PATH, INSTALL_PATH } from "../shared/paths.ts";8+import {9+ ASKS_PATH,10+ EXPLORE_PATH,11+ IMPORT_PATH,12+ INSTALL_PATH,13+} from "../shared/paths.ts";14 import { GUTTER } from "../shared/shell/gutter.ts";15 import { GateDrawing } from "./gate-drawing.tsx";16 import { LandingNowList } from "./landing-now-list.tsx";17 import type { LandingNow } from "./landing-now.ts";18 import { MusicBox } from "./music-box/music-box.tsx";19 import { WaysIn } from "./ways-in.tsx";15-import { CONCURRENCY, HEADLINE, HERO_LEDE } from "./words.ts";20+import { CONCURRENCY, HEADLINE, HERO_LEDE, RUN_A_PROJECT } from "./words.ts";21 17-/** The page's one main action, a size up from a toolbar's button. */22+/** The page's main action, a size up from a toolbar's button. */23 const PRIMARY = buttonVariants({24 className: "text-want h-11 px-6 no-underline",25 size: "lg",26 });27 28+/** The maintainer's way in, beside it at the same size, outlined. */29+const SECONDARY = buttonVariants({30+ className: "text-want h-11 px-6 no-underline",31+ size: "lg",32+ variant: "outline",33+});34+35 const Code = ({ children }: { readonly children: ReactNode }) => (36 <code className={ID}>{children}</code>37 );38 126 unmodified lines165 className="flex min-w-0 flex-1 flex-col pb-8 outline-none"166 id="main"167 tabIndex={-1}168 >157- {/* The hero: the headline and its lede centred between the rails, the one action under them, then Fig 1 across the frame. */}169+ {/* The hero: the headline and its lede centred between the rails, the two ways in under them, then Fig 1 across the frame. */}170 <div171 className={`tablet:pt-20 flex flex-col items-center gap-12 pt-12 pb-16 ${GUTTER}`}172 data-hero=""173 >11 unmodified lines185 <WithMain text={CONCURRENCY} />186 </p>187 </div>188 <div className="flex max-w-full flex-col items-center gap-4">189+ <div className="flex max-w-full flex-wrap justify-center gap-3">177- <AppLink className={PRIMARY} data-action="asks" to={ASKS_PATH}>178- Browse open asks179- </AppLink>190+ <AppLink className={PRIMARY} data-action="asks" to={ASKS_PATH}>191+ Browse open asks192+ </AppLink>193+ <AppLink className={SECONDARY} data-action="import" to={IMPORT_PATH}>194+ {RUN_A_PROJECT}195+ </AppLink>196+ </div>197 <div className="max-w-full min-w-0">198 <CommandLine command={installCommand(webUrl)} />199 </div>200 </div>30 unmodified linesmodified:apps/web/src/features/landing/words.ts+3 added
11 unmodified lines12 /** The hero's line on many agents at once, under the lede. */13 export const CONCURRENCY =14 "Many agents answer at once, each in a fork of its own, and main moves by one landing at a time.";15 16+/** The maintainer's way in, as the hero, Explore and the footer name it. */17+export const RUN_A_PROJECT = "Run a project: bring a repo";18+19 /** The README's lede, the page's description where it unfurls. */20 export const LEDE =21 "Everything a project ships is public, its contribution process is typed code on main, and a push lands only by passing a typed gate.";modified:apps/web/src/features/markdown/markdown.tsx+2 added-1 removed
97 unmodified lines98 "prose-img:my-0 prose-img:inline-block prose-img:max-w-full",99 "prose-table:text-ui prose-th:font-semibold",100 ];101 102-/** A page's own Markdown: its `#` is the page's one h1. */102+/** A page's own Markdown: its `#` is the page's one h1, and a transcript's `remote:` lines wrap on a phone. */103 const PROSE = [104 ...PROSE_BASE,105+ "prose-pre:whitespace-pre-wrap prose-pre:[overflow-wrap:anywhere]",106 "prose-h1:text-title prose-h1:mb-3 prose-h1:border-b prose-h1:border-rule prose-h1:pb-2",107 "prose-h2:text-title prose-h2:mt-8 prose-h2:mb-3",108 "prose-h3:text-want prose-h4:text-want",109 ].join(" ");57 unmodified linesmodified:apps/web/src/features/people/person-page.tsx+6 added-4 removed
6 unmodified lines7 import type { Handle, ProjectName } from "@repo/protocol/ids";8 import { Array, Order } from "effect";9 10 import { EmptyState } from "../shared/empty.tsx";11-import { PageShell } from "../shared/layout.tsx";11 import { AppLink } from "../shared/link.tsx";12 import { ASKS_PATH, projectPath } from "../shared/paths.ts";13 import { MetaCode, MetaLine, Row, RowGroup } from "../shared/row.tsx";14 import { projectSections } from "../shared/shell/sections.ts";73 unmodified lines88 })),89 project: Array.headNonEmpty(inProject).project,90 }));91 93-/** The Landings tab's own address, its region of Overview included. */92+/** The Landings tab's own address, with the filter or region it opens. */93 const landingsOf = (project: ProjectName) =>94 projectSections(project).find(({ tab }) => tab === "landings") ?? {95 hash: undefined,96+ search: undefined,97 to: projectPath(project),98 };99 100 const Project = ({ credit }: { readonly credit: ProjectCredit }) => (6 unmodified lines107 <Row108 data={{ "data-area": area, "data-project": credit.project }}109 hash={landingsOf(credit.project).hash}110 href={landingsOf(credit.project).to}111+ search={landingsOf(credit.project).search}112 id={`${credit.project}/${area}`}113 key={area}114 meta={115 <MetaLine44 unmodified lines160 </Workspace>161 );162 };163 164+/** The 404 for an address under `/people` that names no handle, drawn as a project's is. */165 export const NoSuchPersonView = () => (164- <PageShell title="No such person">166+ <Workspace crumbs={[{ label: "No such person" }]} title="No such person">167 <EmptyState168 onward={<AppLink to={ASKS_PATH}>Open asks</AppLink>}169 title="A handle is letters, digits and dashes, starting with a letter or digit, and this address names none."170 />169- </PageShell>171+ </Workspace>172 );modified:apps/web/src/features/project/landings.tsx+1 added-1 removed
17 unmodified lines18 Option.match(askOf(landing), {19 onNone: () =>20 landing.parent === undefined ? "First landing" : "Landed without an ask",21 onSome: ({ ask, kind }) =>22- kind === "opened" ? `Open ask ${ask}` : `Answer ${ask}`,22+ kind === "opened" ? `Opened ask ${ask}` : `Answer ${ask}`,23 });24 25 export const recentShown = (26 landings: readonly LandingView[]60 unmodified linesmodified:apps/web/src/features/project/project-frame.tsx+6 added-4 removed
1 /**2 * Every page of a project inside one frame: the project's header across the3- * top, the Code tab's bar under it on that tab's pages, then a page's side3+ * top, the code bar under it on the code's pages (the history and a commit4+ * sit under the Landings tab, yet are the code's), then a page's side5 * column (the file tree beside code, a finish's files) and the page itself.6 */7 import { useLocation } from "@tanstack/react-router";8+import { Option } from "effect";9 import type { ReactNode } from "react";10 9-import { projectTabOf } from "../shared/shell/sections.ts";11+import { codeAddressOf } from "../code/code-address.ts";12 import {13 SideColumnOutlet,14 useSideColumn,15 } from "../shared/shell/side-column.tsx";49 unmodified lines65 codeBar,66 header,67 }: {68 readonly header?: ReactNode;67- /** The Code tab's bar, drawn under the header on that tab's pages only. */69+ /** The code bar, drawn under the header on every page of the code (files, history, a commit, the refs), whichever tab the page sits under. */70 readonly codeBar?: ReactNode;71 readonly children: ReactNode;72 }) => {73 const column = useSideColumn() !== undefined;1 unmodified line75 76 const code =77 header !== undefined &&78 codeBar !== undefined &&77- projectTabOf(pathname) === "code";79+ Option.isSome(codeAddressOf(pathname));80 81 return (82 <div83 className={`flex w-full min-w-0 flex-1 flex-col ${header === undefined ? UNDER_BAR : UNDER_HEAD}`}23 unmodified linesmodified:apps/web/src/features/project/project-header.tsx+26 added-19 removed
271 unmodified lines272 aria-label={`${project} tabs`}273 className={`border-rule bg-background border-b ${GUTTER}`}274 data-project-tabs=""275 >276+ {/* Below `tablet` the strip scrolls with its scrollbar hidden, so a fade at its right edge is the cue that more tabs lie off screen. */}277+ <div278+ className="tablet:after:hidden after:from-background relative after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-10 after:bg-linear-to-l after:to-transparent after:content-['']"279+ data-tabs-fade=""280+ >276- <div className="flex [scrollbar-width:none] overflow-x-auto overscroll-x-contain">277- {projectSections(project).map(({ hash, label, tab, to }) => (278- <AppLink279- activeOptions={activeFor(hash)}280- aria-current={tab === current ? "page" : undefined}281- className={TAB}282- data-current={tab === current ? "" : undefined}283- key={tab}284- to={to}285- {...(hash === undefined ? {} : { hash })}286- >287- {label}288- {tab === "asks" && open !== undefined ? (289- <span className="text-label text-muted-foreground tabular-nums">290- {open.asks}291- </span>292- ) : null}293- </AppLink>294- ))}281+ <div className="flex [scrollbar-width:none] overflow-x-auto overscroll-x-contain">282+ {projectSections(project).map(({ hash, label, search, tab, to }) => (283+ <AppLink284+ activeOptions={activeFor(hash)}285+ aria-current={tab === current ? "page" : undefined}286+ className={TAB}287+ data-current={tab === current ? "" : undefined}288+ key={tab}289+ to={to}290+ {...(hash === undefined ? {} : { hash })}291+ {...(search === undefined ? {} : { search })}292+ >293+ {label}294+ {tab === "asks" && open !== undefined ? (295+ <span className="text-label text-muted-foreground tabular-nums">296+ {open.asks}297+ </span>298+ ) : null}299+ </AppLink>300+ ))}301+ </div>302 </div>303 </nav>304 );305 49 unmodified linesmodified:apps/web/src/features/project/project-page.tsx+19 added-2 removed
15 unmodified lines16 import type { DateTime } from "effect";17 import { LockKeyhole } from "lucide-react";18 import type { ReactNode } from "react";19 20+import { signInHref } from "../auth/session-slot.tsx";21 import { ForAgents, Onward, plural } from "../front/facts.tsx";22 import { stillWaiting } from "../front/families.ts";23 import { ProposeLink } from "../propose/propose-link.tsx";24+import { proposeFormPath } from "../propose/propose-view.tsx";25 import type { AskProgress } from "../shared/ask-progress.ts";26 import { LINK } from "../shared/classes.ts";27 import { CommandLine } from "../shared/command.tsx";28 import { EmptyState } from "../shared/empty.tsx";146 unmodified lines175 <Onward to="/docs/landing">How a landing happens</Onward>176 </AboutCard>177 );178 179+/** The glob that covers the whole tree reads in words, not as a glob. */180+const EVERY_PATH = "**";181+182 const WhoDecides = ({183 deciders,184 project,185 }: {12 unmodified lines198 ) : (199 <ul className="flex flex-col gap-1">200 {shown.map(({ handles, paths }) => (201 <li className="text-ui min-w-0" key={paths}>202+ {paths === EVERY_PATH ? (203+ <span className="text-muted-foreground">every path</span>204+ ) : (197- <MetaCode>{paths}</MetaCode>205+ <MetaCode>{paths}</MetaCode>206+ )}207 <span className="text-muted-foreground"> · </span>208 {handles.join(", ")}209 </li>210 ))}279 unmodified lines490 <p className="text-ui text-muted-foreground max-w-(--measure)">491 A proposal asks a maintainer to open an ask. An agent on the platform492 drafts its ask file and check, and it expires unless a maintainer accepts493 it.485- {signedIn ? null : " Sign in to propose one."}494+ {signedIn ? null : (495+ <>496+ {" "}497+ <a className={LINK} href={signInHref(proposeFormPath(project))}>498+ Sign in499+ </a>{" "}500+ to propose one.501+ </>502+ )}503 </p>504 </section>505 );506 83 unmodified linesmodified:apps/web/src/features/propose/propose-view.tsx+8 added-6 removed
71 unmodified lines72 73 return busy ? "Proposing" : "Propose";74 };75 76-const PROPOSE_COMMAND = `${Brand.cli} propose --draft "<want>"`;76+/** The same proposal from a terminal, with the flags the CLI's `propose` takes: the want, the project, and a draft asked for. */77+export const proposeCommand = (project: ProjectName) =>78+ `${Brand.cli} propose --want "<want>" --project ${project} --draft`;79 80 const SignInFirst = ({81 about,82 project,26 unmodified lines109 </a>{" "}110 to propose one here, or propose from your clone:111 </span>112 </p>111- <CommandLine command={PROPOSE_COMMAND} />113+ <CommandLine command={proposeCommand(project)} />114 </section>115 );116 115-const GoodWant = () => (117+const GoodWant = ({ project }: { readonly project: ProjectName }) => (118 <>119 <FactBlock label="A good want">120 <ul className="text-ui flex list-disc flex-col gap-1.5 pl-4">121 <li>Says what the project should do, not how to change the code.</li>1 unmodified line123 <li>Says how you would tell it is done: what a check would see.</li>124 </ul>125 </FactBlock>126 <FactBlock label="From a terminal">125- <CommandLine command={PROPOSE_COMMAND} numbered />127+ <CommandLine command={proposeCommand(project)} numbered />128 </FactBlock>129 </>130 );131 179 unmodified lines311 crumbs={[312 { label: project, to: `/${project}` },313 { label: "Propose an ask" },314 ]}313- facts={<GoodWant />}315+ facts={<GoodWant project={project} />}316 factsHeading="Proposing"317 meta="A maintainer decides whether the ask opens; nothing lands from here."318 title="Propose an ask"319 >8 unmodified lines328 >329 {children}330 </ProposeBody>331 <div className="border-rule flex flex-col border-t pt-4">330- <GoodWant />332+ <GoodWant project={project} />333 </div>334 </Workspace>335 </div>336 );modified:apps/web/src/features/shared/shell/footer.tsx+3 added
1 unmodified line2 3 import { AppLink } from "../link.tsx";4 import {5 docsPath,6+ IMPORT_PATH,7 INSTALL_PATH,8 PRIVACY_PATH,9 SETTINGS_PATH,10 TERMS_PATH,11 } from "../paths.ts";12 import { GUTTER } from "./gutter.ts";13 14+/** Plain links, the maintainer's way in among them: the hero's "Run a project: bring a repo", shortened. */15 const LINKS = [16 { label: "Docs", to: docsPath() },17 { label: "Install", to: INSTALL_PATH },18+ { label: "Bring a repo", to: IMPORT_PATH },19 { label: "Settings", to: SETTINGS_PATH },20 { label: "Privacy", to: PRIVACY_PATH },21 { label: "Terms", to: TERMS_PATH },22 ] as const;42 unmodified linesmodified:apps/web/src/features/shared/shell/sections.ts+12 added-9 removed
18 unmodified lines19 readonly tab: ProjectTab;20 readonly to: string;21 /** A tab whose own page has not been built yet opens the region of Overview that holds it. */22 readonly hash?: string;23+ /** A tab that opens a page's filtered view carries the filter in the query. */24+ readonly search?: Readonly<Record<string, string>>;25 }26 27 /**28 * Each tab opens a page inside the project's frame that exists today: Asks,27- * Landings, Proposals and People open their regions of Overview (the history28- * of commits is the Code tab's), Policy the policy at the address it has29- * always had, and Visibility its own page. Starting a30- * proposal is a focused page of its own, so it is Contribute's, not a tab's.29+ * Proposals and People open their regions of Overview, Landings the history30+ * of main shown as its landings (the Code tab's History, filtered), Policy31+ * the policy at the address it has always had, and Visibility its own page.32+ * Starting a proposal is a focused page of its own, so it is Contribute's,33+ * not a tab's.34 */35 export const projectSections = (project: string): readonly Section[] => [36 { label: "Overview", tab: "overview", to: `/${project}` },37 { label: "Code", tab: "code", to: `/${project}/tree/main` },38 { hash: "open-asks", label: "Asks", tab: "asks", to: `/${project}` },39 {37- hash: "recent-landings",40 label: "Landings",41+ search: { show: "landings" },42 tab: "landings",40- to: `/${project}`,43+ to: `/${project}/commits/main`,44 },45 {46 hash: "proposals",47 label: "Proposals",4 unmodified lines52 { label: "Policy", tab: "policy", to: `/${project}/people` },53 { label: "Visibility", tab: "visibility", to: `/${project}/visibility` },54 ];55 53-/** The tab each page of a project sits under, by its first segment. */56+/** The tab each page of a project sits under, by its first segment: the history and a commit are the Landings tab's, as its crumb says. */57 const TAB_OF = {58 answers: "landings",59 asks: "asks",60 blob: "code",58- commit: "code",59- commits: "code",61+ commit: "landings",62+ commits: "landings",63 decisions: "asks",64 people: "policy",65 proposals: "proposals",66 raw: "code",226 unmodified linesmodified:apps/web/src/features/shared/credits.tsx+1 added-1 removed
10 unmodified lines11 export const inTrailerOrder = (credits: readonly Credit[]) =>12 credits.toSorted((one, other) => rank(one) - rank(other));13 14 export const assistedValue = ({ harness, model, verified }: AgentTrailer) =>15- `${harness}${model === undefined ? "" : `:${model}`} (${verified ? "verified" : "claimed"})`;15+ `${harness}${model === undefined ? "" : `:${model}`} (${verified ? "verified" : "self-reported"})`;16 17 const LINES = "flex flex-col gap-1 font-mono text-mono leading-terminal";18 19 const LABEL = "text-label text-muted-foreground";104 unmodified linesmodified:apps/web/src/features/shared/outcome.tsx+4 added-4 removed
169 unmodified lines170 data-stage={name}171 data-state={state}172 key={name}173 >174- <span className="text-label flex min-w-0 items-start gap-1.5">174+ {/* Four cells a row on a phone, then three: the mark sits over the name there, so "Maintainer" and "Held-back" stand whole. */}175+ <span className="text-label tablet:flex-row tablet:items-start tablet:gap-1.5 flex min-w-0 flex-col gap-0.5">176 <StateMarkIcon177 className="mt-px"178 mark={marks[state].mark}179 size="sm"180 />180- {/* Four cells a row on a phone: a long label wraps rather than losing its end. */}181 <span182- className={`min-w-0 break-words ${182+ className={`min-w-0 [hyphens:none] whitespace-nowrap ${183 state === "pending" || state === "skipped"184 ? "text-muted-foreground"185 : "text-foreground"186 }`}2 unmodified lines189 {stageNames(name).label}190 </span>191 </span>192 <span193- className={`text-label pl-5 font-normal ${193+ className={`text-label tablet:pl-5 font-normal ${194 state === "current" ? currentTone : wordTones[state]195 }`}196 >197 {marks[state].word}6 unmodified linesmodified:apps/web/src/routes/$owner/$project/commits/$rev.tsx+8 added-7 removed
10 unmodified lines11 projectOf,12 repoPathOf,13 revisionOf,14 } from "../../../../features/code/address.ts";15+import {16+ defaultShowOf,17+ LOG_PAGE,18+ LOG_SHOWS,15-import { LOG_PAGE } from "../../../../features/code/log-page.ts";19+} from "../../../../features/code/log-page.ts";20 import { LogView } from "../../../../features/code/log-view.tsx";17-import type { LogShow } from "../../../../features/code/log-view.tsx";21 import { CodeNotFound } from "../../../../features/code/not-found.tsx";22 import { pageHead } from "../../../../features/shared/head.ts";23 import { notFoundFor } from "../../../../features/shared/refusals.ts";24 import { branchPage } from "../../../../server/cache-headers.ts";11 unmodified lines36 project: ProjectName,37 rev: Schema.String,38 });39 37-const SHOWS: readonly LogShow[] = ["answers", "openings"];38-40 interface LogParams {41 readonly from?: number | undefined;42 readonly path?: string | undefined;43 readonly project: string;58 unmodified lines102 now={read.now}103 path={read.path}104 project={read.project}105 rev={read.rev}105- show={show ?? "all"}106+ show={show ?? defaultShowOf(read.rev, read.path)}107 />108 );109 };110 5 unmodified lines116 readonly show?: unknown;117 }) => ({118 from: Option.getOrUndefined(offsetOf(search.from)),119 path: Predicate.isString(search.path) ? search.path : undefined,119- show: SHOWS.find((each) => each === search.show),120+ show: LOG_SHOWS.find((each) => each === search.show),121 }),122 loaderDeps: ({ search }) => ({ from: search.from, path: search.path }),123 loader: ({ deps, params }) => logPage({ data: { ...params, ...deps } }),124 headers: () => branchPage,125 head: ({ params: { project, rev } }) =>125- pageHead({ title: `${project}: landings on ${rev}` }),126+ pageHead({ title: `${project}: history of ${rev}` }),127 component: LogPage,128 notFoundComponent: CodeNotFound,129 });modified:apps/web/src/routes/$owner/$project/tree/-code-column.tsx+1 added-1 removed
26 unmodified lines27 </Suspense>28 </ClientOnly>29 );30 31-/** The repository's tree beside a page of Files or Commits. */31+/** The repository's tree beside a page of Files or History. */32 export const CodeColumn = () => (33 <SideColumn label="Files">34 <Later commit={false} />35 </SideColumn>8 unmodified linesmodified:apps/web/src/routes/$owner/$project/tree/-files-button.tsx+1 added-1 removed
23 unmodified lines24 size="sm"25 variant="outline"26 >27 <FolderTree aria-hidden="true" strokeWidth={1.75} />28- {/* Not "Files": the bar's toggle beside it is Files | Commits. */}28+ {/* Not "Files": the bar's toggle beside it is Files | History. */}29 {commit ? "Changed files" : "Tree"}30 </Button>31 {FilesSheet === undefined || !open ? null : (32 <Suspense fallback={null}>6 unmodified linesmodified:apps/web/src/routes/people/$handle.tsx+39 added-27 removed
1-import { useAtomValue } from "@effect/atom-react";1+import { Client } from "@repo/protocol/contracts";2+import { CreditSummary } from "@repo/protocol/domain/record";3 import { Handle } from "@repo/protocol/ids";4 import { createFileRoute, notFound } from "@tanstack/react-router";4-import { Effect, Option, Schema } from "effect";5-import { AsyncResult } from "effect/reactivity";5+import { createServerFn } from "@tanstack/react-start";6+import { env } from "cloudflare:workers";7+import { Effect, Schema } from "effect";8 7-import { creditsAtom } from "../../client/people.ts";9 import {10 NoSuchPersonView,11 PersonView,12 } from "../../features/people/person-page.tsx";13 import { pageHead } from "../../features/shared/head.ts";13-import { Reading, Unreachable } from "../../features/shared/pending.tsx";14 import { branchPage } from "../../server/cache-headers.ts";15+import { serverClient } from "../../server/client.ts";16 16-const decodeHandle = Schema.decodeUnknownOption(Handle);17+const PersonPageData = Schema.Struct({18+ credits: Schema.Array(CreditSummary),19+ handle: Handle,20+});21 18-const Credits = ({ handle }: { readonly handle: Handle }) =>19- AsyncResult.matchWithError(useAtomValue(creditsAtom(handle)), {20- onDefect: () => <Unreachable title={handle} />,21- onError: () => <Unreachable title={handle} />,22- onInitial: () => <Reading title={handle} />,23- onSuccess: ({ value }) => (24- <PersonView credits={value.credits} handle={handle} />25- ),22+/**23+ * The page arrives with its credits: an address that names no handle is not24+ * found before anything is read.25+ */26+export const readPersonPage = (handle: string) =>27+ Effect.gen(function* () {28+ const person = yield* Effect.mapError(29+ Schema.decodeEffect(Handle)(handle),30+ () => notFound()31+ );32+33+ const client = yield* Client;34+ const { credits } = yield* client.credits({ handle: person });35+36+ return yield* Schema.encodeEffect(PersonPageData)({37+ credits,38+ handle: person,39+ });40 });41 42+const personPage = createServerFn({ method: "GET" })43+ .validator((handle: string) => handle)44+ .handler(({ data }) =>45+ Effect.runPromise(46+ readPersonPage(data).pipe(Effect.provide(serverClient(env)))47+ )48+ );49+50 const PersonPage = () => {29- const { handle } = Route.useParams();51+ const read = Schema.decodeSync(PersonPageData)(Route.useLoaderData());52 31- return Option.match(decodeHandle(handle), {32- onNone: () => <NoSuchPersonView />,33- onSome: (person) => <Credits handle={person} />,34- });53+ return <PersonView credits={read.credits} handle={read.handle} />;54 };55 56 export const Route = createFileRoute("/people/$handle")({57 staticData: { shell: "project" },3 unmodified lines61 pageHead({62 description: `What ${params.handle} is credited for, by project and area.`,63 title: params.handle,64 }),46- loader: ({ params }) =>47- Effect.runPromise(48- Effect.asVoid(49- Effect.mapError(Schema.decodeEffect(Handle)(params.handle), () =>50- notFound()51- )52- )53- ),65+ loader: ({ params }) => personPage({ data: params.handle }),66 notFoundComponent: NoSuchPersonView,67 });modified:apps/web/src/server/llms.ts+5 added-2 removed
9 unmodified lines10 projectLlms,11 } from "../features/agents/llms.ts";12 import { markdown, unavailable } from "../features/agents/respond.ts";13 import { stillWaiting } from "../features/front/families.ts";14+import { openAsks } from "../features/project/asks.tsx";15 16 export type ClientFor = (request: Request) => Layer.Layer<Client>;17 18 export const frontLlmsHandler =63 unmodified lines82 }83 84 return markdown(85 projectLlms({85- // An ask waits only on asks still open, as the page says.86- asks: stillWaiting(asks.value),86+ // An ask waits only on asks still open, and a family's finale87+ // is folded into its family while it waits, so the count is the88+ // page's and the header's.89+ asks: openAsks(stillWaiting(asks.value)),90 commands,91 listing: listing.value,92 platformUrl,93 webUrl,7 unmodified linesmodified:apps/web/test/agents.test.tsx+34 added
141 unmodified lines142 }143 })144 );145 146+ it.effect(147+ "wraps the sentence to paste, its URLs anywhere, and keeps a config file as written",148+ () =>149+ Effect.gen(function* () {150+ const html = yield* page;151+152+ const blocks = [...html.matchAll(/<pre\b[^>]*>/gu)].map(([tag]) => ({153+ label: decoded(154+ /aria-label="(?<label>[^"]*)"/u.exec(tag)?.groups?.label ?? ""155+ ),156+ wraps:157+ tag.includes("whitespace-pre-wrap") &&158+ tag.includes("[overflow-wrap:anywhere]"),159+ }));160+161+ const prompt = blocks.filter(162+ ({ label }) => label === "Paste into the agent's prompt"163+ );164+165+ expect(prompt).toHaveLength(1);166+ expect(prompt.every(({ wraps }) => wraps)).toBeTruthy();167+ expect(168+ blocks.filter(169+ ({ label }) => label !== "Paste into the agent's prompt"170+ ).length171+ ).toBeGreaterThan(0);172+ expect(173+ blocks174+ .filter(({ label }) => label !== "Paste into the agent's prompt")175+ .some(({ wraps }) => wraps)176+ ).toBeFalsy();177+ })178+ );179+180 it.effect("gives every snippet a button that copies it", () =>181 Effect.gen(function* () {182 expect(183 (yield* page).match(110 unmodified linesmodified:apps/web/test/answer.test.tsx+10 added
267 unmodified lines268 expect(textIn(markup)).toContain("waits for 1 ask to land first");269 expect(markup).toContain(`href="/oscabriel/datekit/asks/${askId}"`);270 });271 272+ it("reads a family's parent, open but waiting on its children, as waiting, never as open to take", () => {273+ const blocked = { ...ask, blockedBy: [AskId.make("split-format")] };274+ const markup = markupOf(page({ ask: blocked, verdict: undefined }));275+276+ expect(markup).not.toContain(">Open to take<");277+ expect(markup).toMatch(/<strong\b[^>]*>Waiting<\/strong>/u);278+ // An ask nothing blocks is open to take, as before.279+ expect(markupOf(page({ verdict: undefined }))).toContain(">Open to take<");280+ });281+282 it("names a lane's log only as the command that reads it", () => {283 const passing = verdictOf(Outcome.cases.Checking.make({ stage: "checks" }));284 const text = textOf(page({ verdict: passing }));285 465 unmodified linesmodified:apps/web/test/code.test.tsx+145 added-17 removed
36 unmodified lines37 import { CommitView } from "../src/features/code/commit-view.tsx";38 import { FileFacts } from "../src/features/code/file-facts.tsx";39 import { filesMatching } from "../src/features/code/file-match.ts";40 import { LOG_PAGE } from "../src/features/code/log-page.ts";41-import { LogView } from "../src/features/code/log-view.tsx";41+import { LogView, titleOf } from "../src/features/code/log-view.tsx";42 import { CodeNotFound } from "../src/features/code/not-found.tsx";43 import { SoftLanding } from "../src/features/code/soft-landing.ts";44 import { TreeView } from "../src/features/code/tree-view.tsx";45 import { ProjectFrame } from "../src/features/project/project-frame.tsx";9 unmodified lines55 import {56 CodeColumn,57 CommitColumn,58 } from "../src/routes/$owner/$project/tree/-code-column.tsx";59+import { plainText } from "./ask-fixtures.ts";60 import { elementWith, elementsWith } from "./records.ts";61 import { renderAt } from "./render.tsx";62 import { reachingTransport } from "./transport.ts";63 682 unmodified lines746 })747 );748 749 it.effect(749- "has the Files/Commits toggle, Files current, and the ref switcher on main",750+ "has the Files/History toggle, Files current, and the revision picker reading At main",751 () =>752 Effect.gen(function* () {753 const bars = (yield* treeAndBlob).map(codeBarOf);754 755 expect(756 bars.map((bar) =>756- linksIn(navOf(bar, 'aria-label="Files or commits"'))757+ linksIn(navOf(bar, 'aria-label="Files or history"'))758 )759 ).toStrictEqual(760 bars.map(() => [761 {3 unmodified lines765 },766 {767 current: false,768 href: "/oscabriel/datekit/commits/main",768- text: "Commits",769+ text: "History",770 },771 ])772 );773 expect(774 bars.map((bar) => /<button\b[^>]*data-ref="main"[^>]*>/u.test(bar))775 ).toStrictEqual([true, true]);776+ expect(777+ bars.map((bar) =>778+ plainText(elementWith(bar, 'data-ref="main"'))779+ .replaceAll(/\s+/gu, " ")780+ .trim()781+ )782+ ).toStrictEqual(["At main", "At main"]);783+ expect(784+ bars.map((bar) => elementWith(bar, 'data-ref="main"'))785+ ).not.toContain("lucide-git-branch");786 })787 );788 789 it.effect(37 unmodified lines827 })828 );829 830 it.effect(820- "marks Commits on the history and on a commit, at the same revision, and nothing on the refs list",831+ "marks History on the history and on a commit, at the same revision, and nothing on the refs list",832 () =>833 Effect.gen(function* () {834 const pages = yield* Effect.forEach(835 [4 unmodified lines840 (url) => inCodeTab(url, <main id="main" />)841 );842 843 const toggles = pages.map((markup) =>833- linksIn(navOf(codeBarOf(markup), 'aria-label="Files or commits"'))844+ linksIn(navOf(codeBarOf(markup), 'aria-label="Files or history"'))845 );846 847 expect(848 toggles.map((links) =>849 links.flatMap(({ current, text }) => (current ? [text] : []))850 )840- ).toStrictEqual([["Commits"], ["Commits"], []]);851+ ).toStrictEqual([["History"], ["History"], []]);852 expect(toggles[0]?.map(({ href }) => href)).toStrictEqual([853 `/oscabriel/datekit/tree/${TAG_SEGMENT}`,854 `/oscabriel/datekit/commits/${TAG_SEGMENT}`,855 ]);119 unmodified lines975 next={30}976 now={now}977 project={datekit}978 rev="main"979+ show="all"980 />981 );982 983+ /** The same page as main's history opens: no filter named, so the landings alone. */984+ const landings = (985+ <LogView986+ commits={commits}987+ from={0}988+ next={30}989+ now={now}990+ project={datekit}991+ rev="main"992+ />993+ );994+995 it("groups the commits of one day under one sticky header", () => {996 const markup = markupOf(page);997 998 const days = [...markup.matchAll(/data-day="(?<day>[^"]+)"/gu)].map(134 unmodified lines1133 expect(hrefsOf(filters)).toStrictEqual([1134 "/oscabriel/datekit/commits/main",1135 "/oscabriel/datekit/commits/main?show=answers",1136 "/oscabriel/datekit/commits/main?show=openings",1137+ "/oscabriel/datekit/commits/main?show=all",1138 ]);1114- expect(filters).toMatch(/aria-current="page"[^>]*>All</u);1139+ expect(filters).toMatch(/aria-current="page"[^>]*>Every commit</u);1140+ expect(1141+ [...filters.matchAll(/<a\b[^>]*>(?<label>[^<]*)</gu)].map(1142+ ({ groups }) => groups?.label1143+ )1144+ ).toStrictEqual(["Landings", "Answers", "Ask openings", "Every commit"]);1145 });1146 1117- it("says an imported commit came before adoption", () => {1118- const row = slice(markupOf(page), "data-commit", IMPORTED);1147+ it("is titled History of main, of a fork, or at a tag", () => {1148+ expect(1149+ ["main", "@bram/parse-iso", TAG].map((rev) => titleOf(undefined, rev))1150+ ).toStrictEqual([1151+ "History of main",1152+ "History of bram/parse-iso",1153+ `History at ${TAG}`,1154+ ]);1155+ expect(titleOf(RepoPath.make("src/index.ts"), "main")).toBe(1156+ "History of src/index.ts"1157+ );1158+ expect(markupOf(landings)).toMatch(/<h1\b[^>]*>History of main<\/h1>/u);1159+ });1160 1120- expect(row).toContain("before adoption");1121- expect(hrefsOf(row)).toContain(`/oscabriel/datekit/commit/${IMPORTED}`);1122- expect(slice(markupOf(page), "data-commit", LANDED)).not.toContain(1123- "before adoption"1161+ it("shows main's landings alone by default, and counts them as landings", () => {1162+ const markup = markupOf(landings);1163+1164+ expect(markup).toContain(`data-commit="${LANDED}"`);1165+ expect(markup).not.toContain(`data-commit="${IMPORTED}"`);1166+ expect(navOf(markup, 'aria-label="Show"')).toMatch(1167+ /aria-current="page"[^>]*>Landings</u1168 );1169+ expect(plainText(markup)).toContain("1 landing");1170+ expect(plainText(markup)).not.toContain("commits");1171 });1172 1173+ it("pages the landings no further than the adoption, and a full page of them on", () => {1174+ // The page holds a commit no landing records, so no older page holds one.1175+ expect(markupOf(landings)).not.toContain('data-slot="pagination"');1176+ // A full page of landings pages on, keeping the default out of the address.1177+ const [landed] = commits;1178+1179+ expect(1180+ hrefsOf(1181+ markupOf(1182+ <LogView1183+ commits={landed === undefined ? [] : [landed]}1184+ from={0}1185+ next={30}1186+ now={now}1187+ project={datekit}1188+ rev="main"1189+ />1190+ )1191+ )1192+ ).toContain("/oscabriel/datekit/commits/main?from=30");1193+ });1194+1195+ it("marks the adoption once, over the first commit no landing records, in place of a word on every row", () => {1196+ const markup = markupOf(page);1197+1198+ expect(markup.match(/data-adopted="/gu)).toHaveLength(1);1199+ expect(markup.indexOf(`data-adopted="${IMPORTED}"`)).toBeGreaterThan(1200+ markup.indexOf(`data-commit="${LANDED}"`)1201+ );1202+ expect(markup.indexOf(`data-adopted="${IMPORTED}"`)).toBeLessThan(1203+ markup.indexOf(`data-commit="${IMPORTED}"`)1204+ );1205+ expect(plainText(markup)).toContain(1206+ "Adopted here. The commits below came with the import; no landing records them."1207+ );1208+ });1209+1210+ it("says nothing on an imported commit's own row, which still opens the commit, and counts a mixed day as commits", () => {1211+ const markup = markupOf(page);1212+1213+ expect(plainText(markup)).not.toContain("before adoption");1214+ expect(plainText(markup)).toContain("2 commits");1215+ expect(hrefsOf(slice(markup, "data-commit", IMPORTED))).toContain(1216+ `/oscabriel/datekit/commit/${IMPORTED}`1217+ );1218+ });1219+1220+ it("marks no fork's own commit as the adoption: the first break after a landing is", () => {1221+ const [own] = decodeCommits([1222+ {1223+ author: signature("Bob", "2026-10-07T09:00:00.000Z"),1224+ body: "",1225+ committer: signature("Bob", "2026-10-07T09:00:00.000Z"),1226+ parents: [LANDED],1227+ sha: "9".repeat(40),1228+ subject: "Parse ISO weeks",1229+ trailers: [],1230+ tree: "a".repeat(40),1231+ },1232+ ]);1233+1234+ const markup = markupOf(1235+ <LogView1236+ commits={own === undefined ? commits : [own, ...commits]}1237+ from={0}1238+ now={now}1239+ project={datekit}1240+ rev="@bob/parse-iso"1241+ />1242+ );1243+1244+ expect(1245+ [...markup.matchAll(/data-adopted="(?<sha>[^"]*)"/gu)].map(1246+ ({ groups }) => groups?.sha1247+ )1248+ ).toStrictEqual([IMPORTED]);1249+ expect(markup).toMatch(/<h1\b[^>]*>History of bob\/parse-iso<\/h1>/u);1250+ expect(navOf(markup, 'aria-label="Show"')).toMatch(1251+ /aria-current="page"[^>]*>Every commit</u1252+ );1253+ });1254+1255 it("links the older page from where this one ends, and no newer page from the first", () => {1256 const pager = navOf(markupOf(page), 'data-slot="pagination"');1257 1258 expect(hrefsOf(pager)).toStrictEqual([1131- "/oscabriel/datekit/commits/main?from=30",1259+ "/oscabriel/datekit/commits/main?from=30&show=all",1260 ]);1261 });1262 1263 it("keeps the path on both pages of a path's history", () => {834 unmodified lines2098 ]);2099 });2100 2101 it.effect(1974- "names the fork in the ref switcher, with Files and Commits kept at the fork",2102+ "names the fork in the revision picker, with Files and History kept at the fork",2103 () =>2104 Effect.gen(function* () {2105 const bar = codeBarOf(2106 yield* inCodeTab(5 unmodified lines2112 expect(elementWith(bar, `data-ref="${FORK}"`)).toContain(2113 "bob/parse-iso"2114 );2115 expect(1988- linksIn(navOf(bar, 'aria-label="Files or commits"')).map(2116+ linksIn(navOf(bar, 'aria-label="Files or history"')).map(2117 ({ href }) => href2118 )2119 ).toStrictEqual([2120 `/oscabriel/datekit/tree/${FORK_SEGMENT}`,52 unmodified linesmodified:apps/web/test/credits.test.tsx+2 added-1 removed
54 unmodified lines55 credits={credits}56 />57 );58 59- expect(text).toContain("Assisted-by: pi:opus-4 (claimed)");59+ expect(text).toContain("Assisted-by: pi:opus-4 (self-reported)");60+ expect(text).not.toContain("(claimed)");61 });62 63 it("shows a held-back trailer as its own Held-back line", () => {64 const text = textOf(53 unmodified linesmodified:apps/web/test/dev-backend.test.ts+35 added
18 unmodified lines19 20 import { devStart } from "../src/dev/clock.ts";21 import { devServer } from "../src/dev/server.ts";22 import { devToken } from "../src/dev/sessions.ts";23+import { stillWaiting } from "../src/features/front/families.ts";24+import { openAsks } from "../src/features/project/asks.tsx";25 26 const PROJECTS = [27 ProjectName.make("oscabriel/burrow"),28 ProjectName.make("oscabriel/datekit"),50 unmodified lines79 return { entries, projects };80 })81 );82 83+const listedWithAsks = inFreshWorld((as) =>84+ Effect.gen(function* () {85+ const anyone = yield* clientOf(as());86+ const { projects } = yield* anyone.listProjects({});87+88+ const asks = yield* Effect.forEach(PROJECTS, (project) =>89+ Effect.map(anyone.listAsks({ project }), ({ asks: listed }) => ({90+ asks: listed,91+ project,92+ }))93+ );94+95+ return { asks, projects };96+ })97+);98+99 const instants = inFreshWorld((as) =>100 Effect.gen(function* () {101 const anyone = yield* clientOf(as());102 const ines = yield* clientOf(as(decider));191 unmodified lines294 expect(landedAt).toHaveLength(1);295 })296 );297 298+ it.live(299+ "counts each project's open asks as its page does: a split family as one row, its finale folded in while it waits",300+ () =>301+ Effect.gen(function* () {302+ const { asks, projects } = yield* listedWithAsks;303+304+ expect(305+ projects.map(({ openAsks: count, project }) => [project, count])306+ ).toStrictEqual(307+ asks.map(({ asks: listed, project }) => [308+ project,309+ openAsks(stillWaiting(listed)).length,310+ ])311+ );312+ })313+ );314+315 it.live("lists each project at the posture its own ledger gives", () =>316 Effect.gen(function* () {317 const { ledgers, projects } = yield* listedWithLedgers;318 223 unmodified linesmodified:apps/web/test/docs.test.tsx+18 added
131 unmodified lines132 /** The classes on the docs tree's wrapper. */133 const treeClasses = (tag: string) =>134 (attributeOf(tag, "class") ?? "").split(" ");135 136+describe("a transcript in the docs", () => {137+ it.effect(138+ "wraps its `remote:` lines on a phone instead of clipping them",139+ () =>140+ Effect.gen(function* () {141+ const article = elementOf(142+ yield* inDocsShell("start-here"),143+ "article",144+ "data-doc"145+ );146+147+ expect(article).toContain("remote: OutOfScope");148+ expect(article).toContain("prose-pre:whitespace-pre-wrap");149+ expect(article).toContain("prose-pre:[overflow-wrap:anywhere]");150+ })151+ );152+});153+154 describe("the docs below `columns`", () => {155 it.effect(156 "fold a page's headings into a disclosure ahead of its body, linking what On this page links",157 () =>250 unmodified linesmodified:apps/web/test/explore.test.tsx+17 added
5 unmodified lines6 import { ExploreView } from "../src/features/explore/explore-page.tsx";7 import { exploreGroups } from "../src/features/explore/groups.ts";8 import { LandingProjects } from "../src/features/landing/projects.ts";9 import { readEveryProject } from "../src/features/landing/read.ts";10+import { RUN_A_PROJECT } from "../src/features/landing/words.ts";11 import { fixturesClient } from "./dev-client.ts";12 import { TEN_LISTED } from "./listings.ts";13 import { textIn } from "./markup.ts";14 import { unreachablePlatform } from "./platform.ts";181 unmodified lines196 expect(textIn(markup)).not.toMatch(/\d+ landings?/u);197 })198 );199 200+ it.effect(201+ "offers the maintainer's way in from its header, the hero's words, as the router's link to the import page",202+ () =>203+ Effect.gen(function* () {204+ const markup = yield* explored(TEN_LISTED);205+ const header = markup.slice(0, markup.indexOf('data-group="taking"'));206+207+ expect(header).toMatch(208+ new RegExp(209+ `<a\\b[^>]*data-action="import"[^>]*href="/import"[^>]*>${RUN_A_PROJECT}</a>`,210+ "u"211+ )212+ );213+ })214+ );215+216 it.effect("links each project to its own page under its full name", () =>217 Effect.gen(function* () {218 const markup = yield* explored(TEN_LISTED);219 11 unmodified linesmodified:apps/web/test/home.test.tsx+47 added
7 unmodified lines8 import {9 AskId,10 CommitSha,11 Handle,12+ LandedSha,13 ProjectName,14 RequestId,15 } from "@repo/protocol/ids";16 import { ClaimLapsed } from "@repo/protocol/refusal";51 unmodified lines68 [...markup.matchAll(/<section\b[^>]*aria-label="(?<name>[^"]+)"/gu)].map(69 (found) => found.groups?.name70 );71 72+/** Each stage of a strip with its state, in the gate's order. */73+const stagesOf = (markup: string) =>74+ [75+ ...markup.matchAll(76+ /data-stage="(?<stage>[^"]+)" data-state="(?<state>[^"]+)"/gu77+ ),78+ ].map((found) => `${found.groups?.stage} ${found.groups?.state}`);79+80 const commandsOf = (markup: string) =>81 [...markup.matchAll(/<code\b[^>]*>(?<command>.*?)<\/code>/gsu)].map((found) =>82 textIn(found.groups?.command ?? "").trim()83 );139 unmodified lines223 ]);224 })225 );226 227+ it.effect(228+ "reads a landed answer's held-back and maintainer stages as not needed when its verdict held neither, as the answer page does",229+ () =>230+ Effect.gen(function* () {231+ const landed: AnswerView = {232+ ...refused("parse-iso-week"),233+ outcome: Outcome.cases.Landed.make({234+ sha: LandedSha.make("c".repeat(40)),235+ }),236+ };237+238+ const work = {239+ answer: landed,240+ claim: claim({241+ ask: "parse-iso-week",242+ fork: "datekit--parse-iso-week--bram",243+ state: "answered",244+ }),245+ stage: "human",246+ } as const;247+248+ expect(249+ stagesOf(250+ yield* pageOf({251+ work: [{ ...work, holds: { decided: false, heldBack: false } }],252+ })253+ ).slice(5)254+ ).toStrictEqual(["heldBack skipped", "human skipped"]);255+ expect(256+ stagesOf(257+ yield* pageOf({258+ work: [{ ...work, holds: { decided: true, heldBack: true } }],259+ })260+ ).slice(5)261+ ).toStrictEqual(["heldBack passed", "human passed"]);262+ })263+ );264+265 it.effect("draws no stages for a claim with no answer pushed yet", () =>266 Effect.gen(function* () {267 const markup = yield* pageOf({268 held: 1,259 unmodified linesmodified:apps/web/test/landing.test.tsx+74 added-9 removed
1 unmodified line2 import { installCommand } from "@repo/agent-kit/install";3 import { Brand } from "@repo/brand";4 import { authorLine } from "@repo/git/trailers";5 import { Contracts } from "@repo/protocol/contracts";6+import { StageName } from "@repo/protocol/domain/outcome";7 import { RecentLanding } from "@repo/protocol/domain/recent-landing";8 import { AskId, Handle, LandedSha, ProjectName } from "@repo/protocol/ids";9 import { DateTime, Effect } from "effect";10 2 unmodified lines13 import { LandingView } from "../src/features/landing/landing-page.tsx";14 import { REST, poseAt } from "../src/features/landing/music-box/model.ts";15 import { KEYS } from "../src/features/landing/music-box/words.ts";16 import { readLandingNow } from "../src/features/landing/read.ts";16-import { LEDE } from "../src/features/landing/words.ts";17+import { LEDE, RUN_A_PROJECT } from "../src/features/landing/words.ts";18+import { stageRuns } from "../src/features/shared/status-line.tsx";19 import { landingHead } from "../src/routes/index.tsx";20 import { allInOrder, textIn } from "./markup.ts";21 import { platformWith, unreachablePlatform } from "./platform.ts";22 import { renderAt } from "./render.tsx";98 unmodified lines121 ?.groups?.means;122 123 describe(LandingView, () => {124 it.effect(123- "has one primary action, to the open asks, beside the install command",125+ "has two actions under the hero, the open asks first and the maintainer's way in beside it, over the install command",126 () =>127 Effect.gen(function* () {128 const main = mainOf(yield* pageWith(landed));129 128- expect(hrefsOf(main)[0]).toBe("/asks");130+ expect(hrefsOf(main).slice(0, 2)).toStrictEqual(["/asks", "/import"]);131 expect(132 [...main.matchAll(/data-action="(?<action>[^"]+)"/gu)].map(133 (found) => found.groups?.action134 )133- ).toStrictEqual(["asks"]);135+ ).toStrictEqual(["asks", "import"]);136+ expect(main).toMatch(137+ new RegExp(138+ `<a\\b[^>]*data-action="import"[^>]*href="/import"[^>]*>${RUN_A_PROJECT}</a>`,139+ "u"140+ )141+ );142+ // Both actions stand over the install command, the hero's command line.143+ expect(main.indexOf('data-action="import"')).toBeLessThan(144+ main.indexOf("select-all")145+ );146 expect(textIn(main)).toContain(installCommand(WEB));147 })148 );149 150+ it.effect(151+ "captions each stage with what runs there, shown when the stages stack on a phone and in the wide columns alike",152+ () =>153+ Effect.gen(function* () {154+ const main = mainOf(yield* pageWith(landed));155+ const gate = main.slice(main.indexOf('aria-labelledby="gate"'));156+157+ for (const stage of StageName.literals) {158+ const caption =159+ /<span\b[^>]*class="(?<classes>[^"]*)"[^>]*data-caption="(?<stage>[^"]+)"[^>]*>(?<text>[^<]*)</u.exec(160+ gate.slice(gate.indexOf(`data-caption="${stage}"`) - 400)161+ );162+163+ expect(textIn(caption?.groups?.text ?? "")).toBe(stageRuns(stage));164+ // Shown stacked (no bare `hidden`), left out only between tablet and columns, where seven columns have no room.165+ const classes = (caption?.groups?.classes ?? "").split(" ");166+167+ expect(classes).not.toContain("hidden");168+ expect(classes).toStrictEqual(169+ expect.arrayContaining(["tablet:hidden", "columns:block"])170+ );171+ }172+ })173+ );174+175 it.effect("draws the gate's seven stages in order", () =>176 Effect.gen(function* () {177 const main = mainOf(yield* pageWith(landed));178 const gate = main.slice(main.indexOf('aria-labelledby="gate"'));219 unmodified lines398 })399 );400 401 it.effect(365- "names each by its ask's want, linking the landed commit or the refused ask, and a landing with no ask by its commit",402+ "names each by its ask's want, linking the landed commit or the refused ask, and a landing with no ask as the project's first",403 () =>404 Effect.gen(function* () {405 const [answered = "", refused = "", unasked = ""] = rowsOf(406 yield* pageWith(landed)7 unmodified lines414 );415 expect(hrefsOf(refused)).toContain(416 "/oscabriel/burrow/asks/drop-legacy-fetch-kit"417 );381- // A commit is code, set in mono; only a want is sentence text.382- expect(unasked).toContain(383- `<span class="text-mono font-mono">${BURROW_SHA.slice(0, 7)}</span>`384- );418+ // The adoption answered no ask: it is named as the first landing, never as a bare commit id.419+ expect([420+ textIn(unasked).includes("First landing"),421+ textIn(unasked).includes(BURROW_SHA.slice(0, 7)),422+ ]).toStrictEqual([true, false]);423 expect(hrefsOf(unasked)).toContain(424 `/oscabriel/burrow/commit/${BURROW_SHA}`425 );426 })427 );428 429 it.effect(430+ "names a landing that opened an ask, with no want known, by the ask's id in mono",431+ () =>432+ Effect.gen(function* () {433+ const [opened = ""] = rowsOf(434+ yield* pageWith(435+ LandingNow.cases.Listed.make({436+ landings: [437+ RecentLanding.cases.Landed.make({438+ at: DateTime.makeUnsafe("2026-10-12T11:58:00Z"),439+ opened: AskId.make("iso-week"),440+ project: datekit,441+ sha: LandedSha.make(DATEKIT_SHA),442+ }),443+ ],444+ now: NOW,445+ })446+ )447+ );448+449+ expect(opened).toContain(450+ '<span class="text-mono font-mono">iso-week</span>'451+ );452+ expect(textIn(opened)).not.toContain("First landing");453+ })454+ );455+456+ it.effect(457 "names a refusal by its tag and its area alone, under the refused mark",458 () =>459 Effect.gen(function* () {460 const [, refused = ""] = rowsOf(yield* pageWith(landed));84 unmodified linesmodified:apps/web/test/landings.test.tsx+3 added-2 removed
30 unmodified lines31 <LandingList landings={[landing, opening, unasked]} now={now} />32 );33 34 describe("a project's landings list", () => {35- it('reads an opening as "Open ask <id>", linking the ask it opened', () => {35+ it('reads an opening as "Opened ask <id>", linking the ask it opened', () => {36 const item = itemOf(markup, opening.sha);37 38- expect(plainText(item)).toContain("Open ask format-ordinal");38+ expect(plainText(item)).toContain("Opened ask format-ordinal");39+ expect(plainText(item)).not.toContain("Open ask format-ordinal");40 expect(plainText(item)).not.toContain("Landed without an ask");41 expect(hrefsOf(item)).toContain("/oscabriel/datekit/asks/format-ordinal");42 });43 27 unmodified linesmodified:apps/web/test/llms.test.ts+43 added
525 unmodified lines526 });527 })528 );529 530+ it.effect(531+ "counts a split family as its parent and members, its finale folded in while it waits, as the page and the header do",532+ () =>533+ Effect.gen(function* () {534+ const parent = AskId.make("split-parser");535+ const core = AskId.make("split-parser-core");536+ const finale = AskId.make("split-parser-delete");537+538+ const family: readonly AskListing[] = [539+ ask(parent, "the parser is split by module", {540+ blockedBy: [core, finale],541+ }),542+ ask(core, "the core parser is its own module"),543+ ask(finale, "the old parser is gone", { blockedBy: [core] }),544+ ];545+546+ const answer = projectPageHandler(547+ listingWithAsks(projects, family),548+ platformUrl549+ )({550+ next: () => "the page" as const,551+ params: { project: "datekit" },552+ request: getAt("/oscabriel/datekit", "text/markdown"),553+ });554+555+ const seen = yield* read(556+ yield* answer === "the page"557+ ? Effect.die("Markdown was asked for")558+ : Effect.promise(() => answer)559+ );560+561+ const listed = linesOf(seen.body).flatMap((line) => {562+ const found = /^- \[(?<ask>[^\]]+)\]\(.*\/asks\//u.exec(line);563+564+ return found?.groups?.ask === undefined ? [] : [found.groups.ask];565+ });566+567+ expect(seen.body).toContain("2 open asks.");568+ expect(listed).toStrictEqual([parent, core]);569+ expect(seen.body).not.toContain(`/asks/${finale}.md`);570+ })571+ );572+573 it("gives a browser the page", () => {574 expect(575 landingHandler(576 listing(projects),56 unmodified linesmodified:apps/web/test/nav.test.tsx+26 added-3 removed
22 unmodified lines23 [24 { href: "/oscabriel/datekit", text: "Overview" },25 { href: "/oscabriel/datekit/tree/main", text: "Code" },26 { href: "/oscabriel/datekit#open-asks", text: "Asks" },27- { href: "/oscabriel/datekit#recent-landings", text: "Landings" },27+ { href: "/oscabriel/datekit/commits/main?show=landings", text: "Landings" },28 { href: "/oscabriel/datekit#proposals", text: "Proposals" },29 { href: "/oscabriel/datekit#who-decides", text: "People" },30 { href: "/oscabriel/datekit/people", text: "Policy" },31 { href: "/oscabriel/datekit/visibility", text: "Visibility" },99 unmodified lines131 132 expect(markup).toContain("overflow-x-auto");133 expect(markup).not.toContain("flex-wrap");134 });135+136+ it("fades its right edge below tablet, the cue that tabs lie off screen where the scrollbar is hidden", () => {137+ const markup = renderToStaticMarkup(138+ <ProjectTabs current="code" project={datekit} />139+ );140+141+ const fade =142+ /<div\b[^>]*class="(?<classes>[^"]*)"[^>]*data-tabs-fade=""/u.exec(markup)143+ ?.groups?.classes ?? "";144+145+ expect(fade.split(" ")).toStrictEqual(146+ expect.arrayContaining([147+ "after:bg-linear-to-l",148+ "after:from-background",149+ "after:pointer-events-none",150+ "tablet:after:hidden",151+ ])152+ );153+ expect(markup.indexOf('data-tabs-fade=""')).toBeLessThan(154+ markup.indexOf("overflow-x-auto")155+ );156+ });157 });158 159 describe(projectTabOf, () => {160 it.each([4 unmodified lines165 ["/oscabriel/datekit/refs", "code"],166 ["/oscabriel/datekit/asks/fix-week-start", "asks"],167 ["/oscabriel/datekit/decisions/dec-000001", "asks"],168 ["/oscabriel/datekit/answers/fix-week-start", "landings"],147- ["/oscabriel/datekit/commits/main", "code"],169+ ["/oscabriel/datekit/commits/main", "landings"],170+ ["/oscabriel/datekit/commits/%40bram%2Fparse-iso", "landings"],171 [172 "/oscabriel/datekit/commit/1111111111111111111111111111111111111111",150- "code",173+ "landings",174 ],175 ["/oscabriel/datekit/proposals/prop-000001", "proposals"],176 ["/oscabriel/datekit/people", "policy"],177 ["/oscabriel/datekit/visibility", "visibility"],8 unmodified linesmodified:apps/web/test/outcome.test.tsx+22 added
199 unmodified lines200 );201 expect(markup).not.toContain("text-xs");202 });203 204+ it("lays the seven stages in rows of four and three on a phone, each name whole: no hyphenation, no break inside a word", () => {205+ const markup = markupOf(<StageStrip outcome={landed} stage="checks" />);206+207+ const list = /<ol\b[^>]*>/u.exec(markup)?.[0] ?? "";208+209+ expect(list).toContain(" grid-cols-4");210+ expect(list).toContain("tablet:grid-cols-7");211+212+ const names = [...markup.matchAll(/<span\b[^>]*data-term=""[^>]*>/gu)].map(213+ ([tag]) => tag214+ );215+216+ expect(names).toHaveLength(7);217+ expect(218+ names.filter(219+ (tag) =>220+ !(tag.includes("[hyphens:none]") && tag.includes("whitespace-nowrap"))221+ )222+ ).toStrictEqual([]);223+ expect(names.some((tag) => tag.includes("break-words"))).toBeFalsy();224+ });225+226 it("draws a stage the answer never needed as not needed, given what the verdict holds", () => {227 expect(228 stagesOf(229 <StageStrip76 unmodified linesmodified:apps/web/test/people.test.tsx+60 added-1 removed
1 import { describe, expect, it } from "@effect/vitest";2+import { Contracts } from "@repo/protocol/contracts";3 import { CreditSummary } from "@repo/protocol/domain/record";4 import { Handle } from "@repo/protocol/ids";5+import { isNotFound } from "@tanstack/react-router";6 import { Effect, Schema } from "effect";7 import type { ReactElement } from "react";8 9 import {10 areaSentence,11+ NoSuchPersonView,12 PersonView,13 } from "../src/features/people/person-page.tsx";14+import { readPersonPage } from "../src/routes/people/$handle.tsx";15+import { platformWith, unreachablePlatform } from "./platform.ts";16 import { renderAt } from "./render.tsx";17 import { reachingTransport } from "./transport.ts";18 19 const handle = Schema.decodeSync(Handle)("ines-v");72 unmodified lines92 const html = creditsOf(yield* page);93 94 for (const project of ["oscabriel/datekit", "oscabriel/burrow"]) {95 expect(html).toContain(`href="/${project}"`);91- expect(html).toContain(`href="/${project}#recent-landings"`);96+ expect(html).toContain(`href="/${project}/commits/main?show=landings"`);97 }98 })99 );100 35 unmodified lines136 })137 );138 });139 140+describe("the person's route", () => {141+ const encodedCredits = Schema.encodeSync(Schema.Array(CreditSummary))(142+ credits143+ );144+145+ const platform = platformWith(146+ Contracts.toLayerHandler("credits", (payload) =>147+ Effect.succeed({ credits: payload.handle === handle ? credits : [] })148+ )149+ );150+151+ it.effect(152+ "reads the credits in its loader, so the page arrives with them",153+ () =>154+ Effect.gen(function* () {155+ const read = yield* readPersonPage("ines-v").pipe(156+ Effect.provide(platform)157+ );158+159+ expect(read.handle).toBe("ines-v");160+ expect(read.credits).toStrictEqual(encodedCredits);161+ })162+ );163+164+ it.effect(165+ "is not found for an address that names no handle, before any read",166+ () =>167+ Effect.gen(function* () {168+ const refused = yield* Effect.flip(169+ readPersonPage("-not-a-handle").pipe(170+ Effect.provide(unreachablePlatform)171+ )172+ );173+174+ expect(isNotFound(refused)).toBeTruthy();175+ })176+ );177+178+ it.effect(179+ "draws the not-found page as a project's: titled, with a crumb and a way onward",180+ () =>181+ Effect.gen(function* () {182+ const html = yield* renderAt(183+ "/people/-not-a-handle",184+ <NoSuchPersonView />185+ );186+187+ expect(html).toMatch(/<h1\b[^>]*>No such person<\/h1>/u);188+ expect(html).toContain("this address names none");189+ expect(html).toContain('href="/asks"');190+ })191+ );192+});193+194 describe("an area's sentence", () => {195 it("names the roles in words, the answer first, then in trailer order", () => {196 expect(197 areaSentence("datekit", "src", [25 unmodified linesmodified:apps/web/test/project.test.tsx+39 added-6 removed
414 unmodified lines415 })416 );417 418 it.effect(419+ "reads a decider's territory of every path in words, never as the glob",420+ () =>421+ Effect.gen(function* () {422+ const about = aboutOf(423+ yield* page({424+ deciders: [425+ { handles: [Handle.make("ines-v")], paths: Glob.make("**") },426+ ],427+ })428+ );429+430+ const text = textIn(about);431+432+ expect(text).toMatch(/every path\s*·\s*ines-v/u);433+ expect(text).not.toMatch(/\*\*\s*·/u);434+ })435+ );436+437+ it.effect(438+ "offers a signed-out reader a sign-in that returns to proposing, and a signed-in one the propose link",439+ () =>440+ Effect.gen(function* () {441+ const signedOut = mainColumnOf(yield* page({ signedIn: false }));442+443+ expect(textIn(signedOut)).toContain("Sign in to propose one.");444+ expect(signedOut).toContain(445+ `href="/auth/signin?return=${encodeURIComponent("/oscabriel/datekit/proposals/new")}"`446+ );447+ expect(signedOut).not.toContain('data-propose=""');448+449+ const signedIn = mainColumnOf(yield* page({ signedIn: true }));450+451+ expect(signedIn).toContain('data-propose=""');452+ expect(textIn(signedIn)).not.toContain("Sign in to propose one.");453+ })454+ );455+456+ it.effect(457 "names where an imported project came from, with its branch, as a copy read-only here; and nothing for one that started empty",458 () =>459 Effect.gen(function* () {460 const facts = aboutOf(614 unmodified lines1075 const hashes = projectSections("oscabriel/datekit").flatMap(1076 ({ hash }) => (hash === undefined ? [] : [hash])1077 );1078 1041- expect(hashes).toStrictEqual([1042- "open-asks",1043- "recent-landings",1044- "proposals",1045- "who-decides",1046- ]);1079+ expect(hashes).toStrictEqual(["open-asks", "proposals", "who-decides"]);1080 expect(1081 hashes.filter((hash) => !markup.includes(`id="${hash}"`))1082 ).toStrictEqual([]);1083 })444 unmodified linesmodified:apps/web/test/propose.test.tsx+24 added-5 removed
1 import { describe, expect, it } from "@effect/vitest";2+import { commandDocs } from "@repo/agent-kit/command-doc";3 import { Brand } from "@repo/brand";3-import { ProposeAsk } from "@repo/protocol/contracts";4+import { Contracts, ProposeAsk } from "@repo/protocol/contracts";5 import { CommitSha, ProjectName, RepoPath } from "@repo/protocol/ids";6 import { Unauthenticated } from "@repo/protocol/principal";7 import { CapReached } from "@repo/protocol/refusal";8 import { Cause, Option, Schema } from "effect";3 unmodified lines12 import { ProposalFailure } from "../src/features/proposal/failure.tsx";13 import {14 ProposeView,15 proposalPayload,16+ proposeCommand,17 territoryChoices,18 } from "../src/features/propose/propose-view.tsx";19 import type { About } from "../src/features/propose/propose-view.tsx";20 import { markupOf, plainText } from "./ask-fixtures.ts";59 unmodified lines80 81 it("gives the same proposal as a command, and what makes a good want", () => {82 const text = plainText(signedIn());83 82- expect(text).toContain(`${Brand.cli} propose --draft "<want>"`);84+ expect(text).toContain(85+ `${Brand.cli} propose --want "<want>" --project oscabriel/datekit --draft`86+ );87 expect(text).toContain("not how to change the code");88 });89 90+ it("gives the command with flags the CLI's propose takes, the want and the project among them", () => {91+ const doc = commandDocs(Contracts).find(92+ ({ path }) => path.join(" ") === "propose"93+ );94+95+ const command = proposeCommand(datekit);96+ const flags = command.split(" ").filter((word) => word.startsWith("--"));97+98+ expect(command.startsWith(`${Brand.cli} propose `)).toBeTruthy();99+ expect(flags).toStrictEqual(100+ expect.arrayContaining(["--want", "--project", "--draft"])101+ );102+ expect(103+ flags.filter((flag) => !(doc?.flags ?? []).includes(flag))104+ ).toStrictEqual([]);105+ });106+107 it("starts the want at the line a why page names", () => {108 const markup = signedIn(109 Option.some({ at, line: 12, path: RepoPath.make("src/format.ts") })110 );15 unmodified lines126 127 expect(markup).not.toContain("<form");128 expect(markup).not.toContain("<textarea");129 expect(markup).toMatch(/<a[^>]*href="\/auth\/signin[^"]*"[^>]*>Sign in/u);109- expect(plainText(markup)).toContain(110- `${Brand.cli} propose --draft "<want>"`111- );130+ expect(plainText(markup)).toContain(proposeCommand(datekit));131 });132 });133 134 describe(proposalPayload, () => {141 unmodified linesmodified:apps/web/test/refs.test.tsx+12 added-1 removed
370 unmodified lines371 ),372 'data-fork="ines-v/parse-iso"'373 );374 375- it("lists main as current, then the tags, then the answers in forks", () => {375+ it("lists main as current, then the tags, then the answers in claim forks", () => {376 const markup = choices();377 378 expect(379 [2 unmodified lines382 ).toStrictEqual(["main", "v1.1.0", "v1.0.0", "ines-v/parse-iso"]);383 expect(elementWith(markup, 'data-ref-choice="main"')).toContain(384 'aria-current="true"'385 );386+ expect(plainText(markup)).toContain("Answers in claim forks");387 });388 389+ it("names no branch: main carries no branch mark and sits under no heading, since a tag and a fork are revisions", () => {390+ const markup = choices();391+392+ expect(markup).not.toContain("lucide-git-branch");393+ expect(plainText(markup)).not.toMatch(/\bBranch\b/u);394+ expect(markup.indexOf('data-ref-choice="main"')).toBeLessThan(395+ markup.indexOf("<p")396+ );397+ });398+399 it("names each answer's ask, claimant and claim state, and opens the fork at its address", () => {400 const fork = elementWith(choices(), 'data-fork="ines-v/parse-iso"');401 402 expect(hrefsOf(fork)).toStrictEqual([33 unmodified linesmodified:apps/web/test/shell.test.tsx+5 added
358 unmodified lines359 expect(domain.split(/[\s"]/u)).toContain("uppercase");360 expect(linksOf(footer).map(({ text }) => text)).toStrictEqual([361 "Docs",362 "Install",363+ "Bring a repo",364 "Settings",365 "Privacy",366 "Terms",367 ]);368+ // The maintainer's way in, as the hero offers it, reachable signed out from every site page.369+ expect(370+ linksOf(footer).find(({ text }) => text === "Bring a repo")?.href371+ ).toBe("/import");372 })373 );374 });375 281 unmodified linesmodified:DESIGN.md+2 added-2 removed
452 unmodified lines453 454 - **Header:** the name (`owner / project`, the owner muted, both in the UI sans at Headline size), the posture (`PostureBadge`), the description (the README's first sentence), a facts row in UI type, muted (open asks, last landing, latest tag, licence if known, deciders), and three actions at the right: **Watch** (a popover: what already follows the project, this page and its events, plus `myr status --project` for your own claims and answers; the CLI has no watch command), **Clone** (a popover: the `git clone` URL, `myr claim <ask> --project`, and that forks come with a claim), **Contribute** (a popover: take an ask, propose an ask, read the policy). It never changes between tabs.455 - **Tabs:** Overview · Code · Asks · Landings · Proposals · People · Policy · Visibility, each a text tab with its count in label type; the current one ink at 500 with a 2 px ink underline (the one current-tab style of the whole web), the rest muted. The header and tabs stick under the top bar together; on a phone the tabs scroll sideways inside their own strip.456 - **Overview** (the default tab): open asks, recent landings and the README in the main column (its headings a level down, so the project's name stays the page's one h1); the about column (`--column-about`) with clone, how a change lands (the seven stages), who decides, a visibility summary and languages.457-- **Code:** under the header, the code bar: a Files/Commits toggle, the ref switcher (`main`, tags, and answers in forks, ADR 0043), the HEAD commit, Go to file and Clone; then the file tree in `--column-tree` beside every page of the tab. The history of commits is the Code tab's; the Landings tab opens Overview's recent landings until it has a page of its own.457+- **Code:** under the header, the code bar: a Files/History toggle, the revision picker (`main`, tags, and answers in claim forks, ADR 0043), the HEAD commit, Go to file and Clone; then the file tree in `--column-tree` beside every page of the tab. The history is git's first-parent log with the platform's landing record on each commit that has one, filtered to Landings, Answers, Ask openings or Every commit (Landings by default on main); the Landings tab opens that history of main filtered to its landings, and a commit's page sits under it.458 - **Visibility:** posture, layers, held-back checks, the environment (once "Env shape") and the ledger, one tab.459 460 ### Cards461 61 unmodified lines523 - **Finish:** the changed files in the tree column with status letters, `+n −m` and a local read mark; the diff with sticky file headers and "Mark read"; the want, verdict, choices and the finish commands in a strip.524 525 ### Code browser (the Code tab)526 527-- **Code bar:** one row under the project's header, not sticky, wrapping on a narrow screen: Files | Commits (a segmented control marking the view, nothing on the refs list), the ref switcher (a field-bordered button with the revision's mark and name; its list reads the refs only when it opens: main, the tags, then "Answers in forks", each fork as its ask in mono over its claimant and the claim's state in a word; a fork's entry opens the same page in that fork at its address, `@<handle>/<ask>`, shown as `handle/ask` with the fork mark; no repo is named), the revision's head commit (short SHA and subject linking the commit, then author and age; from 640 px), Go to file (`t`, a dialog over the paths at the revision, a match in the file's own name first) and Clone (a popover: the clone command, and the checkout of a tag or a commit, quoted when it is not one plain word; none for a fork, whose commits come with a claim). Below `columns`, a Files button at its start opens the tree, or a commit's changed files, as a sheet. Its reads are the route's (`routes/$owner/$project/-code-bar.tsx`); the bar itself, in `features/code/`, reads nothing. Inside a fork every link that pins a commit (raw, the permalink, a log row, a commit's parent and files, why one step back) pins it inside the fork, `@<handle>/<ask>:<sha>`, so a fork's page is a permalink.527+- **Code bar:** one row under the project's header, not sticky, wrapping on a narrow screen: Files | History (a segmented control marking the view, nothing on the refs list), the revision picker (a field-bordered button reading "At main", "At v1.2.0" or "At handle/ask", with no branch mark or heading, since a tag and a fork are revisions, not branches; its list reads the refs only when it opens: main, the tags, then "Answers in claim forks", each fork as its ask in mono over its claimant and the claim's state in a word; its field finds a tag or an answer; a fork's entry opens the same page in that fork at its address, `@<handle>/<ask>`, shown as `handle/ask` with the fork mark; no repo is named), the revision's head commit (short SHA and subject linking the commit, then author and age; from 640 px), Go to file (`t`, a dialog over the paths at the revision, a match in the file's own name first) and Clone (a popover: the clone command, and the checkout of a tag or a commit, quoted when it is not one plain word; none for a fork, whose commits come with a claim). Below `columns`, a Files button at its start opens the tree, or a commit's changed files, as a sheet. Its reads are the route's (`routes/$owner/$project/-code-bar.tsx`); the bar itself, in `features/code/`, reads nothing. Inside a fork every link that pins a commit (raw, the permalink, a log row, a commit's parent and files, why one step back) pins it inside the fork, `@<handle>/<ask>:<sha>`, so a fork's page is a permalink.528 - **Tree:** `@pierre/trees` in `--column-tree`: Plex Sans 14 px, monochrome icons, single-child folders flattened, the current path expanded and in view; on a commit, every changed file with its status letter and `+n −m`.529 - **File:** a sticky file header (the path as a trail, folders muted and the file name in ink; "N lines · size · language"; Code | Why; Raw, Permalink, Copy), then the code at Pierre's metrics in its own box. The server sends plain numbered text at the same metrics, so the highlighting lands in place.530 - **Why:** a mode of the file view: consecutive lines from one landing under a band that reads ask and answer first, SHA second.531 - **Commits and a commit:** rows under sticky day headers; a commit's subject as Title, its status line, the body as prose, then the diff (Unified | Split from 48 rem).109 unmodified lines