Skip to content

chore: remove dead code from durable stream migration#1580

Merged
saddlepaddle merged 1 commit into
mainfrom
chore/remove-dead-code
Feb 19, 2026
Merged

chore: remove dead code from durable stream migration#1580
saddlepaddle merged 1 commit into
mainfrom
chore/remove-dead-code

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Feb 19, 2026

Summary

  • Remove unused oauthCredentials column and OAuthCredentialEntry type from local-db settings schema (never read or written anywhere)
  • Remove dead useChatPresence hook — calls /login and /logout endpoints that don't exist in the API route handler
  • Remove dead auth helpers (buildClaudeEnv, hasClaudeCredentials, getExistingClaudeCredentials) — never called by any code

Test plan

  • Typecheck passes (bunx tsc --noEmit on durable-session, desktop, local-db)
  • Desktop app builds and runs normally

Summary by CodeRabbit

  • Refactor
    • Simplified Anthropic credential handling by removing several exported auth helpers.
    • Removed chat presence hook and related public types (presence/collaboration features).
    • Adjusted durable-session public API to expose durable chat types and hide presence symbols.
    • Removed OAuth credential storage schema from local database.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 19, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This PR removes Anthropic credential orchestration helpers (getExistingClaudeCredentials, buildClaudeEnv, hasClaudeCredentials), deletes the useChatPresence hook and its types, updates durable-session exports to expose useDurableChat symbols, and removes OAuth credential storage from the local DB schema. (49 words)

Changes

Cohort / File(s) Summary
Anthropic Auth Credential Orchestration
apps/desktop/src/main/lib/agent-manager/utils/anthropic/auth/auth.ts, apps/desktop/src/main/lib/agent-manager/utils/anthropic/auth/index.ts
Removed exported orchestration functions getExistingClaudeCredentials, buildClaudeEnv, hasClaudeCredentials and associated env/credential-resolution logic; retained getCredentialsFromConfig and getCredentialsFromKeychain.
Durable Session — Chat Presence Implementation
packages/durable-session/src/react/useChatPresence/useChatPresence.ts, packages/durable-session/src/react/useChatPresence/index.ts
Deleted the entire useChatPresence hook and its public types (ChatUserPresence, ChatAgentPresence, UseChatPresenceOptions, UseChatPresenceReturn) including subscription and POST side-effect logic.
Durable Session — Public API Surface
packages/durable-session/src/react/index.ts
Removed re-exports from useChatPresence; added re-exports from useDurableChat (e.g., ModelOption, SessionConfig, SlashCommand, useDurableChat and related types).
Local DB Schema
packages/local-db/src/schema/schema.ts
Removed exported OAuthCredentialEntry type and the oauth_credentials JSON column from the settings table.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nibble lines of code with care,

Trimmed the clutter, light as air,
Claudes and presence hopped away,
OAuth burrowed out of play,
A tidy burrow, sprint and share.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main objective of removing dead code from the durable stream migration.
Description check ✅ Passed The description adequately covers the main changes (removed code and types) and includes a test plan with specific verification steps.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/remove-dead-code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 19, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app

Thank you for your contribution! 🎉

- Remove unused `oauthCredentials` column and `OAuthCredentialEntry`
  type from local-db settings schema (never read/written)
- Remove dead `useChatPresence` hook (calls nonexistent API endpoints)
- Remove dead auth helpers: `buildClaudeEnv`, `hasClaudeCredentials`,
  `getExistingClaudeCredentials` (never called)
@saddlepaddle saddlepaddle force-pushed the chore/remove-dead-code branch from 5f9480a to 6820fac Compare February 19, 2026 03:20
@saddlepaddle saddlepaddle merged commit 4411d1d into main Feb 19, 2026
14 checks passed
@Kitenite Kitenite deleted the chore/remove-dead-code branch February 19, 2026 21:42
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