Skip to content

Commit e65c251

Browse files
skulidropekclaude
andcommitted
refactor(container): drop unrelated lint auto-fixes and redundant prelint:effect (#412)
Self-review cleanup: - Revert 15 files that an earlier `git add -A` swept in from the vibecode-linter's auto-fix (String.raw->string, readonly T[]->ReadonlyArray, line-wrapping, .split("/",1)). All were behaviour-preserving but unrelated to the container extraction; restoring them keeps this PR scoped to #412 and preserves blame. - Remove lib's `prelint:effect`: `lint:effect` is plain ESLint and resolves fine without the built container .d.ts (it passed in CI without it), so building the container before it was redundant. `prelint` (for the tsc-running `lint`) stays. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b0dc80a commit e65c251

16 files changed

Lines changed: 17 additions & 41 deletions

packages/app/src/docker-git/api-terminal-codec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ type RawTerminalSession = {
1717

1818
const isTerminalSessionStatus = (
1919
value: string
20-
): value is ApiTerminalSession["status"] => ["ready", "attached", "exited", "failed"].includes(value)
20+
): value is ApiTerminalSession["status"] =>
21+
["ready", "attached", "exited", "failed"].includes(value)
2122

2223
const readOptionalNumber = (value: JsonValue | undefined): number | undefined =>
2324
typeof value === "number" ? value : undefined

packages/app/src/docker-git/controller-docker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const controllerContainerName = process.env["DOCKER_GIT_API_CONTAINER_NAM
3737

3838
const inspectNetworksTemplate = String
3939
.raw`{{range $k,$v := .NetworkSettings.Networks}}{{printf "%s=%s\n" $k $v.IPAddress}}{{end}}`
40-
const inspectEnvTemplate = "{{range .Config.Env}}{{println .}}{{end}}"
40+
const inspectEnvTemplate = String.raw`{{range .Config.Env}}{{println .}}{{end}}`
4141

4242
const controllerBootstrapError = (message: string): ControllerBootstrapError => ({
4343
_tag: "ControllerBootstrapError",

packages/app/src/docker-git/controller-image-revision.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { type ControllerRuntime, runDockerCapture, runDockerCaptureWithFailureOu
99
import { parseControllerRevisionLabelOutput } from "./controller-revision.js"
1010
import type { ControllerBootstrapError } from "./host-errors.js"
1111

12-
const inspectControllerRevisionLabelTemplate =
13-
"{{ index .Config.Labels \"io.prover-coder-ai.docker-git.controller-rev\" }}"
12+
const inspectControllerRevisionLabelTemplate = String
13+
.raw`{{ index .Config.Labels "io.prover-coder-ai.docker-git.controller-rev" }}`
1414
const missingImageInspectionPatterns: ReadonlyArray<RegExp> = [/No such image/iu, /No such object/iu]
1515

1616
/**

packages/app/src/docker-git/frontend-lib/core/auto-agent-flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const resolveAutoAgentFlags = (
1414
if (requested === "auto") {
1515
return Either.right({ agentMode: undefined, agentAuto: true })
1616
}
17-
const agentModes: ReadonlyArray<AgentMode> = ["claude", "codex", "gemini", "grok"]
17+
const agentModes: readonly AgentMode[] = ["claude", "codex", "gemini", "grok"]
1818
const matchedMode = agentModes.find((mode) => mode === requested)
1919
if (matchedMode !== undefined) {
2020
return Either.right({ agentMode: matchedMode, agentAuto: true })

packages/app/src/docker-git/host-errors.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,7 @@ export type HostError =
5656
export type CliError = ParseError | HostError
5757

5858
const isParseError = (error: CliError): error is ParseError =>
59-
[
60-
"UnknownCommand",
61-
"UnknownOption",
62-
"MissingOptionValue",
63-
"MissingRequiredOption",
64-
"InvalidOption",
65-
"UnexpectedArgument"
66-
].includes(error._tag)
59+
["UnknownCommand", "UnknownOption", "MissingOptionValue", "MissingRequiredOption", "InvalidOption", "UnexpectedArgument"].includes(error._tag)
6760

6861
const renderApiRequestError = (error: ApiRequestError): string =>
6962
error.displayOnlyMessage === true

packages/app/src/docker-git/menu-auth.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ const submitAuthPrompt = (view: AuthPromptView, context: AuthInputContext) => {
9999
const label = defaultLabel(nextValues["label"] ?? "")
100100
const effect = resolveAuthPromptEffect(view, context.state.cwd, nextValues)
101101
runAuthPromptEffect(effect, view, label, { ...context, cwd: context.state.cwd }, {
102-
suspendTui: ["GithubOauth", "CodexOauth", "ClaudeOauth", "ClaudeLogout", "GeminiOauth", "GrokOauth"].includes(
103-
view.flow
104-
)
102+
suspendTui: ["GithubOauth", "CodexOauth", "ClaudeOauth", "ClaudeLogout", "GeminiOauth", "GrokOauth"].includes(view.flow)
105103
})
106104
}
107105
)

packages/app/src/docker-git/menu-project-auth.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,7 @@ const runProjectAuthAction = (
130130
}
131131

132132
if (
133-
[
134-
"ProjectGithubDisconnect",
135-
"ProjectGitDisconnect",
136-
"ProjectClaudeDisconnect",
137-
"ProjectGeminiDisconnect",
138-
"ProjectGrokDisconnect"
139-
].includes(action)
133+
["ProjectGithubDisconnect", "ProjectGitDisconnect", "ProjectClaudeDisconnect", "ProjectGeminiDisconnect", "ProjectGrokDisconnect"].includes(action)
140134
) {
141135
runProjectAuthEffect(view.project, action, {}, "default", context)
142136
return

packages/app/src/docker-git/menu-select-presenter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const formatRepoRef = (repoRef: string): string => {
4444
const prPrefix = "refs/pull/"
4545
if (trimmed.startsWith(prPrefix)) {
4646
const rest = trimmed.slice(prPrefix.length)
47-
const number = rest.split("/", 1)[0] ?? rest
47+
const number = rest.split("/")[0] ?? rest
4848
return `PR#${number}`
4949
}
5050
return trimmed.length > 0 ? trimmed : "main"

packages/app/src/web/app-ready-ssh-link-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const decodePathTail = (value: string): string | null => {
2828
}
2929

3030
const readSessionPathRequest = (tail: string): SshLinkRequest | null => {
31-
const decoded = safeDecodeURIComponent(tail.slice("session/".length).split("/", 1)[0] ?? "")
31+
const decoded = safeDecodeURIComponent(tail.slice("session/".length).split("/")[0] ?? "")
3232
const sessionId = decoded?.trim() ?? ""
3333
return sessionId.length === 0 ? null : { kind: "session", sessionId }
3434
}

packages/app/src/web/app-terminal-session-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const readTerminalSessionRoute = (pathname: string): string | null => {
1010
return null
1111
}
1212

13-
const rawSessionId = pathname.slice(terminalSessionRoutePrefix.length).split("/", 1)[0] ?? ""
13+
const rawSessionId = pathname.slice(terminalSessionRoutePrefix.length).split("/")[0] ?? ""
1414
const sessionId = decodeURIComponent(rawSessionId).trim()
1515
return sessionId.length === 0 ? null : sessionId
1616
}

0 commit comments

Comments
 (0)