Skip to content

Syncing with main branch#8872

Merged
cj-radcliff merged 3 commits into
fix/flutter-test-template-additional-argsfrom
main
Mar 27, 2026
Merged

Syncing with main branch#8872
cj-radcliff merged 3 commits into
fix/flutter-test-template-additional-argsfrom
main

Conversation

@cj-radcliff
Copy link
Copy Markdown
Collaborator

Thanks for your contribution! Please replace this text with:

  • a description of what this PR is changing and why
  • any relevant issues
  • a description of how to verify the change is working
  • screenshots/gif if relevant

Review the contribution guidelines below:

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
  • I've included the required information in the description above.
  • My up-to-date information is in the AUTHORS file.
  • I've updated CHANGELOG.md if appropriate.
Contribution guidelines:
  • See
    our contributor guide and
    the Flutter organization contributor guide
    for general expectations for PRs.
  • Larger or significant changes should be discussed in an issue before creating a PR.
  • Dart contributions to our repos should follow the Dart style guide and use
    dart format.
  • Java and Kotlin contributions should strive to follow Java and Kotlin best
    practices (discussion).

chika3742 and others added 3 commits March 23, 2026 08:34
…ons (#8838)

`StringUtil.escapeProperty()` was incorrectly applied to test names in
[`CommonTestConfigUtils.findTestName()`](https://github.com/flutter/flutter-intellij/blob/24d11f2a5b5165dc284df06e982a2b56892b632f/src/io/flutter/run/common/CommonTestConfigUtils.java#L139),
converting non-ASCII characters (e.g. Japanese "テスト") to Unicode escape
sequences. This caused `flutter test --plain-name` to receive an escaped
string that did not match the actual test name, preventing the test from
running.

Fix by removing the `escapeProperty()` call, which is intended for
`.properties` file encoding and is unnecessary here.

fixes #7985

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best practices
([discussion](#8098)).
</details>

---------

Co-authored-by: Helin Shiah <helinx@google.com>
This is to fix an internal freeze report that `close` can take a long time to finish.

```
com.teamdev.jxbrowser.browser.internal.BrowserImpl.close(BrowserImpl.java:779)
com.teamdev.jxbrowser.internal.rpc.UniversalServiceConnection.invoke(UniversalServiceConnection.java:183)
com.teamdev.jxbrowser.internal.rpc.transport.CommonThreadCallExecutor.execute(CommonThreadCallExecutor.java:29)
==> com.teamdev.jxbrowser.internal.rpc.transport.CommonThreadResponseConsumer.await(CommonThreadResponseConsumer.java:49) <==
java.util.concurrent.CountDownLatch.await(Unknown Source)
```

I don't really have a good way to test (e.g. making this part slow), other than to make sure that opening and closing the tool windows remains okay.
Removes the call to `plugin..dart deploy` in favor of a bash
implementation inline.

Fixes: #8866 .


---

Review the contribution guidelines below:

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.
- [x] I've included the required information in the description above.
- [x] My up-to-date information is in the `AUTHORS` file.
- [x] I've updated `CHANGELOG.md` if appropriate.

<details>
  <summary>Contribution guidelines:</summary><br>

- See
  our [contributor guide](../CONTRIBUTING.md) and
the [Flutter organization contributor
guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
  for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Dart contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use
  `dart format`.
- Java and Kotlin contributions should strive to follow Java and Kotlin
best
practices
([discussion](#8098)).

</details>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@cj-radcliff cj-radcliff merged commit f30155f into fix/flutter-test-template-additional-args Mar 27, 2026
19 checks passed
cj-radcliff referenced this pull request in cj-radcliff/flutter-intellij-cjrad Mar 27, 2026
…al-args

Syncing with main branch (#8872)
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a UI freeze during JX Browser closure by moving the close operation to a pooled thread and implementing the Disposable interface. It also fixes a bug preventing gutter buttons from running tests with non-ASCII characters by removing property escaping in CommonTestConfigUtils. Furthermore, the deployment process was updated to use a manual curl command for plugin uploads. Review feedback suggests extracting duplicated logging logic into a shared utility and using xargs for safer token reading in the deployment script.

Comment on lines +74 to 79
catch (Exception ex) {
if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) {
LOG.info(ex);
} else {
LOG.info("Exception when closing JX Browser engine: " + ex.getMessage());
}
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.

medium

This catch block logic is also present in EmbeddedJxBrowser.close(). According to the repository style guide (Rule #70, DRY), duplicated code should be avoided. Please consider extracting this conditional logging logic into a shared utility method to improve maintainability and reduce duplication.

Comment thread tool/kokoro/deploy.sh
echo "Error: Keystore token file not found at $KOKORO_TOKEN_FILE"
exit 1
fi
TOKEN=$(cat "$KOKORO_TOKEN_FILE")
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.

medium

The TOKEN=$(cat ...) command substitution can be fragile. If the token file contains leading/trailing whitespace or newlines, they will be included in the TOKEN variable, which can lead to authentication failures. Using xargs is a more robust way to read the content of a file into a variable as it handles whitespace trimming automatically.

Suggested change
TOKEN=$(cat "$KOKORO_TOKEN_FILE")
TOKEN=$(xargs < "$KOKORO_TOKEN_FILE")

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.

4 participants