Skip to content

docs(16-03): document onReload()/onUnregister() lifecycle hooks - #85

Open
wisdommen wants to merge 1 commit into
alphafrom
docs/phase-16-lifecycle
Open

docs(16-03): document onReload()/onUnregister() lifecycle hooks#85
wisdommen wants to merge 1 commit into
alphafrom
docs/phase-16-lifecycle

Conversation

@wisdommen

Copy link
Copy Markdown
Member

What changed

Documents the two new UltiToolsPlugin lifecycle hooks landing in UltiTools-API 6.3.0:
onReload() and onUnregister(), which replace direct overrides of reloadSelf()/
unregisterSelf() (now final). Covers hook timing relative to the framework's own steps, the
rename-versus-delete migration guidance for existing module overrides, and the new per-module
reload log line the framework emits on /ul reload.

Both languages updated in the same commit (docs/src/guide/quick-start.md and
docs/src/zh/guide/quick-start.md), same structure, same heading count. Marked Since v6.3.0 per
this repository's alpha convention for unreleased behaviour. No new <<< @/../examples/...
reference, no change to versionsConfig.current or examples/pom.xml.

Why this targets alpha, not master

This documents behaviour that has not been released yet. Per this repository's Doc-Sync Workflow,
framework changes are documented in alpha the same session they land, not at release time. This
PR is opened with --base alpha explicitly, since the repository's default base is master
(the released branch).

Companion pull request

UltiKits/UltiTools-Reborn#457 (base alpha) — the framework change this documents.

Checks

  • npm run build succeeds locally (site build, dead-link checking).
  • scripts/check-container-length.sh reports no violations on the two changed files.
  • Bilingual pages remain structurally aligned (same heading count, same section).

🤖 Generated with Claude Code

https://claude.ai/code/session_018BUB3sHMAHm8bYVbLbTTKK

Since v6.3.0, UltiToolsPlugin.reloadSelf() and unregisterSelf() are final
template methods; module authors override the new onReload()/onUnregister()
hooks instead. Documents hook timing relative to the framework's own steps,
the rename-versus-delete guidance for existing overrides, and the new
per-module reload log line the framework now emits on /ul reload.

Mirrors UltiTools-Reborn's COMPATIBILITY.md migration guide (issues #419,
#455) on the unreleased alpha branch, same session as the framework change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018BUB3sHMAHm8bYVbLbTTKK
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-09-13T08:57:31.494651Z a607e39 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

::: tip Since v6.3.0
`reloadSelf()` and `unregisterSelf()` are `final`. Override `onReload()` and `onUnregister()`
instead.

P1 Badge Update the shared examples to stop overriding final methods

For readers targeting v6.3.0, the snippets embedded immediately below this notice still override unregisterSelf() and reloadSelf() (examples/src/main/java/com/ultikits/docs/quickstart/MyPlugin.java:32-46 and UltiToolsConnector.java:39-53), so the documented quick-start code cannot compile against the API version being described. Remove these no-op obsolete overrides from the shared examples; doing so remains compatible with the current v6.2.5 example dependency.

AGENTS.md reference: AGENTS.md:L85-L85


On `/ul reload`, the framework logs one line naming the module before calling `onReload()`. A module whose existing override only logged its own reload no longer needs that log line and can delete the override. A module with real reload or unload work renames its existing `reloadSelf()`/`unregisterSelf()` override to `onReload()`/`onUnregister()`, with the method body unchanged.

P1 Badge Remove wrapper calls when renaming lifecycle overrides

When an existing override calls super.reloadSelf()—as the repository's command and listener connector examples currently do—renaming the method to onReload() with its body unchanged makes the hook call the final reloadSelf() wrapper, which eventually invokes onReload() again and recurses until StackOverflowError on /ul reload. The migration guidance must tell readers to remove calls to the old wrapper methods when renaming overrides, including the analogous super.unregisterSelf() case.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ultitools-dev-doc with  Cloudflare Pages  Cloudflare Pages

Latest commit: a607e39
Status: ✅  Deploy successful!
Preview URL: https://d1899942.ultitools-dev-doc.pages.dev
Branch Preview URL: https://docs-phase-16-lifecycle.ultitools-dev-doc.pages.dev

View logs

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