SYM-212: add foundational thread RPC query hooks#1272
Draft
jwalin-shah wants to merge 1 commit intotinyhumansai:mainfrom
Draft
SYM-212: add foundational thread RPC query hooks#1272jwalin-shah wants to merge 1 commit intotinyhumansai:mainfrom
jwalin-shah wants to merge 1 commit intotinyhumansai:mainfrom
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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
useThreads()anduseThreadMessages(threadId)hook foundations over the existingthreadApiRPC client.data,loading,error,isRefetching, andrefetch()states without migrating chat/runtime consumers yet.Problem
The broader thread cache migration is too large for one PR. The app needs a small tested hook layer over the existing thread RPC API before consumers can migrate safely.
Solution
A new
app/src/hooks/useThreadQueries.tsmodule wrapsthreadApi.getThreads()andthreadApi.getThreadMessages()with lightweight React state and debug logging. This PR does not changeChatRuntimeProvider, streaming behavior, orConversations.tsxconsumers.Submission Checklist
docs/TESTING-STRATEGY.mddiff-cover) meet the gate enforced by.github/workflows/coverage.yml. Runpnpm test:coverageandpnpm test:rustlocally; PRs below 80% on changed lines will not merge.docs/TEST-COVERAGE-MATRIX.mdreflect this change (N/A: internal hook foundation only)## Related(N/A: no matrix feature IDs affected)docs/TESTING-STRATEGY.md)docs/RELEASE-MANUAL-SMOKE.md) (N/A: not a release-cut surface)Closes #NNNin the## Relatedsection (N/A: Linear issue plus upstream tracking issue only)Impact
No user-visible behavior change. This is a foundation for later thread UI/cache migration work.
Related
useThreads(); migrate non-streaming message reads touseThreadMessages(threadId)after reviewing runtime ownership.AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
codex/SYM-212-thread-rpc-query-hooks85165c60cbb4e6eed42e4c74b8adec28b5f64decValidation Run
pnpm --filter openhuman-app format:checkvia focusedpnpm --dir app exec prettier --check src/hooks/useThreadQueries.ts src/hooks/useThreadQueries.test.tspnpm typecheckviapnpm --filter openhuman-app compilepnpm --dir app exec vitest run src/services/api/threadApi.test.ts src/hooks/useThreadQueries.test.ts --config test/vitest.config.tsValidation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
threadApiRPC methods remain the backing source of truth.Duplicate / Superseded PR Handling