← Back to PRs

#21596: Feat/chatloop

by dk-ecorbit open 2026-02-20 04:32 View on GitHub →
app: web-ui size: M
## Summary Describe the problem and fix in 2–5 bullets: - Problem: - Why it matters: - What changed: - What did NOT change (scope boundary): ## Change Type (select all) - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Docs - [ ] Security hardening - [ ] Chore/infra ## Scope (select all touched areas) - [ ] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [ ] Integrations - [ ] API / contracts - [ ] UI / DX - [ ] CI/CD / infra ## Linked Issue/PR - Closes # - Related # ## User-visible / Behavior Changes List user-visible changes (including defaults/config). If none, write `None`. ## Security Impact (required) - New permissions/capabilities? (`Yes/No`) - Secrets/tokens handling changed? (`Yes/No`) - New/changed network calls? (`Yes/No`) - Command/tool execution surface changed? (`Yes/No`) - Data access scope changed? (`Yes/No`) - If any `Yes`, explain risk + mitigation: ## Repro + Verification ### Environment - OS: - Runtime/container: - Model/provider: - Integration/channel (if any): - Relevant config (redacted): ### Steps 1. 2. 3. ### Expected - ### Actual - ## Evidence Attach at least one: - [ ] Failing test/log before + passing after - [ ] Trace/log snippets - [ ] Screenshot/recording - [ ] Perf numbers (if relevant) ## Human Verification (required) What you personally verified (not just CI), and how: - Verified scenarios: - Edge cases checked: - What you did **not** verify: ## Compatibility / Migration - Backward compatible? (`Yes/No`) - Config/env changes? (`Yes/No`) - Migration needed? (`Yes/No`) - If yes, exact upgrade steps: ## Failure Recovery (if this breaks) - How to disable/revert this change quickly: - Files/config to restore: - Known bad symptoms reviewers should watch for: ## Risks and Mitigations List only real risks for this PR. Add/remove entries as needed. If none, write `None`. - Risk: - Mitigation: <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds a new "Chat (loop)" tab that implements a dual-input UI workflow: Claude's response auto-fills a secondary textarea, which can be edited and sent to GPT-5.2 via a sub-session, with the GPT response then populating the main input field. **Key changes:** - New `/chatloop` route and tab with dual-textarea UI - `sendChatLoop()` function creates a `LOOP_SESSION_KEY` sub-session with `LOOP_MODEL` (`openai/gpt-5.2`) override - Uses polling (`chat.history` every 1s for up to 60s) to wait for GPT-5.2 response - Auto-fills loop draft with last assistant message when in chatloop tab - CSS transitions for expanding/collapsing textareas on focus **Issues found:** - Polling logic may miss responses if the same text is returned twice consecutively - `sessions.patch` error handling assumes auto-creation but the RPC doesn't create sessions - Tab-switching doesn't trigger draft filling (only happens if already on chatloop when message arrives) - Sustained polling load with no exponential backoff - Unused `loadChatLoopSystemPrompt()` function - Korean placeholder text mixed with English UI <h3>Confidence Score: 3/5</h3> - This PR adds a new experimental feature with several logical issues that could cause silent failures or unexpected behavior in production. - Score reflects multiple functional bugs (polling logic, error handling, tab-switching) and performance concerns (sustained polling load). The feature works for the happy path but has edge cases that will cause silent failures. Not critical since it's an additive feature, but needs fixes before widespread use. - Pay close attention to `ui/src/ui/app-gateway.ts` - contains the polling logic, error handling, and session management bugs that need to be addressed. <sub>Last reviewed commit: c146f54</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs