Skip to content

docs(ime): codify desktop composition regression checks - #17172

Merged
nwparker merged 10 commits into
stablyai:mainfrom
nwparker:nwparker/docs-ime-regression-checklist
Aug 30, 2026
Merged

nwparker merged 10 commits into
stablyai:mainfrom
nwparker:nwparker/docs-ime-regression-checklist

Conversation

@nwparker

@nwparker nwparker commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

This gives future IME fixes one durable checklist: what each regression means, which component owns provisional text, how async attachments must settle, what evidence is required, and what must be checked on macOS, Windows, and Linux/SSH.

What changed

Why

Synthetic regression tests and native input methods prove different things. Capturing both layers prevents a future fix from solving one machine's symptom while regressing browser, renderer, PTY, remote-host, attachment, or ordinary mid-line behavior.

Linked issues

Refs #16911

Refs #16949

Refs #16950

Refs #17104

Visual proof

N/A — documentation-only change with no rendered Orca UI surface.

Exact-head verification

Published head: 0f5d797d0f4831093e65e3e7df6b8e7ce388d2b3

  • Merged current main normally before verification.
  • pnpm exec oxfmt --check docs/reference/ime-regression-checklist.md: passed.
  • pnpm tc: passed.
  • pnpm run check:code-quality:changed: passed; no changed JavaScript or TypeScript.
  • PR-range and worktree git diff --check: passed.
  • git ls-files --error-unmatch docs/reference/ime-regression-checklist.md: passed.
  • Final diff versus origin/main: one .gitignore allowlist and one reference document; no runtime code.

Readiness and code elegance

  • Exact-head audit found zero proven P0/P1/P2 findings; counsel was unnecessary because there were no candidates.
  • No runtime, network, retry, listener, timer, persistence, mobile, wire, IPC, PTY, native-module, provider, path, shortcut, or packaging behavior changes.
  • The checklist covers the fix(native-chat): preserve IME composition across async updates #17169 attachment race at its shared semantic sink: reverse-order concurrent SSH completions, duplicates, DOM-before-flush, both batched settlement orders, disabled discard, and blur with no focus theft.
  • It requires one existing owner and one resolved-attachment sink; semantic paths are queued, never whole-draft snapshots.
  • Remote-host language follows the SSH execution-boundary verdict vocabulary.
  • macOS, Windows, Linux/SSH, local and remote PTYs, preview terminals, mobile non-impact, and folder workspaces are explicit.
  • The change reuses the existing docs/reference/ structure and adds no parallel checklist file.

AI disclosure

AI-assisted editing and review were used. All claims are tied to the committed document and exact-head gates above.

Agent skill upstream boundary

  • Not applicable.

Notes

Implementation PRs:

This PR is technically independent but should merge after those code PRs so its issue ledger describes landed behavior.

Checklist

  • This PR is small and focused
  • Root causes, ownership invariants, and evidence requirements are explicit
  • Async attachment settlement and both event orders are covered
  • Visual proof is correctly marked N/A
  • Readiness, security, performance, mobile/backcompat, and code elegance reviewed
  • Cross-platform, SSH/remote, folder-workspace, and native-evidence boundaries considered
  • Exact-head formatting, typecheck, changed-code quality, tracking, and whitespace checks pass
  • Fresh GitHub CI run 33293935966 completed cleanly: 16 successful, 10 skipped, 0 failed or pending (including verify); the prior failures were the shared happy-dom baseline, not documentation assertions.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds docs/reference/ime-regression-checklist.md with acceptance contracts for four IME issues. The document defines bounded state, ownership rules, asynchronous attachment settlement, cross-platform verification, remote-evidence states, cleanup limits, and deterministic regression test requirements. Updates .gitignore to keep the reference document tracked.

Merge Risk: 🔵 Low · up to b7a26

