Skip to content

chore: remove dead code and fix minor issues (API + infra)#699

Open
simple-agent-manager[bot] wants to merge 1 commit intomainfrom
sam/dead-code-removal-small-01kp4w
Open

chore: remove dead code and fix minor issues (API + infra)#699
simple-agent-manager[bot] wants to merge 1 commit intomainfrom
sam/dead-code-removal-small-01kp4w

Conversation

@simple-agent-manager
Copy link
Copy Markdown
Contributor

Summary

  • Delete unused apps/api/src/lib/errors.ts (zero imports — entire codebase uses AppError/errors from middleware/error.ts)
  • Remove duplicate requireRouteParam in chat.ts, import from lib/route-helpers.ts instead
  • Fix POST /:id/stop returning { status: 'deleted' }{ status: 'stopped' } in nodes.ts
  • Remove unused DeploymentState type and DEPLOYMENT_STATE_VERSION constant from scripts/deploy/types.ts
  • Fix console.logconsole.error for branch fetch failure in CreateWorkspace.tsx
  • Use structured JSON logging for trigger execution sync failure in tasks/_helpers.ts
  • Add toJSON() to ProviderError so JSON.stringify(error) includes message, provider, statusCode, cause

Not changed

  • tools/* in pnpm-workspace.yaml — NOT dead config, tools/og-image has a valid package

Test plan

  • pnpm lint passes (0 errors)
  • pnpm typecheck passes
  • pnpm test passes (all 19 suites, 0 failures)
  • Verified errors.ts has zero imports before deletion
  • Verified DeploymentState and DEPLOYMENT_STATE_VERSION have zero imports outside their own file

Agent Preflight

  • Change class: dead-code-removal, bug-fix
  • Impact: Zero risk — dead code deletion, cosmetic log fix, response body correction
  • Assumptions: All deletions verified with grep to have zero consumers

🤖 Generated with Claude Code

- Delete unused apps/api/src/lib/errors.ts (zero imports, superseded by middleware/error.ts)
- Remove duplicate requireRouteParam in chat.ts, import from lib/route-helpers.ts
- Fix POST /:id/stop returning { status: 'deleted' } → { status: 'stopped' } in nodes.ts
- Remove unused DeploymentState type and DEPLOYMENT_STATE_VERSION from scripts/deploy/types.ts
- Fix console.log → console.error for branch fetch failure in CreateWorkspace.tsx
- Use structured JSON logging for trigger execution sync failure in tasks/_helpers.ts
- Add toJSON() to ProviderError so JSON.stringify includes message, provider, statusCode, cause

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant