Skip to content

Refactor socket orchestration to HTTP-first while keeping socket service#42

Closed
senamakel wants to merge 7 commits into
tinyhumansai:mainfrom
senamakel:feat/chat_fix
Closed

Refactor socket orchestration to HTTP-first while keeping socket service#42
senamakel wants to merge 7 commits into
tinyhumansai:mainfrom
senamakel:feat/chat_fix

Conversation

@senamakel
Copy link
Copy Markdown
Member

@senamakel senamakel commented Mar 27, 2026

Summary

  • Remove app-level socket orchestration wiring by deleting SocketProvider and socket hooks.
  • Keep socketService in place for optional reverse-proxy transport, but remove built-in MCP/tool orchestration event handlers.
  • Disable socket-driven skills/integration sync (tool:sync, metadata sync emits) and chat:init socket emits.
  • Update Intelligence connection handling to no longer depend on socket status.
  • Update connection indicator fallback logic and docs in CLAUDE.md to reflect HTTP-first orchestration.

Problem

  • The codebase still had backend-pushed socket orchestration paths active (mcp:listTools, mcp:toolCall, tool:sync, Intelligence socket hooks), which conflicts with the desired HTTP chat-only orchestration behavior.
  • Socket transport still needs to remain available for reverse-proxy scenarios.

Solution

  • Removed the reactive socket orchestration layer (provider + hooks + event emitters) from frontend runtime paths.
  • Preserved src/services/socketService.ts as an optional transport service, but stripped orchestration-specific handlers.
  • Replaced skills/integration socket sync calls with no-op shims to keep call sites stable without backend-pushed events.
  • Simplified Intelligence provider/page connection status handling so the feature is not blocked by socket connectivity.

Testing

  • yarn -s compile
  • cargo check --manifest-path src-tauri/Cargo.toml
  • Other checks run (list commands)
  • yarn -s tsc --noEmit
  • yarn -s eslint src/App.tsx src/services/socketService.ts src/lib/skills/sync.ts src/lib/intelligence/chatTools.ts src/providers/IntelligenceProvider.tsx src/pages/Intelligence.tsx src/components/ConnectionIndicator.tsx src/lib/gmail/services/metadataSync.ts src/lib/notion/services/metadataSync.ts
  • pre-push hooks: prettier --check ., eslint . --ext .ts,.tsx, tsc --noEmit
  • Manual validation completed (list scenarios)
  • Confirmed no runtime references remain to deleted SocketProvider, useSocket, or useIntelligenceSocket.
  • Confirmed frontend no longer contains mcp:listTools, mcp:toolCall, or tool:sync event wiring.

Impact

  • Frontend chat/tool orchestration now follows HTTP-first behavior.
  • Socket transport remains available in code for future reverse-proxy usage.
  • Existing socket-driven integration metadata sync is currently disabled (intentional, temporary behavior).

Breaking Changes

  • None
  • Yes (describe clearly, including migration steps)

Related

  • Issue(s): N/A
  • Follow-up PR(s)/TODOs:
  • If needed, remove stale Rust-side socket orchestration command surface in a dedicated cleanup PR.

…ation

- Replaced OpenClaw context injection with direct AI configuration retrieval methods.
- Introduced new functions for fetching and refreshing AI configuration, enhancing modularity.
- Cleaned up the AIPanel component to utilize the new configuration structure.
- Removed obsolete OpenClaw-related files and logic to streamline the codebase.
- Added new TODO items for future enhancements in the documentation.
- Introduced a new pull request template in `.github/pull_request_template.md` to standardize PR submissions.
- Updated CLAUDE.md to require the use of the new PR template for all pull requests.
- Added a rule in AGENTS.md specifying that agents must adhere to the PR template when suggesting content.
- Updated the subproject commit reference in the skills directory.
- Refined the pre-push script to improve formatting and linting checks, ensuring automatic fixes are applied when issues are detected.
- Adjusted label formatting in the AIPanel component for better readability by breaking long lines into multiple lines.
- Ensured consistent styling for labels related to personality, safety rules, tools, and skills overview.
… caching

- Updated AI configuration loading to utilize in-memory caching exclusively, removing localStorage dependencies for improved performance and simplicity.
- Adjusted related functions to reflect the new caching strategy, ensuring consistent handling of AI configurations across the application.
- Modified tool and soul loading processes to align with the new in-memory caching approach, enhancing overall efficiency.
@senamakel senamakel closed this Mar 27, 2026
@senamakel senamakel deleted the feat/chat_fix branch March 31, 2026 00:55
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
chore: merge develop into main (v0.28.0)
YOMXXX added a commit to YOMXXX/openhuman that referenced this pull request Jun 1, 2026
upstream/main 的 tinyhumansai#3047/tinyhumansai#3113 让 GithubReader 优先用本地 git clone 跑
list_commits/read_commit,并且简化了 issue 渲染器(不再把 comments 拼到
body)。本测试用 fake gh 只 mock 了 API 路径,所以:

- 在 PATH 上加 fake git 让 ensure_bare_clone/log/show 全部失败,让 reader
  回退到 gh API 那条路径,断言 commit:abc123 / issue:42 / pr:43 才能继续。
- read_issue body 改为断言 "# Issue tinyhumansai#42" + "## Description",去掉
  "## Comments" 期望,与新的 renderer 输出一致。
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