Skip to content

test(actions): let the rename's name land before Enter - #155

Open
BartvHelvert wants to merge 1 commit into
masterfrom
test/rename-enter-after-typing
Open

BartvHelvert wants to merge 1 commit into
masterfrom
test/rename-enter-after-typing

Conversation

@BartvHelvert

@BartvHelvert BartvHelvert commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Closes #154. The rename test typed the new name and pressed Enter in one breath:

editor.keyboard { typeText("renamed"); key(KeyEvent.VK_ENTER) }

On ci-flake/escape-07 (run 42692818085)
that Enter split the line at the caret instead of finishing the refactoring — let renamed, then
=1; — and the second occurrence kept the old name. A newline at the caret is what the editor's
own Enter does, so no in-place rename template was there to take the key.

The typing and the Enter are now separate, with a wait between them for the typed name to reach
the backend, where the template actually runs. This is #130's lesson applied to the last place
that still sent a key straight after typing; the snippet test has carried the same wait, and the
comment explaining it, since that issue.

What this does not claim

The run traces neither the key dispatcher nor the template, and CodeBridgeRename logs nothing,
so it cannot say which way the template was absent: not yet holding the typed name when the Enter
arrived, or already given up on — #136's fix abandons the rename when the extension host does not
catch up, and an Enter after that would also fall through to the editor. Both end with this exact
document.

This removes the half that is the test's to remove, which is what #154 describes, so it closes
with this. The other half is #136 — an extension's edit applied in the wrong text's coordinates,
reopened with the offset arithmetic that identifies it. A recurrence of this failure shape belongs
there rather than back here: the rename test can fail two independent ways and only one of them is
the test's. If it recurs, the remaining half is a product
question and the run will need the template traced to tell them apart.

The run is on f95c92a, rebased on e908d3e, so it already carried #136's 3f721a1 and
e908d3e. This is not that bug: #136 left occurrences unrenamed without ever splitting a line.

How it was tested

  • :ui-test:compileTestKotlin passes.
  • Not run locally: this machine cannot execute the downloaded JBR (exit value 127 under NixOS).
  • Seen twice in the batches so far (escape-03 on the earlier commit, escape-07 on this one),
    so roughly one run in ten; a single green run would not mean much.

Checklist

  • Nothing is special-cased for one extension.
  • A new feature has a UI test. A fix to an existing UI test.
  • No internal, override-only, obsolete or deprecated platform API. The backend document is
    read through EditorFactory and Document, as SplitModeSnippetsTest already does.
  • docs/ is updated where behaviour changed, docs/status.md especially. No behaviour change.
  • Third-party material keeps its notice and is listed in NOTICE.md. None added.

The test typed the new name and pressed Enter in one breath. On CI the
Enter split the line at the caret instead of finishing the rename --
`let renamed`, then `=1;` -- and the second occurrence kept the old
name, which is what the editor's own Enter does when no template is
there to take it.

Wait for the typed name on the backend, where the template runs,
before pressing Enter, as the snippet test waits before its Tab. That
was #130's lesson and this was the last place still sending a key
straight after typing.

Which of the two ways the template could have been absent -- not yet
holding the typed name, or already given up on -- the run cannot say:
it traces neither the key dispatcher nor the template. This removes the
one that is the test's to remove.

Refs #154
@BartvHelvert
BartvHelvert force-pushed the test/rename-enter-after-typing branch from 1685883 to b793cf1 Compare November 11, 2026 21:33
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.

Rename UI test's Enter can split the line instead of finishing the rename

1 participant