Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/lib/startupBanner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { Config, ProcessorName, SUPPORTED_PROCESSORS } from "./config";

const ASCII_ART = `
_ _ _ _
(_)_ __ ___ _ __ | | ___ (_) __| |
| | '_ \` _ \\| '_ \\| |/ _ \\| |/ _\` |
| | | | | | | |_) | | (_) | | (_| |
|_|_| |_| |_| .__/|_|\\___/|_|\\__,_|
|_|
`;

export interface StartupBannerOptions {
version?: string;
description?: string;
Expand Down Expand Up @@ -93,6 +102,7 @@ export function buildStartupBanner(
const version = options.version ?? "unknown";

const lines = [
ASCII_ART,
`imploid v${version} - ${options.description}`,
"",
formatRepoLine(config),
Expand Down
40 changes: 20 additions & 20 deletions tests/startupBanner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Config, ProcessorName } from "../src/lib/config";
import { buildStartupBanner } from "../src/lib/startupBanner";

describe("buildStartupBanner", () => {
test("summarises configured repos, processors, and notifications", () => {
test("includes ASCII art and summarises configured repos, processors, and notifications", () => {
const originalHome = process.env.HOME;
process.env.HOME = "/home/test";

Expand Down Expand Up @@ -35,21 +35,21 @@ describe("buildStartupBanner", () => {
processorsOverride: ["claude"],
});

expect(lines).toEqual([
"imploid v1.2.3 - Coordinates Claude and Codex to work GitHub issues in parallel.",
"",
"Repos: 3 configured -> hey/mobile-app, hey/marketing-site, +1 more (cache: ~/.imploid/repos)",
"Processors: claude active timeout=3600s interval=5s | codex skipped (--processors)",
"Concurrency: up to 3 issues at a time",
"Notifications: Slack -> C012345 ; Telegram -> off",
"",
]);
expect(lines[0]).toContain("_");
expect(lines[0]).toContain("|");
expect(lines[1]).toBe("imploid v1.2.3 - Coordinates Claude and Codex to work GitHub issues in parallel.");
expect(lines[2]).toBe("");
expect(lines[3]).toBe("Repos: 3 configured -> hey/mobile-app, hey/marketing-site, +1 more (cache: ~/.imploid/repos)");
expect(lines[4]).toBe("Processors: claude active timeout=3600s interval=5s | codex skipped (--processors)");
expect(lines[5]).toBe("Concurrency: up to 3 issues at a time");
expect(lines[6]).toBe("Notifications: Slack -> C012345 ; Telegram -> off");
expect(lines[7]).toBe("");
} finally {
process.env.HOME = originalHome;
}
});

test("uses fallback text when no repos or processors enabled", () => {
test("includes ASCII art and uses fallback text when no repos or processors enabled", () => {
const config = {
githubRepos: [],
baseRepoPath: "",
Expand All @@ -68,14 +68,14 @@ describe("buildStartupBanner", () => {

const lines = buildStartupBanner(config);

expect(lines).toEqual([
"imploid vunknown - undefined",
"",
"Repos: none configured (run imploid --config)",
"Processors: claude disabled (config) | codex disabled (config)",
"Concurrency: up to 2 issues at a time",
"Notifications: Slack -> off ; Telegram -> off",
"",
]);
expect(lines[0]).toContain("_");
expect(lines[0]).toContain("|");
expect(lines[1]).toBe("imploid vunknown - undefined");
expect(lines[2]).toBe("");
expect(lines[3]).toBe("Repos: none configured (run imploid --config)");
expect(lines[4]).toBe("Processors: claude disabled (config) | codex disabled (config)");
expect(lines[5]).toBe("Concurrency: up to 2 issues at a time");
expect(lines[6]).toBe("Notifications: Slack -> off ; Telegram -> off");
expect(lines[7]).toBe("");
});
});