This documentation-only PR adds IME regression requirements without changing runtime behavior. It is mergeable with owner follow-up to clarify bounded state and cleanup rules, cover every attachment path and duplicate settlement, and confirm local PTY, preview-terminal, and folder-workspace verification; these gaps could leave future fixes under-specified but do not create a current production behavior change.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: adding desktop IME composition regression checks to documentation.
Description check ✅ Passed The description is complete in substance. It explains the change, purpose, linked issues, visual-proof exception, verification, AI use, scope, and review considerations. It provides equivalent testing…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description is complete in substance. It explains the change, purpose, linked issues, visual-proof exception, verification, AI use, scope, and review considerations. It provides equivalent testing and review information, although it does not use the exact ## Testing and ## Review headings from the template.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR adds a durable IME regression checklist and permits that reference document through the repository’s documentation ignore policy.

  • Records ownership, bounded-state, attachment-settlement, and terminal-composition contracts.
  • Defines native verification requirements across macOS, Windows, and Linux/SSH.
  • Defines live, exited, and unverifiable remote-evidence states, fully addressing the previous thread.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.gitignore Allowlists the new IME checklist while preserving the existing documentation ignore policy.
docs/reference/ime-regression-checklist.md Adds the IME regression contracts and now defines all remote-evidence states with explicit host-owned evidence requirements.

Reviews (9): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/reference/ime-regression-checklist.md (1)

36-40: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Make all required native contexts explicit.

The native matrix covers macOS, Windows, and Linux/SSH. It does not explicitly require native evidence for local PTYs, preview terminals, or folder workspaces. Lines 62-63 require paired tests, but those tests are not native evidence. Add explicit rows or context columns for every environment named in the PR objective.

🧹 Nitpick comments (2)
docs/reference/ime-regression-checklist.md (2)

23-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Name the composition settlement event explicitly.

The heading and attachment section use “settlement” for asynchronous attachment resolution. These lines use the same term for the compositionend/blur transition. State that only the first composition-settlement event adopts the browser DOM and flushes the queue. Attachment completions must only enqueue while composition is active.


60-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Define the per-composition bound.

The gate requires bounded state and work, but it defines no limit or overflow behavior. Add a measurable bound and a deterministic cancellation or rejection rule. Reviewers must be able to verify this requirement without inferring the limit from implementation details.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c5e709f-f518-42d4-9e5c-78208f09c08f

📥 Commits

Reviewing files that changed from the base of the PR and between e08313d and f0a34f2.

📒 Files selected for processing (1)
  • docs/reference/ime-regression-checklist.md

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/reference/ime-regression-checklist.md (2)

25-27: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cover all declared attachment producers.

The contract names local selection, pasted-image temp saves, and SSH uploads. The cases below exercise only SSH uploads. Add local-selection and pasted-image cases with the same ordering, duplicate, disable, and blur assertions.


29-30: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Test duplicate settlement separately from duplicate paths.

Returning one path twice checks duplicate payload values. It does not check the duplicate-settlement failure described in the issue ledger, where the same completion is processed twice and stale DOM is re-adopted. Deliver one completion twice and assert that DOM adoption and queue flushing occur once.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a3f091a-7345-4962-859c-d5549bbc86bc

📥 Commits

Reviewing files that changed from the base of the PR and between 56b3e10 and b7a26f8.

📒 Files selected for processing (1)
  • docs/reference/ime-regression-checklist.md

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


Every transient collection and ownership tracker must have an explicit lifetime and bound:

- Native Chat uses `NATIVE_FILE_DROP_MAX_PATHS` (`256`). If a resolved completion would cross the cap, the whole batch is rejected atomically and the overflow notice remains visible through settlement; accepted paths keep order and duplicates. The queue is cleared before re-entry and on disable or pane-owner remount.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Make attachment work owner-scoped and bounded.

Clearing the queue does not invalidate an in-flight completion. A local, pasted-image, or SSH result can resolve after re-entry and enter the new owner’s queue. Define a bound for pending attachment work and discard results from older composition or pane-owner generations before enqueueing.

