You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/21 04:39:14 UTC

Re: [PR] feat(ui): complete the composer draft from prompt history with Tab [maka]

Astro-Han commented on PR #1874:
URL: https://github.com/apache/maka/pull/1874#issuecomment-5365266737

   **Follow-up: this feature was removed in #3292**
   
   The inline completion shipped in 0.1.11 and turned out to crash the renderer with React error #185 (Maximum update depth exceeded), component stack rooted at `ChatComposerInput`. It was removed in #3292 before it reached a second release.
   
   The failure is structural rather than a missed edge case. The patched `reconcileOffer` ran as a dependency-free effect — deliberately, since the caret and selection state it reads are not announced by a render — while also writing React state and mutating the controlled `contenteditable` DOM. Its early-return depends on three live DOM readings (the offer span still present, `caretAtContentEnd`, `offerFullyVisible`). When any of those flips between two measurements, withdraw → reinsert → set state → render → effect becomes self-sustaining.
   
   Worth recording that the review here was thorough on the dimension it examined — Tab ownership, IME composition, caret placement, undo/redo atomicity, multi-line serialization were all found and fixed. What no round asked was whether an effect that writes state on every render converges. Our automated defenses could not have caught it either: the unit test used `renderToStaticMarkup` (effects never run), and the ten Electron journeys all assert behavior in a settled state, none assert that rendering terminates.
   
   The conclusion in #3292 was to remove the feature rather than add another guard, because the circular authority was the problem: React state and hand-reconciled `contenteditable` DOM cannot both own the offer. A published seam on the component would collapse that into one authority, which is what [facebook/astryx#4822](https://github.com/facebook/astryx/issues/4822) asks for. That RFC is still open with no upstream response, so redoing this should wait on it rather than on another local patch.
   
   Prompt-history recall (ArrowUp/ArrowDown) and history clearing are untouched and still shipping.
   
   *AI disclosure: Claude Code performed the crash analysis (symbolicating the 0.1.11 renderer bundle from the shipped `app.asar`) and drafted this comment; Astro-Han is the human contributor of record.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org