refactor: remove custom title generation and optimize session updates#187
Merged
chriswritescode-dev merged 3 commits intomainfrom Apr 16, 2026
Merged
refactor: remove custom title generation and optimize session updates#187chriswritescode-dev merged 3 commits intomainfrom
chriswritescode-dev merged 3 commits intomainfrom
Conversation
…titles - Delete backend/src/routes/title.ts and backend/src/services/session-title.ts - Remove /api/generate-title route from backend/src/index.ts - Delete backend/test/routes/title.test.ts - Remove useTitleGenerating hook and title generation logic from frontend/src/hooks/useOpenCode.ts - Remove generating prop from Header.EditableTitle and frontend/src/pages/SessionDetail.tsx - Clean up unused imports in frontend/src/hooks/useOpenCode.ts and frontend/src/components/ui/header.tsx - Session titles now come directly from upstream OpenCode via session refetches after prompt
- Remove redundant query invalidations in useSendPrompt - Use setQueryData for optimistic updates in SSE session.updated handler - Update session cache directly when session exists in list - Prepend new sessions to list when not found - Fall back to invalidation only when cache is empty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
backend/src/routes/title.ts: Deleted custom title generation route (228 lines)backend/src/services/session-title.ts: Deleted title generation servicebackend/test/routes/title.test.ts: Deleted title route tests (150 lines)backend/src/index.ts: Removed/api/generate-titleroute registrationfrontend/src/hooks/useOpenCode.ts: RemoveduseTitleGeneratinghook and title generation logicfrontend/src/hooks/useSSE.ts: Replaced query invalidations withsetQueryDatafor optimistic updatesfrontend/src/components/ui/header.tsx: Removedgeneratingprop and loading statefrontend/src/pages/SessionDetail.tsx: Removed title generating state usageSession titles now come directly from upstream OpenCode via SSE events and session refetches.
Type of Change
Checklist
pnpm lintpasses locallypnpm typecheckpasses locally