Proposed contract update
- The queue is cleared before re-entry and on disable or pane-owner remount.
+ Pending attachment work and queued semantic paths are bounded per owner.
+ Results from an older composition or pane-owner generation are discarded.
+ The queue is cleared before re-entry and on disable or pane-owner remount.

Every transient collection and ownership tracker must have an explicit lifetime and bound:

- Native Chat uses `NATIVE_FILE_DROP_MAX_PATHS` (`256`). If a resolved completion would cross the cap, the whole batch is rejected atomically and the overflow notice remains visible through settlement; accepted paths keep order and duplicates. The queue is cleared before re-entry and on disable or pane-owner remount.
- The terminal placeholder mask tracks one scalar `activeSessionId` because xterm renders one composition view. A newer start supersedes an older one, a stale end cannot clear the latest owner, and blur or disposal clears it. The composition route keeps its per-ID reference-counted map intentionally for transport ownership; it is not replaced by the scalar.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Include compositionend in placeholder-mask cleanup.

Line 20 lists blur and disposal, but not normal compositionend. The issue ledger requires end, blur, and disposal to clear ownership, class, and listeners. Add compositionend here so a completed composition cannot leave the placeholder mask active.

Proposed contract update
- a stale end cannot clear the latest owner, and blur or disposal clears it.
+ a stale end cannot clear the latest owner, and compositionend, blur, or disposal clears it.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- The terminal placeholder mask tracks one scalar `activeSessionId` because xterm renders one composition view. A newer start supersedes an older one, a stale end cannot clear the latest owner, and blur or disposal clears it. The composition route keeps its per-ID reference-counted map intentionally for transport ownership; it is not replaced by the scalar.
- The terminal placeholder mask tracks one scalar `activeSessionId` because xterm renders one composition view. A newer start supersedes an older one, a stale end cannot clear the latest owner, and compositionend, blur, or disposal clears it. The composition route keeps its per-ID reference-counted map intentionally for transport ownership; it is not replaced by the scalar.


- Native Chat uses `NATIVE_FILE_DROP_MAX_PATHS` (`256`). If a resolved completion would cross the cap, the whole batch is rejected atomically and the overflow notice remains visible through settlement; accepted paths keep order and duplicates. The queue is cleared before re-entry and on disable or pane-owner remount.
- The terminal placeholder mask tracks one scalar `activeSessionId` because xterm renders one composition view. A newer start supersedes an older one, a stale end cannot clear the latest owner, and blur or disposal clears it. The composition route keeps its per-ID reference-counted map intentionally for transport ownership; it is not replaced by the scalar.
- Typing diagnostics cap pending and ignored echo candidates at `MAX_PENDING_ECHO_CANDIDATES` (`64`), cap pending user-input signals, drain timed-out candidates, and clear all series on pane detach. Overflow becomes an explicitly ambiguous burst rather than an arbitrary attribution.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Specify the pending user-input signal bound.

Line 17 requires an explicit bound for every transient collection. MAX_PENDING_ECHO_CANDIDATES bounds echo candidates, but pending user-input signals has no limit, identifier, or overflow behavior. Define those values and require the same ambiguous-burst handling at overflow.

@nwparker

Copy link
Copy Markdown
Contributor Author

Fresh CI on head b7a26f8ed688 has 9 passing, 10 skipped, and 7 failures. The unit-shard failures and aggregate verify are the shared #17330 happy-dom OffscreenCanvas baseline regression, not a documentation change. The checklist content itself passes its focused formatting/type/quality checks. The root-cause test-environment repair is tracked in #17336.

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* docs(ime): codify desktop composition regression checks

* docs(ime): define remote verification verdicts

* docs(ime): narrow placeholder masking invariant

* docs(ime): require final-cell caret containment

* docs(ime): cover async attachment settlement

* docs(ime): correct semantic placeholder contract

* docs(ime): record bounded ownership contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant