Repository navigation
Fix multi-range undo selection and restore lane status - #1357
Conversation
…e waiting status in lane. - Replaced hardcoded `getByIndex(0)` with `selected_text_range` in `plugin/writer/selection.py` which searches for the first non-empty text range. This resolves an issue where undoing a streamed edit leaves an empty range at index 0 and silently ignores `extend_selection` or inserts at the document end. - Added `resume_status` in `llm_request_lane` so that if a "Waiting for another document's reply..." status is sent while blocking on the global lock, the correct status (e.g. "Thinking...") is restored once the lock is acquired. - Updated `WriterCompoundUndo`, `WriterStreamedRewriteSession`, and `WriterStreamedAppendSession` docstrings to explain that the undo context intentionally stays open during streaming, grouping background user edits into the same undo step. - Included comprehensive tests for selection multi-range skipping and lane status resumption.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Fixes two bugs and updates docstrings:
getByIndex(0)being an empty range at the end of the text. Becausedo_extend_selectionandtarget_resolverblindly picked index 0, they would see an empty selection and misbehave. The fix introducesselected_text_rangewhich correctly searches for the real selection.llm_request_lanelock was acquired. It now accepts and restores aresume_status.WriterCompoundUndoto clarify that the context stays open for the whole stream.Also removed scratch files after review.
PR created automatically by Jules for task 922049502696162966 started by @KeithCu