fix(omp): recognize rule composer shape - #160
Closed
taiansu wants to merge 2 commits into
Closed
Conversation
Owner
|
Thanks Tai An, this lands. Your two commits are on main from 72fbfec with your authorship, plus one of mine that names the Herdr version in the fixture header and adds the changelog credit. It ships in 1.6.0. |
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.
Summary
composer.shape: rulelayout alongside the existing OMP 17 boxed composer and OMP 18.1.2 clipped-box renderingScope follows the maintainer guidance in #161: this PR handles the
ruleshape only. The scanner remains insideharness/omp/; it does not share a locator with the Claude harness and adds no interactive OMP dialog or keystroke recipe.Root cause
#150 fixed a clipped OMP 18.1.2 box rendering whose bottom prompt row appears as an open-ended
╰─ <draft>form. Therulerenderer is a distinct shape with no╰─anchor:The current OMP adapter therefore returned
composerReady: falsebefore typing. A forced retry could type the text, butextractInputDraftstill returnednull, so the guard correctly withheld Enter and reported that the message did not reach the input box.Renderer source: https://github.com/can1357/oh-my-pi/blob/v18.1.10/packages/tui/src/components/composer/rule.ts
Related failure class: #149 / #150. This PR covers only the separate
ruleshape.Safety
The scanner does not search for a loose
❯row. It requires the complete renderer choreography at the buffer tail: a top rule directly adjacent to the prompt, no more than 100 two-space continuation rows, exactly one blank gap, and one standalone status row as the final non-blank row.Tests pin both sides of the hard cap (100 accepted, 101 rejected), tail anchoring, every captured OMP menu/select modal, and every Claude, Codex, and Grok fixture as rejection cohorts. The prompt binding contains every visible prompt row, including the visible ghost suffix. Draft verification removes that suffix only from the extracted input value; Enter remains gated on read-back evidence.
The original
## omp corpussection remains the provenance for the OMP 17.2.12 captures. The new captures have their own dated OMP 18.1.10 section.Verification
cd web && bun run test— 166 files passed; 4,956 tests passed; 30 existing todoscd web && bun run typecheckbun run lintcd web && bun run buildpane.read format:ansicaptures from an OMP 18.1.10 sandbox usingcomposer.shape: rule: idle, single draft, and wrapped draft with a styled inline suggestionLive guarded-reply verification used this checkout's real Collie UI against an OMP 18.1.10 sandbox:
COLLIE_RULE_18110_STALEwas stranded in the terminal composer./keyswithexpected_prompt: "❯ COLLIE_RULE_18110_STALE".COLLIE_RULE_18110_LIVE_ACK_FINALwithsubmit:false, read the pane back, then sent the emptysubmit:truerequest./modelopen, Collie retainedCOLLIE_RULE_18110_MODAL_GUARD, offered the explicitType anyway?override, sent no/replyor/keyswrite, and left the modal unchanged.