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

src/, scripts/ and bench/ carry no unused imports or locals: `tsc --noUnusedLocals` finds nothing there #4744

Merged opened this

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

Merged

mason/forge:mason/4740-src-scripts-and-bench-carry-no-unused-im → main 3 commits fork

  • Merged. mason/4740-src-scripts-and-bench-carry-no-unused-im was merged into main as 05d93e0.

Review

Sign in to review this change.
46 files changed +31 −115
bench/seed.ts +2 −2
@@ -15,8 +15,8 @@
1515 */
1616
1717 import { mkdirSync, rmSync } from "node:fs";
18 import { createApp, type App } from "../src/app.ts";
19 import { createIssue, nextNumber } from "../src/core/issues.ts";
18 import { createApp } from "../src/app.ts";
19 import { createIssue } from "../src/core/issues.ts";
2020 import { createRepo as coreCreateRepo } from "../src/core/repos.ts";
2121 import { createUser } from "../src/core/users.ts";
2222 import { commitFiles } from "../src/git/write.ts";
src/actions/apps.ts +1 −1
@@ -51,7 +51,7 @@ import type { Issue } from "../core/issues.ts";
5151 import { getPull } from "../core/pulls.ts";
5252 import { canAdmin, canEnterApp, canWrite, getRepo, type Repo } from "../core/repos.ts";
5353 import type { Run } from "../core/runs.ts";
54 import { getUserByName, type User } from "../core/users.ts";
54 import { type User } from "../core/users.ts";
5555 import { resolveOid } from "../git/merge.ts";
5656 import { repoDir } from "../git/repos.ts";
5757 import { err, ok, type Result } from "../kernel/result.ts";
src/actions/asks_decide.ts +1 −1
@@ -7,7 +7,7 @@
77 */
88
99 import type { App } from "../app.ts";
10 import { getDecision, latestDecision } from "../core/decisions.ts";
10 import { getDecision } from "../core/decisions.ts";
1111 import { getIssueById } from "../core/issues.ts";
1212 import { getRepoById } from "../core/repos.ts";
1313 import type { User } from "../core/users.ts";
src/actions/issues.ts +1 −1
@@ -18,7 +18,7 @@
1818 * "mirrored" on the others, which is honest rather than silently wrong.
1919 */
2020
21 import { canSeeSealed, mayView, setSealed } from "../core/sealed.ts";
21 import { mayView, setSealed } from "../core/sealed.ts";
2222 import { requireVerified } from "./verify.ts";
2323 import { requireAbility } from "./roles.ts";
2424 import type { App } from "../app.ts";
src/actions/model_grant.ts −1
@@ -7,7 +7,6 @@
77 import type { App } from "../app.ts";
88 import {
99 addOwnSubscription,
10 ownSubscription,
1110 setModelGrant,
1211 validGrant,
1312 } from "../core/model_grant.ts";
src/actions/origins.ts +1 −2
@@ -28,7 +28,7 @@ import {
2828 findOrigin,
2929 getOriginById,
3030 getOriginFor,
31 hostOf, siteOf,
31 siteOf,
3232 linkRepoToOrigin,
3333 listDetachedMirrors,
3434 listMirrors,
@@ -94,7 +94,6 @@ import { open } from "../kernel/secret.ts";
9494 import {
9595 staticCredential,
9696 type OriginKind,
97 type Provider,
9897 } from "../origins/types.ts";
9998 import { err, ok, type Result } from "../kernel/result.ts";
10099 import {
src/actions/pulls.ts +1 −2
@@ -33,7 +33,7 @@ import {
3333 } from "../core/pulls.ts";
3434 import { isStructural, pillarsOf } from "../core/pillars.ts";
3535 import type { Repo } from "../core/repos.ts";
36 import { canRead, getRepoById } from "../core/repos.ts";
36 import { canRead } from "../core/repos.ts";
3737 import { sealedByNumber } from "../core/sealed.ts";
3838 import {
3939 addReviewComment,
@@ -60,7 +60,6 @@ import { grantRun } from "../core/run_grant.ts";
6060 import { commitIdentity } from "../core/commit_identity.ts";
6161 import { getUserById, getUserByName, type User } from "../core/users.ts";
6262 import type { MergeStrategy } from "../git/merge.ts";
63 import { fetchInto, resolveOid, writeRef } from "../git/merge.ts";
6463 import { repoDir } from "../git/repos.ts";
6564 import { importIssue, importReviewStates } from "../origins/import.ts";
6665 import { err, ok, type Result } from "../kernel/result.ts";
src/checks/service.ts −1
@@ -54,7 +54,6 @@ import { MAX_FILED, clearedFiles, fileOrderDependent } from "./order_dependent.t
5454 import { ASKED, redMain, unheld } from "./red_main.ts";
5555 import { IMPACT_FILE, keepImpact, seedImpact } from "./impact-store.ts";
5656 import { getIssueById } from "../core/issues.ts";
57 import { repoDir } from "../git/repos.ts";
5857 import { BUDGETS, budgetSummary } from "../kernel/budgets.ts";
5958 import { transact } from "../kernel/db.ts";
6059 import { createLog } from "../kernel/log.ts";
src/core/issues.ts −3
@@ -900,9 +900,6 @@ const chunked = <T>(items: readonly T[]): T[][] => {
900900 return out;
901901 };
902902
903 const placeholders = (n: number): string =>
904 Array.from({ length: n }, (_, i) => `?${i + 1}`).join(",");
905
906903 /**
907904 * Open and closed counts for one repo and kind, in a single pass over the
908905 * covering index — the pair every list page shows above its tabs, which was
src/crew/autonomy.ts −3
@@ -28,7 +28,6 @@ import { checksFor } from "../checks/service.ts";
2828 import { queueDepth } from "../core/capacity.ts";
2929 import { readConflictRoom } from "./conflict_room.ts";
3030 import { mergeable, resolveOid, treeOf } from "../git/merge.ts";
31 import { repoDir } from "../git/repos.ts";
3231 import { CLOSED_NOTE } from "../core/done_on_main.ts";
3332 import { mergePull } from "../actions/pulls.ts";
3433 import { carriesUpstream } from "../actions/upstream_follow.ts";
@@ -360,8 +359,6 @@ export async function driveRepo(
360359 const by = getUserById(app.db, repo.autonomyBy!);
361360 if (!by) return "paused";
362361 const crew = listCrewRoles(app.db, repo.id);
363 const builders = crew.filter((c) => c.role === "builder").map((c) => c.agent);
364 const planner = crew.find((c) => c.role === "planner")?.agent;
365362 const active = activeRuns(app, repo.id);
366363 const slotted = slottedRuns(active, crew);
367364 // Slots follow the subscriptions' remaining windows, never past the
src/crew/review.ts −1
@@ -28,7 +28,6 @@ import { teamsOfPull, teamVerdicts } from "../core/issue_teams.ts";
2828 import { reviewSummariesFor, reviewSummary } from "../core/reviews.ts";
2929 import { checksForHead } from "../core/runs.ts";
3030 import { getTeam } from "../core/teams.ts";
31 import { repoDir } from "../git/repos.ts";
3231 import { createLog } from "../kernel/log.ts";
3332 import { queueAgentRun } from "./dispatch.ts";
3433 import { type Handover, handoverOf, handoversOf } from "./guard.ts";
src/crew/sandbox.ts +1 −2
@@ -34,7 +34,7 @@
3434
3535 import { mkdirSync, readdirSync, rmSync, statSync } from "node:fs";
3636 import { homedir, tmpdir } from "node:os";
37 import { basename, isAbsolute, join, relative, sep } from "node:path";
37 import { basename, isAbsolute, join, relative } from "node:path";
3838 import { cacheRoot, crewRoot, installCacheDir } from "./workdir.ts";
3939
4040 export interface SandboxPolicy {
@@ -180,7 +180,6 @@ export function dataInTemp(data: string): boolean {
180180
181181 function tempDenied(data: string): string[] {
182182 const temp = tmpdir();
183 const rel = relative(temp, data);
184183 if (!dataInTemp(data)) return [temp];
185184 return [
186185 join(temp, `claude-${process.getuid?.() ?? 0}`),
src/http/api.ts −2
@@ -222,7 +222,6 @@ import {
222222 import {
223223 canAdmin,
224224 canRead,
225 canSeeOwnerFacts,
226225 countsForRepos,
227226 getRepo,
228227 listReposByOwner,
@@ -297,7 +296,6 @@ import {
297296 runPromptSource,
298297 } from "../actions/prompts.ts";
299298 import { listDomains } from "../core/domains.ts";
300 import type { Database } from "bun:sqlite";
301299 import {
302300 migrateMessage,
303301 afterChoice,
src/http/mcp.ts +1 −1
@@ -41,7 +41,7 @@ import { QUOTA_KEYS } from "../settings/quotas.ts";
4141 import { LIMIT_KEYS } from "../settings/limits.ts";
4242 import { convergeWords, FOLLOW_MODE_REFUSALS, setFollowMode, severForge, takeForgeCode, takeForgeWords, takeOrTell } from "../actions/follow.ts";
4343 import { relationOf } from "../actions/forks.ts";
44 import { chainOfRepo, FOLLOW_MODES, forgeLinkOf } from "../spawn/chain.ts";
44 import { chainOfRepo, FOLLOW_MODES } from "../spawn/chain.ts";
4545 import { watchMilestone } from "../actions/watches.ts";
4646 import {
4747 addCommentThrough,
src/kernel/error.ts +1 −1
@@ -12,7 +12,7 @@ export class ForgeError extends Error {
1212 /** Stable machine-readable code, e.g. "git.spawn_failed". */
1313 readonly code: string;
1414 override readonly cause?: unknown;
15 private readonly [marker] = true;
15 readonly [marker] = true;
1616
1717 constructor(code: string, message: string, options?: { cause?: unknown }) {
1818 super(message);
src/origins/providers/github.ts −2
@@ -35,7 +35,6 @@ import { basicHeader, gitAuthEnv } from "../credentials.ts";
3535 import {
3636 ApiClient,
3737 COMMIT_PAGE,
38 MAX_BLOB_BYTES,
3938 MAX_DIFF_BYTES,
4039 anchorFromHunk,
4140 asArray,
@@ -46,7 +45,6 @@ import {
4645 asState,
4746 asString,
4847 asTime,
49 decodeContent,
5048 dig,
5149 fail,
5250 field,
src/spawn/door.ts +1 −1
@@ -7,7 +7,7 @@
77 */
88
99 import { startWatch, probeOf, type Probe } from "./live.ts";
10 import { listChildren, reissueClaim, spawnForge, type SpawnError } from "../actions/spawn.ts";
10 import { reissueClaim, spawnForge, type SpawnError } from "../actions/spawn.ts";
1111 import type { App } from "../app.ts";
1212 import { maxChildren } from "../core/capacity.ts";
1313 import { getAgentByName } from "../core/agents.ts";
src/spawn/host.ts +1 −1
@@ -9,7 +9,7 @@ import { childDirOf } from "../actions/spawn.ts";
99 import { createApp, type App } from "../app.ts";
1010 import { appsRuntime, type AppsRuntime } from "../apps/runtime.ts";
1111 import { resolveAppHost, type AppTarget } from "../apps/proxy.ts";
12 import { childAppsSummary, startChildApps, stopChildApps, type ChildAppsSummary } from "./child-apps.ts";
12 import { childAppsSummary, startChildApps, stopChildApps } from "./child-apps.ts";
1313 import { childHost } from "./door.ts";
1414 import { firstBoot } from "./first-boot.ts";
1515 import {
src/tui/screens/pull.ts −3
@@ -43,7 +43,6 @@ import { listRepoRuns, mayReadRunLog } from "../../actions/runs.ts";
4343 import { previewEnv } from "../../apps/data.ts";
4444 import { findingsWords, pullPreviewFindings } from "../../core/preview_findings.ts";
4545 import {
46 appsRuntime,
4746 type EnvState,
4847 type EnvStatus, envsFor } from "../../apps/runtime.ts";
4948 import { proposedByText } from "../../core/proposal_token.ts";
@@ -64,7 +63,6 @@ import { checkSummary, type CheckSummary } from "../../core/runs.ts";
6463 import { err, ok } from "../../kernel/result.ts";
6564 import { getUsersByIds } from "../../core/users.ts";
6665 import {
67 anchorId,
6866 anchorKey,
6967 listReviewComments,
7068 withOutdated,
@@ -102,7 +100,6 @@ import {
102100 hitScroll,
103101 errorText,
104102 live,
105 metaOf,
106103 openLink,
107104 plural,
108105 relTime,
src/tui/screens/workspace.ts −1
@@ -127,7 +127,6 @@ import { pullScreen } from "./pull.ts";
127127 import { branchesScreen } from "./refs.ts";
128128 import { wavesScreen } from "./waves.ts";
129129 import {
130 hostOf,
131130 knownDefaultRef,
132131 liveOrigin,
133132 local,
src/web/chrome.ts −1
@@ -9,7 +9,6 @@
99 */
1010
1111 import { sshCommand } from "../ssh/command.ts";
12 import { mayDirectCrew } from "../crew/direct.ts";
1312 import { mayReadRuns } from "../actions/runs.ts";
1413 import { getAppByRepo } from "../core/apps.ts";
1514 import { audienceFacts, audienceOf } from "../core/audience.ts";
src/web/layout.ts +1 −1
@@ -39,7 +39,7 @@ import { notePhase } from "../core/route_timing.ts";
3939 import { html, raw, when, type Html } from "./html.ts";
4040 import { noRoom } from "../spawn/door.ts";
4141 import { icon, iconSprite, inlineIcons, themeGlyph } from "./icons.ts";
42 import { btn, copyField, kbd, menu, pill, type MenuItem } from "./ui.ts";
42 import { btn, copyField, kbd, menu, type MenuItem } from "./ui.ts";
4343
4444 /** One row of the command palette: title, href, category. */
4545 export interface PaletteItem {
src/web/pages/apps.ts −1
@@ -74,7 +74,6 @@ import {
7474 icon,
7575 listCard,
7676 previewDataNote,
77 row,
7877 seg,
7978 selectField,
8079 sha,
src/web/pages/board.ts +2 −2
@@ -46,7 +46,7 @@ import { spendView } from "./spend.ts";
4646 import type { HandContext } from "../../crew/handover.ts";
4747 import { forgeHealth, rolloutLine } from "../../kernel/guard.ts";
4848 import { coveredByVerdict, forgeVerdict, verdictLine } from "../../kernel/guard_verdict.ts";
49 import { laneLine, type Vitals } from "../../kernel/vitals.ts";
49 import { laneLine } from "../../kernel/vitals.ts";
5050 import { getIssue, getIssuesByIds, type Issue } from "../../core/issues.ts";
5151 import { looksForApps } from "../../core/looks.ts";
5252 import {
@@ -56,7 +56,7 @@ import {
5656 pillarView,
5757 reposWithUmbrellas,
5858 } from "../../core/pillars.ts";
59 import { joinMany, listPulls, mergedPullsForRepos, toldBy, type Pull } from "../../core/pulls.ts";
59 import { listPulls, mergedPullsForRepos, toldBy, type Pull } from "../../core/pulls.ts";
6060 import {
6161 listReposVisibleTo,
6262 ownerFactRepoIds,
src/web/pages/boards.ts +2 −5
@@ -7,7 +7,7 @@
77 * narrowed to that point's window and listed by the source's first column.
88 * Anyone else gets the not-found page.
99 */
10 import { CHART_NAMES, CHARTS, usesSeries, type Cell, type Chart } from "../../boards/chart.ts";
10 import { CHART_NAMES, CHARTS, type Cell, type Chart } from "../../boards/chart.ts";
1111 import { runFor } from "../../boards/panel_data.ts";
1212 import { runQuery, type Query, type Row } from "../../boards/query.ts";
1313 import { gaps, SYSTEM } from "../../boards/sampler.ts";
@@ -16,7 +16,7 @@ import { listAllBoards } from "../../actions/boards.ts";
1616 import type { Ctx } from "../../http/context.ts";
1717 import { notePhase, takeSessionTime, timePhase, timePhaseAsync } from "../../core/route_timing.ts";
1818 import { notFoundPage } from "../chrome.ts";
19 import { html, raw, when } from "../html.ts";
19 import { html, when } from "../html.ts";
2020 import { page } from "../layout.ts";
2121 import { btn, card, chartBox, empty, field, selectField } from "../ui.ts";
2222
@@ -133,9 +133,6 @@ export function machineLinks(now: number): { label: string; href: string }[] {
133133 ];
134134 }
135135
136 const option = (value: string, label: string, selected: boolean) =>
137 html`<option value="${value}" ${selected ? raw("selected") : null}>${label}</option>`;
138
139136 /** The inputs that say a query, filled from `p`; the page's form and a panel's share them. */
140137 let fieldSeq = 0;
141138
src/web/pages/conflicts.ts +1 −1
@@ -32,7 +32,7 @@ import { field, readForm } from "../form.ts";
3232 import { html, type Html } from "../html.ts";
3333 import { flashTo, page } from "../layout.ts";
3434 import { renderMarkdown } from "../markdown.ts";
35 import { btn, card, icon } from "../ui.ts";
35 import { btn, card } from "../ui.ts";
3636 import { changeHead, changeTabs, pullContext } from "../studio/change.ts";
3737
3838 /** More blocks or longer words than this are not a hand's work. */
src/web/pages/edit.ts +1 −1
@@ -30,7 +30,7 @@ import { highlightToHtml } from "../highlight-html.ts";
3030 import { loadRepo, notFoundPage, pageHead, signInFirst } from "../chrome.ts";
3131 import { field as formValue, readForm, type Form } from "../form.ts";
3232 import { html, raw, when, type Html } from "../html.ts";
33 import { flashTo, fragment, page, redirect } from "../layout.ts";
33 import { flashTo, fragment, page } from "../layout.ts";
3434 import { renderMarkdown } from "../markdown.ts";
3535 import {
3636 browseBase,
src/web/pages/issues.ts +2 −3
@@ -27,10 +27,9 @@ import {
2727 } from "../chrome.ts";
2828 import { field, readForm } from "../form.ts";
2929 import { html, raw, when, type Html } from "../html.ts";
30 import { flashTo, page, redirect } from "../layout.ts";
31 import { btn, empty, icon, field as formField } from "../ui.ts";
30 import { flashTo, page } from "../layout.ts";
31 import { btn, empty, field as formField } from "../ui.ts";
3232 import {
33 conversation,
3433 originError,
3534 parseNumber,
3635 threadContext,
src/web/pages/pull.ts +1 −4
@@ -45,7 +45,6 @@ import {
4545 isReviewState,
4646 latestReviewByAuthor,
4747 listReviewComments,
48 type Review,
4948 type ReviewState,
5049 type Side,
5150 } from "../../core/reviews.ts";
@@ -53,7 +52,6 @@ import { getUsersByIds } from "../../core/users.ts";
5352 import { canWrite, getRepoById, type Repo } from "../../core/repos.ts";
5453 import { resolveOid } from "../../git/merge.ts";
5554 import { commitLog } from "../../git/read.ts";
56 import { repoDir } from "../../git/repos.ts";
5755 import { wallOf } from "../../contract/policy.ts";
5856 import type { Ctx } from "../../http/context.ts";
5957 import {
@@ -75,7 +73,7 @@ import {
7573 import { field, readForm } from "../form.ts";
7674 import { teamVerdicts, type TeamVerdict } from "../../core/issue_teams.ts";
7775 import { html, raw, when, type Html } from "../html.ts";
78 import { flashTo, fragment, page, redirect } from "../layout.ts";
76 import { flashTo, fragment, page } from "../layout.ts";
7977 import { liveRegionsJs } from "../client.ts";
8078 import { liveClientJs, liveMount } from "../live.ts";
8179 import {
@@ -93,7 +91,6 @@ import {
9391 } from "../ui.ts";
9492 import {
9593 assigneeCard,
96 conversation,
9794 labelsCard,
9895 originError,
9996 threadFragment,
src/web/pages/releases.ts −1
@@ -9,7 +9,6 @@
99
1010 import { getRepoById } from "../../core/repos.ts";
1111 import { notePhase, takeSessionTime } from "../../core/route_timing.ts";
12 import type { User } from "../../core/users.ts";
1312 import { running } from "../../kernel/version.ts";
1413 import type { Ctx } from "../../http/context.ts";
1514 import { listReleases, type Release } from "../../release/record.ts";
src/web/pages/repo.ts −29
@@ -25,7 +25,6 @@ import { frozenBlock } from "./frozen.ts";
2525 import { pinRepo, syncRepoNow, unpinRepo } from "../../actions/origins.ts";
2626 import {
2727 canAdmin,
28 canWrite,
2928 forkParentFor,
3029 visibleForks,
3130 } from "../../core/repos.ts";
@@ -68,7 +67,6 @@ import {
6867 sizeWithTokens,
6968 tokenCount,
7069 icon,
71 iconBtn,
7270 listCard,
7371 row,
7472 seg,
@@ -103,33 +101,6 @@ const forkParent = (ctx: Ctx, repo: Repo): Repo | undefined =>
103101 const forksFor = (ctx: Ctx, repo: Repo): Repo[] =>
104102 visibleForks(ctx.app.db, repo.id, ctx.auth.user);
105103
106 /**
107 * How far the fork has slipped from its parent, in a phrase. A fork with
108 * commits of its own says so: an update would be refused, so the sentence
109 * has to explain the missing button.
110 */
111 function driftNote(drift: ForkDrift | undefined): string | undefined {
112 if (drift === undefined || drift.ahead === null || drift.behind === null)
113 return undefined;
114 const commits = (n: number) => `${n} commit${n === 1 ? "" : "s"}`;
115 const { ahead, behind } = drift;
116 if (ahead === 0)
117 return behind === 0 ? "up to date" : `${commits(behind)} behind`;
118 if (behind === 0) return `${commits(ahead)} of its own`;
119 return `${commits(ahead)} of its own, ${behind} behind — merge by hand`;
120 }
121
122 /**
123 * Offer the update only when it would fast-forward: something to take, and
124 * nothing of the fork's own in the way. Unknown drift keeps the button, since
125 * the action itself is the thing that decides.
126 */
127 function updatable(drift: ForkDrift | undefined): boolean {
128 if (drift === undefined || drift.ahead === null || drift.behind === null)
129 return true;
130 return drift.behind > 0 && drift.ahead === 0;
131 }
132
133104 /**
134105 * GET /:owner/:name/forks — every fork of this repository the viewer may
135106 * see, newest first. The count on the repository page is the way in.
src/web/pages/runs.ts +1 −2
@@ -35,11 +35,10 @@ import { loadRepo, notFoundPage, repoBase, signInFirst } from "../chrome.ts";
3535 import { field, readForm } from "../form.ts";
3636 import { html, when, type Html } from "../html.ts";
3737 import { badge } from "../ui.ts";
38 import { flashTo, page, redirect } from "../layout.ts";
38 import { flashTo, redirect } from "../layout.ts";
3939 import { runsListPage } from "../studio/lists.ts";
4040 import { runView } from "../studio/run.ts";
4141 import {
42 empty,
4342 icon,
4443 listCard,
4544 row,
src/web/pages/search.ts +1 −1
@@ -12,7 +12,7 @@
1212
1313 import { strangerCodeSearch } from "../../http/strangers.ts";
1414 import { search } from "../../actions/search.ts";
15 import { appsRuntime, envsFor } from "../../apps/runtime.ts";
15 import { envsFor } from "../../apps/runtime.ts";
1616 import type { AppRecord } from "../../core/apps.ts";
1717 import { getPull } from "../../core/pulls.ts";
1818 import { canWrite, enterableApps, getRepo } from "../../core/repos.ts";
src/web/pages/signup-passkey.ts −1
@@ -11,7 +11,6 @@ import { givenEmail, signUpWithPasskey, signupClosed, HUMAN_CHECK_MESSAGE, SIGNU
1111 import { createSession } from "../../core/sessions.ts";
1212 import { getUserByName } from "../../core/users.ts";
1313 import { isSafeName } from "../../git/guard.ts";
14 import { edgeStrangerLogin } from "../../http/edge.ts";
1514 import { crossOrigin, type Ctx } from "../../http/context.ts";
1615 import { STRANGER_MAX } from "../../http/limits.ts";
1716 import { clientAddress, clientBucket } from "../../http/peer.ts";
src/web/standards.ts −1
@@ -26,7 +26,6 @@ import { metaThemeColor } from "../design/themes.ts";
2626 import { BODY_MAX, TITLE_MAX } from "../core/reports.ts";
2727 import { llmsRepos, sitemapRepos } from "../core/listings.ts";
2828 import { canRead, getRepo } from "../core/repos.ts";
29 import type { App } from "../app.ts";
3029 import type { Ctx } from "../http/context.ts";
3130 import { notFound } from "../http/respond.ts";
3231
src/web/studio/app.ts −1
@@ -45,7 +45,6 @@ import {
4545 icon,
4646 listCard,
4747 row,
48 time,
4948 userTag,
5049 } from "../ui.ts";
5150 import { changesHref, tellsHref } from "./nouns.ts";
src/web/studio/asks.ts +2 −2
@@ -62,9 +62,9 @@ import { reviewWaitsFor, type ReviewWait } from "../../crew/review.ts";
6262 import type { Ctx } from "../../http/context.ts";
6363 import { repoBase } from "../chrome.ts";
6464 import { html, type Html } from "../html.ts";
65 import { btn, card, icon, row } from "../ui.ts";
65 import { btn, row } from "../ui.ts";
6666 import { lookUrl } from "../../core/looks.ts";
67 import { lookThumb, thumbLook } from "../pages/looks.ts";
67 import { thumbLook } from "../pages/looks.ts";
6868 import { changeHref } from "./nouns.ts";
6969 import { testsClause } from "./words.ts";
7070
src/web/studio/asks_page.ts −1
@@ -19,7 +19,6 @@ import {
1919 type Skipped,
2020 } from "../../actions/asks_bulk.ts";
2121 import { getDecision } from "../../core/decisions.ts";
22 import { getIssueById } from "../../core/issues.ts";
2322 import { decideAsk, undoDecideAsk } from "../../actions/asks_decide.ts";
2423 import type { FleetValue } from "../../core/fleet_ops.ts";
2524 import { muteRepo, removeMutes } from "../../core/interactions.ts";
src/web/studio/change.ts −1
@@ -33,7 +33,6 @@ import { canWrite, type Repo } from "../../core/repos.ts";
3333 import { listReviews, type Review } from "../../core/reviews.ts";
3434 import { wallOf, wallSentence, type Wall } from "../../contract/policy.ts";
3535 import { checkSummary } from "../../core/runs.ts";
36 import { repoDir } from "../../git/repos.ts";
3736 import type { Ctx } from "../../http/context.ts";
3837 import {
3938 crumbsFor,
src/web/studio/explore.ts +1 −1
@@ -16,7 +16,7 @@ import {
1616 import { notePhase, takeSessionTime } from "../../core/route_timing.ts";
1717 import type { Ctx } from "../../http/context.ts";
1818 import { pageHead } from "../chrome.ts";
19 import { html, when, type Html } from "../html.ts";
19 import { html, type Html } from "../html.ts";
2020 import { page } from "../layout.ts";
2121 import { btn, empty, listCard, nameMark, row as rowOf, seg, timeAgo } from "../ui.ts";
2222
src/web/studio/home.ts +1 −1
@@ -19,7 +19,7 @@ import { appsRuntime } from "../../apps/runtime.ts";
1919 import { appsForRepos } from "../../core/apps.ts";
2020 import { WEIGHT_MAX, WEIGHT_NAMES } from "../../core/front.ts";
2121 import { LOOK_SIZES } from "../../core/looks.ts";
22 import { canRead, getRepo, type Repo } from "../../core/repos.ts";
22 import { canRead, getRepo } from "../../core/repos.ts";
2323 import { type User } from "../../core/users.ts";
2424 import type { Ctx } from "../../http/context.ts";
2525 import { activeEdgeToken, edgeLoginUrl, edgeStrangerLogin } from "../../http/edge.ts";
src/web/studio/lists.ts −5
@@ -154,11 +154,6 @@ const PLAIN_FILTERS: readonly WordFilter[] = ["working", "shipped", "stopped"];
154154
155155 const LIST_PAGE = 25;
156156
157 /** `?word=` carried onto a `cursor` link, so paging keeps the filter. */
158 function pagedHref(base: string, filter: WordFilter | undefined, cursor: string): string {
159 return `${base}?${filter ? `word=${filter}&` : ""}cursor=${cursor}`;
160 }
161
162157 /**
163158 * What a list of tells or changes is narrowed by, read once from the
164159 * address: the word, and the narrowings that are not words — a label, who
src/web/studio/shelf.ts +1 −1
@@ -41,7 +41,7 @@ import { repoDir } from "../../git/repos.ts";
4141 import type { Ctx } from "../../http/context.ts";
4242 import { repoBase } from "../chrome.ts";
4343 import { escapeHtml, html, raw, type Html } from "../html.ts";
44 import { dot, envPhrase, envTone, pill, row, time } from "../ui.ts";
44 import { dot, envPhrase, envTone, row, time } from "../ui.ts";
4545 import {
4646 productionFact,
4747 pullWord,
src/web/studio/tell.ts +1 −3
@@ -62,7 +62,7 @@ import {
6262 originGlyph,
6363 threadContext,
6464 } from "../pages/thread.ts";
65 import { changeHref, tellHref } from "./nouns.ts";
65 import { changeHref } from "./nouns.ts";
6666 import {
6767 pullWord,
6868 runWord,
@@ -323,8 +323,6 @@ async function studioTell(
323323 history: servingHistory(),
324324 viewer: ctx.auth.user,
325325 };
326 // A repository that is not an app speaks of issues, not tells.
327 const plain = wordCtx.record === undefined;
328326 // Closing is the author's or a writer's (`setIssueState`); nobody else is
329327 // shown a button the server would only refuse.
330328 const user = ctx.auth.user;
src/web/studio/words.ts −12
@@ -381,18 +381,6 @@ export function productionFact(
381381 return failed ?? shipped;
382382 }
383383
384 const WORD_ICON: Record<Word, Parameters<typeof icon>[0]> = {
385 working: "loader",
386 look: "eye",
387 shipped: "check",
388 stopped: "alert",
389 waiting: "clock",
390 planned: "map",
391 told: "clock",
392 done: "check",
393 cancelled: "ban",
394 };
395
396384 /** One of the five (or six) studio words, as a badge. An id names the one a
397385 * live script repaints as a run finishes (`studioRunJs`). `cancelled` draws
398386 * the same quiet, secondary look as `waiting` and `planned` — a restart is

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs