Skip to content

Open new scripts after creating them in the terminal - #97

Merged
rubensworks merged 3 commits into
master-1.21-ltsfrom
fix/open-new-script
Oct 19, 2026
Merged

rubensworks merged 3 commits into
master-1.21-ltsfrom
fix/open-new-script

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Before, the + button created scriptN.js but kept the previous script open, so you had to click the new one before typing.

Now, when the client receives a script, TerminalScriptingModifiedScriptPacket first checks whether that path already existed, and passes a created flag to the terminal's remote change listener. After clicking +, the terminal opens and focuses the first script created on that disk, so you can start typing right away. Changes to existing scripts in the meantime are ignored, for example external edits or console.log output.

Validation:

  • In-game: + opens script1.js and typed text goes straight into it. A second + while another script was edited externally opened the new script2.js.
  • build and runGameTestServer (23/23) pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9

@coveralls

coveralls commented Oct 18, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 39298394831

Warning

No base build found for commit 4ded9d4 on master-1.21-lts.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 42.353%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 3708
Covered Lines: 1714
Line Coverage: 46.22%
Relevant Branches: 1595
Covered Branches: 532
Branch Coverage: 33.35%
Branches in Coverage %: Yes
Coverage Strength: 23.09 hits per line

💛 - Coveralls

Creating a script with the + button left the previous script open, so the
new one had to be selected manually. It is now opened and focused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…ew-script

# Conflicts:
#	src/main/java/org/cyclops/integratedscripting/inventory/container/ContainerTerminalScripting.java

Copy link
Copy Markdown
Member Author

The red check isn't from this PR's code. In "Build for Java 23 on temurin", the build, unit tests and all 24 game tests pass. The job then fails in the Coveralls coverage-reporter install step: the downloaded coveralls-linux.tar.gz doesn't match the checksum published next to it (expected cd042b63…, got c05e9739…). That's an external download problem, and this PR doesn't touch CI. I've re-run the failed job once.


Generated by Claude Code

…ew-script

# Conflicts:
#	src/main/java/org/cyclops/integratedscripting/client/gui/container/ContainerScreenTerminalScripting.java
@rubensworks
rubensworks merged commit aef7972 into master-1.21-lts Oct 19, 2026
21 checks passed
@rubensworks
rubensworks deleted the fix/open-new-script branch October 19, 2026 18:03
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.

3 participants