Skip to content

Commit 4dcafd5

Browse files
committed
chore(lint): clear biome format + dead-suppression backlog
The release gate (npm run check) runs biome; format drift and stale biome-ignore comments accumulated across the session would have failed CI on the publish tag. Clears them so the tag builds clean.
1 parent efa7e26 commit 4dcafd5

11 files changed

Lines changed: 21 additions & 44 deletions

src/auth/flow.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ export interface OAuthConfig {
4646
* Result of validating a pasted callback URL. The wizard renders the
4747
* error inline next to the input so the user knows what to fix.
4848
*/
49-
export type PasteResult =
50-
| { ok: true }
51-
| { ok: false; error: string };
49+
export type PasteResult = { ok: true } | { ok: false; error: string };
5250

5351
export interface RunOAuthLoginOptions {
5452
/** Override the browser-open path (tests). */

src/cli.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { runProjectSubcommand } from "./projects/cli.js";
99
import { runSshSubcommand } from "./ssh/cli.js";
1010
import { App } from "./ui/App.js";
1111
import { installTerminalRestoreHandlers } from "./ui/terminal-restore.js";
12-
import { VERSION } from "./version.js";
1312
import { setTerminalTitle } from "./ui/terminal-title.js";
13+
import { VERSION } from "./version.js";
1414

1515
// Auto-load .env files before any subsystem reads process.env.
1616
loadDotEnv();

src/tools/background-shell-store.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ describe("BackgroundShellStore", () => {
120120
it("returns copies from get() / list() so callers can't mutate live state", () => {
121121
const record = store.spawn("true", process.cwd());
122122
const copy = store.get(record.id);
123-
// biome-ignore lint/style/noNonNullAssertion: just spawned, definitely present
124123
copy!.output = "tampered";
125124
expect(store.get(record.id)?.output).not.toBe("tampered");
126125
});

src/ui-pi/background-shell-panel.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ import { ansi } from "./theme.js";
99
* short.
1010
*/
1111
export class BackgroundShellPanel extends Container {
12-
private store: BackgroundShellStore;
1312
private unsubscribe: () => void;
1413
private shells: readonly BackgroundShellRecord[] = [];
1514
private prunedAt = Date.now();
1615
private requestRender: () => void;
1716

1817
constructor(store: BackgroundShellStore, requestRender: () => void = () => undefined) {
1918
super();
20-
this.store = store;
2119
this.requestRender = requestRender;
2220
this.unsubscribe = store.subscribe((next) => {
2321
this.shells = next;
@@ -30,7 +28,6 @@ export class BackgroundShellPanel extends Container {
3028
/** Re-bind to a fresh BackgroundShellStore after a model swap. */
3129
rebind(store: BackgroundShellStore): void {
3230
this.unsubscribe();
33-
this.store = store;
3431
this.unsubscribe = store.subscribe((next) => {
3532
this.shells = next;
3633
this.rebuild();

src/ui-pi/banners.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export class ContextWarning extends Container {
9191
const urgent = this.pct >= 95;
9292
const glyph = urgent ? "⚠" : "•";
9393
const color = urgent ? ansi.red : ansi.yellow;
94-
this.line.setText(`${color(ansi.bold(`${glyph} ${this.pct}% of context used`))} ${ansi.dim("— run /compact to free space")}`);
94+
this.line.setText(
95+
`${color(ansi.bold(`${glyph} ${this.pct}% of context used`))} ${ansi.dim("— run /compact to free space")}`,
96+
);
9597
this.line.invalidate();
9698
}
9799
}

src/ui-pi/first-run-wizard.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ export class FirstRunWizard extends Container {
169169
private renderOAuthRunning(): void {
170170
if (this.manualUrl) {
171171
this.addChild(new Text(ansi.bold(ansi.yellow("Sign in to continue")), 1, 0));
172-
this.addChild(new Text(ansi.dim("Opening browser automatically. If it didn't open, copy the URL below:"), 1, 1));
172+
this.addChild(
173+
new Text(ansi.dim("Opening browser automatically. If it didn't open, copy the URL below:"), 1, 1),
174+
);
173175
// Bare URL on its own line with NO left padding so terminal
174176
// select-copy doesn't pick up indent spaces. The terminal may
175177
// still hard-wrap the URL across rows; cmd/triple-click most
@@ -182,9 +184,7 @@ export class FirstRunWizard extends Container {
182184
// still has the failed URL in its address bar — that URL
183185
// contains the code + state. They paste it here and we finish
184186
// the flow without the local listener.
185-
this.addChild(
186-
new Text(ansi.dim("Redirect failed? Paste the http://127.0.0.1/callback?... URL here:"), 1, 0),
187-
);
187+
this.addChild(new Text(ansi.dim("Redirect failed? Paste the http://127.0.0.1/callback?... URL here:"), 1, 0));
188188
this.pasteInput = new Input();
189189
this.pasteInput.onSubmit = (text) => this.handlePasteSubmit(text);
190190
this.addChild(this.pasteInput);
@@ -195,11 +195,7 @@ export class FirstRunWizard extends Container {
195195
} else {
196196
this.addChild(new Text(`Opening ${ansi.cyan(this.authBase)} in your browser…`, 1, 0));
197197
this.addChild(
198-
new Text(
199-
ansi.dim("Complete sign-in in the browser tab. This window will continue automatically."),
200-
1,
201-
1,
202-
),
198+
new Text(ansi.dim("Complete sign-in in the browser tab. This window will continue automatically."), 1, 1),
203199
);
204200
}
205201
}
@@ -235,7 +231,9 @@ export class FirstRunWizard extends Container {
235231
input.onEscape = () => this.setMode("byok-provider");
236232
this.keyInput = input;
237233
this.addChild(input);
238-
this.addChild(new Text(ansi.dim("Stored at ~/.codebase/credentials.json (mode 0600). Enter to save, Esc to go back."), 1, 1));
234+
this.addChild(
235+
new Text(ansi.dim("Stored at ~/.codebase/credentials.json (mode 0600). Enter to save, Esc to go back."), 1, 1),
236+
);
239237
}
240238

241239
private renderError(message: string): void {

src/ui-pi/message-view.test.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ function assistantBlocks(content: AgentMessage["content"]): AgentMessage {
2626
} as AgentMessage;
2727
}
2828

29-
function toolResult(opts: {
30-
toolName: string;
31-
text: string;
32-
isError?: boolean;
33-
}): AgentMessage {
29+
function toolResult(opts: { toolName: string; text: string; isError?: boolean }): AgentMessage {
3430
return {
3531
role: "toolResult",
3632
toolCallId: "tc",
@@ -67,11 +63,7 @@ describe("buildMessageBlocks", () => {
6763
});
6864

6965
it("skips unknown block types instead of crashing", () => {
70-
const blocks = userBlocks([
71-
{ type: "text", text: "hi" },
72-
// biome-ignore lint/suspicious/noExplicitAny: deliberately invalid block to assert the safety branch
73-
{ type: "future-format-we-dont-know" } as any,
74-
]);
66+
const blocks = userBlocks([{ type: "text", text: "hi" }, { type: "future-format-we-dont-know" } as any]);
7567
const out = buildMessageBlocks(blocks, NO_TOOLS, "user");
7668
expect(out).toHaveLength(1);
7769
});
@@ -126,11 +118,7 @@ describe("buildMessageBlocks", () => {
126118

127119
it("toolResult NEVER truncates errors, even when long", () => {
128120
const text = Array.from({ length: 200 }, (_, i) => `boom ${i}`).join("\n");
129-
const out = buildMessageBlocks(
130-
toolResult({ toolName: "shell", text, isError: true }),
131-
NO_TOOLS,
132-
"toolResult",
133-
);
121+
const out = buildMessageBlocks(toolResult({ toolName: "shell", text, isError: true }), NO_TOOLS, "toolResult");
134122
expect(out).toHaveLength(1);
135123
});
136124
});

src/ui-pi/message-view.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,7 @@ export class CollapsedReadGroup implements Component {
151151
const pathWidth = Math.max(20, width - 6);
152152
for (const c of this.calls) {
153153
const a = (c.args ?? {}) as Record<string, unknown>;
154-
const rawPath =
155-
typeof a.path === "string"
156-
? a.path
157-
: typeof a.file_path === "string"
158-
? a.file_path
159-
: "";
154+
const rawPath = typeof a.path === "string" ? a.path : typeof a.file_path === "string" ? a.file_path : "";
160155
const path = displayPath(rawPath);
161156
const status = this.tools.get(c.id)?.status;
162157
const failed = status === "error";

src/ui-pi/tool-panel-live.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export class LiveToolPanel implements Component {
6363
}
6464

6565
function takeTail(text: string, maxLines: number): string[] {
66-
const lines = text.replace(/\r/g, "").split("\n").filter((l) => l.length > 0);
66+
const lines = text
67+
.replace(/\r/g, "")
68+
.split("\n")
69+
.filter((l) => l.length > 0);
6770
return lines.slice(-maxLines);
6871
}
6972

src/ui/FirstRunSetup.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ function renderBody(
398398
);
399399
}
400400

401-
402401
function oauthConfigForBase(base: string): OAuthConfig {
403402
const trimmed = base.replace(/\/+$/, "");
404403
return {

0 commit comments

Comments
 (0)