Skip to content

Optimize retained line rendering and renderer state handling#58

Merged
TWME-TW merged 10 commits into
masterfrom
line-optimization
Jul 13, 2026
Merged

Optimize retained line rendering and renderer state handling#58
TWME-TW merged 10 commits into
masterfrom
line-optimization

Conversation

@TWME-TW

@TWME-TW TWME-TW commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Reduce display entity churn by retaining line shapes across renders, expose rendering and rebase statistics in debug output, and improve renderer decisions, permissions, persistence, error handling, and test coverage.

@twme-ai twme-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

我以最新 head 重新審查並驗證:GitHub CI 與 mvn clean verify 都顯示成功,但正常建置實際執行 0 個測試;指定新版 Surefire 後,新增的 26 個 JUnit 5 測試才有執行且全部通過。另外,新的 view 子權限分流在外層 gate 漏掉 hide 權限。詳見逐行留言。

Comment thread pom.xml
<artifactId>junit-jupiter</artifactId>
<version>5.11.4</version>
<scope>test</scope>
</dependency>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] 請設定支援 JUnit 5 的 Maven Surefire 版本。目前只加入 junit-jupiter 依賴,但 Maven 實際使用預設的 Surefire 2.17;我執行 mvn clean verify 得到 Tests run: 0,所以目前綠色 CI 沒有跑這次新增的任何測試。改用 maven-surefire-plugin:3.5.4:test 後才真正執行 26 個測試(全部通過)。建議在 <build><plugins> 明確加入近期的 Surefire 3.x,讓 PR CI 真正涵蓋這批測試。

case "share" -> sender.hasPermission("worldeditdisplay.use.share");
case "view" -> sender.hasPermission("worldeditdisplay.use.view")
|| sender.hasPermission("worldeditdisplay.use.view.list")
|| sender.hasPermission("worldeditdisplay.use.view.label");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] 這個外層 view gate 也需要包含 worldeditdisplay.use.view.hide。目前 ViewCommand 已允許只有該權限的玩家使用 hide / hideall / unhideplugin.yml 也把它定義成獨立權限,但請求會先在這裡被拒絕,因此只授予 hide 權限的角色實際無法使用這三個命令。也建議補一個只有 use.view.hidecanUseSubCommand(sender, "view") 為 true 的測試。

@twme-ai

twme-ai commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

I opened #59 as a reviewed replacement for this PR. It contains all commits from #58 through 6dde5d0, fixes the two requested review findings, and adds the shared-render lifecycle fixes found during the deeper integration review. The combined summary and Paper/Spigot validation results are included in #59.

@TWME-TW TWME-TW merged commit 6dde5d0 into master Jul 13, 2026
3 checks passed
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.

2 participants