Keep Stop/idle partials, cancel tools honestly, unblock CI - #10
Merged
Conversation
Stop and idle now keep the streamed partial (including sync_response), mark interrupted tools cancelled instead of completed, and actually cancel serial/prefetched tool work. Session delete clears the dead draft and stream cache immediately. Local python/command spawn silently drops control-plane secrets while keeping PATH/HOME/user env. Image HTTP gets a timeout; emit_run_event and file write/edit leave the event loop. Ruff F541 and useColResize render-ref writes are fixed so CI can run. Co-authored-by: wu1w <wu1w@users.noreply.github.com>
Co-authored-by: wu1w <wu1w@users.noreply.github.com>
The useColResize lint fix let tsc run. Chat page shadowed useT() with a setTimeout id (Number not callable). CronWebhookPanel already called t() without importing useT. Co-authored-by: wu1w <wu1w@users.noreply.github.com>
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.
Personal-desktop smoothness: Stop/idle/delete feel like a mainstream agent, secrets are stripped silently, and CI lint gates are unblocked. No new approval gates, confirm dialogs, or capability walls.
What changed
Stop / idle / session delete
sync_responseidle now keeps the streamed partial (same path asstatus: idle/ Stop fallback) instead of wiping it before history lands._should_stopflips (process trees already die onCancelledError).tevarn-chat-draft:<id>and the stream-cache entry. No extra confirm or delay.Silent secret strip
python/commandspawn inherits host env minus control-plane keys (TEVARN_JWT_SECRET, desktop HMAC, admin password, encryption/RPC secrets). PATH, HOME, and user-intended env (e.g.OPENAI_API_KEY) stay. No permission prompt.CI without policy churn
useColResizesyncs the width ref in an effect (React-legal). Did not downgradereact-hooks/refs.backend/agent/loop.py(Ruff F541). Pytest can run again after Ruff.useT()with asetTimeoutid;CronWebhookPanelimportsuseTso existingt()calls typecheck.Hang-avoidance
aiohttpsessions useClientTimeout(total=120, connect=10). No retries.emit_run_eventspill I/O andfile_write/file_editdisk I/O go throughasyncio.to_thread.What was verified locally
ruff checkon the F541 file and all touched Python files: clean.tsc --noEmitinfrontend/: clean after the typecheck follow-up.test_loop_stop_ux,test_tool_parallel(including new stop/cancel cases),test_tool_spawn_env,test_hang_avoidance— all green.Deliberately skipped
extra_rootsconfirms, MCP allowlists, steward/_workforce stripping, multi-user IDOR checks — those add walls or hot-path gates.openExternal/assertTrustedIpc— not one-line-safe for current UX.channels/page.tsxno-explicit-anywarnings — not a typecheck error.How to review
Focus on
frontend/app/chat/page.tsx,backend/agent/phases/tool_round.py,backend/core/host_commands.py, and the two CI one-liners. The product goal is fail-open desktop smoothness: Stop keeps what you already saw, delete is instant, tools that need PATH still work.