Skip to content

Sync markdown guides and KDoc with the config overhaul's collateral changes - #5

Merged
KP2048 merged 2 commits into
1.21.xfrom
worktree-docs-sync-config
Aug 6, 2026
Merged

Sync markdown guides and KDoc with the config overhaul's collateral changes#5
KP2048 merged 2 commits into
1.21.xfrom
worktree-docs-sync-config

Conversation

@KP2048

@KP2048 KP2048 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

The config-system overhaul (71e2697) touched the GUI composable, networking, and serialization layers it depends on, but only config.md/index.md were updated at the time — gui.md, networking.md, and serialization.md were left describing stale APIs. This PR closes that gap.

  • config.md — fixes a stale claim that config screens still register through Mod Menu/Catalogue-specific glue; that bridge (ArchieModMenu/ArchieCatalogue/AConfigPlatform) was removed in an earlier commit. Screens now register via Architectury's Mod.registerConfigurationScreen; Catalogue no longer has a working integration path.
  • gui.md — fixes a TabContainer usage example that no longer compiles against the current signature, fixes a Text() example passing the wrong color type, and documents the new GuiGraphics.pose/scissor/invoke rendering helpers.
  • networking.md — documents the reified serverbound<T>/clientbound<T> overloads, registration-time validation rules, and cross-references config's use of a NetworkChannel for server-config sync.
  • serialization.md — scopes the page against config.md's separate IConfigSerializer layer to avoid overlap/confusion.

Also fixes/adds KDoc across ConfigSpec, IConfigSerializer, NetworkChannel, GuiGraphics, KColor, and BuiltinSerializers where it had gone stale or was missing entirely — including a ConfigSpec.init() doc comment that still described a registration flow and an [AConfigPlatform] link that no longer exist.

events.md, registries.md, resource-packs.md, and transfer.md were checked against current source and found already accurate; no changes needed there.

Test plan

  • ./gradlew :Archie:common:compileKotlin -q — clean, confirms KDoc edits are syntactically sound
  • All doc claims cross-checked against current source (class/method names, signatures, actual behavior)

🤖 Generated with Claude Code

KP2048 and others added 2 commits August 6, 2026 15:16
…hanges

The config-system overhaul (71e2697) touched the GUI composable, networking,
and serialization layers it depends on but only updated config.md/index.md,
leaving gui.md, networking.md, and serialization.md describing stale APIs.
This closes that gap:

- config.md: fixes a stale claim that config screens still register through
  Mod Menu/Catalogue-specific glue - that bridge (ArchieModMenu/ArchieCatalogue/
  AConfigPlatform) was removed; screens now register via Architectury's
  Mod.registerConfigurationScreen, and Catalogue has no working path anymore.
- gui.md: fixes a TabContainer usage example that no longer compiles against
  the current signature, fixes a Text() example passing the wrong color type,
  and documents the new GuiGraphics.pose/scissor/invoke rendering helpers.
- networking.md: documents the reified serverbound<T>/clientbound<T> overloads,
  registration-time validation rules, and cross-references config's use of a
  NetworkChannel for server-config sync.
- serialization.md: scopes the page against config.md's separate
  IConfigSerializer layer to avoid overlap/confusion.

Also fixes/adds KDoc across ConfigSpec, IConfigSerializer, NetworkChannel,
GuiGraphics, KColor, and BuiltinSerializers where it had gone stale or was
missing entirely - including a ConfigSpec.init() doc comment that still
described a registration flow and AConfigPlatform link that no longer exist.

events.md, registries.md, resource-packs.md, and transfer.md were checked
against current source and found already accurate; no changes needed there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two areas had no dedicated guide at all:

- datagen.md: the ADataGenerator DSL (client/common provider scopes),
  blockstate/model generation, languages, recipes + custom ingredients,
  tags, and the cross-loader condition system used to gate datapack entries.

- gametest.md: both GameTest layers - vanilla server-side GameTestHelper
  tests registered through AGameTestEventObject, and the from-scratch client
  GameTest DSL (ClientGameTestContext, node lookup, TestNodeScope
  click/hover/type, UINode.renderState assertions, lightweight probe screens
  vs. world-backed tests, screenshot-comparison infra and why render-state
  assertion is preferred over it in practice).

Both are wired into Archie/mkdocs.yml's nav and index.md's feature table
(GameTest didn't have a row there either; Data Gen already did).

Replaced gui.md's "Automated GUI Testing" section - which showed a
@ClientGameTest example that didn't match reality, since
GuiClientHarnessTests.kt is actually a plain JUnit test file with no client
GameTest involved at all - with a pointer to gametest.md's real coverage of
the same ground.

Also adds missing KDoc to several previously-undocumented central types in
AClientGameTestHarness.kt (TestInput, TestWorldBuilder, TestSingleplayerContext,
TestDedicatedServerContext, TestServerConnection, TestClientWorldContext,
TestServerContext, AClientGameTestSummary, AClientGameTestHarness).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@KP2048
KP2048 marked this pull request as ready for review August 6, 2026 19:40
Copilot AI lite review requested due to automatic review settings August 6, 2026 19:40
@KP2048
KP2048 merged commit 73e7e1a into 1.21.x Aug 6, 2026

Copilot AI left a comment

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.

Pull request overview

Updates Archie’s documentation set and KDoc to match collateral API changes that landed during the config-system overhaul, removing stale references and aligning examples with current signatures/usage across GUI, networking, and serialization. It also expands the docs nav and introduces dedicated guides for GameTest and datagen.

Changes:

  • Refreshes markdown guides (config.md, gui.md, networking.md, serialization.md) to reflect the current post-overhaul APIs and behaviors.
  • Adds new documentation pages for GameTest and Data Generation, and wires them into mkdocs.yml navigation.
  • Updates/extends KDoc for several affected APIs (config serializer layer, networking channel helpers, GUI rendering helpers, GameTest harness types).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Archie/mkdocs.yml Adds gametest.md and datagen.md to the MkDocs nav.
Archie/docs/serialization.md Clarifies scope vs. config persistence (IConfigSerializer) to reduce overlap/confusion.
Archie/docs/networking.md Updates handler registration examples to reified overloads; documents validation behavior and config sync usage.
Archie/docs/index.md Adds GameTest feature row to the project overview table.
Archie/docs/gui.md Fixes stale examples (TabContainer/Text color) and documents GuiGraphics rendering helpers; points to the new GameTest guide.
Archie/docs/gametest.md New comprehensive guide for server GameTests and the client GameTest DSL/harness.
Archie/docs/datagen.md New guide describing datagen runs, event wiring, provider DSL, and conditions/tags/recipes patterns.
Archie/docs/config.md Updates config screen registration flow to Architectury’s Mod.registerConfigurationScreen; removes Mod Menu/Catalogue glue references.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/serialization/serializers/BuiltinSerializers.kt KDoc clarification about side-conditional registration.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/networking/NetworkChannel.kt Adds reified serverbound<T>/clientbound<T> KDoc; documents internal config sync wiring helpers.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/gui/util/KColor.kt Adds KDoc for toTextColor() clarifying alpha limitations.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/gui/util/extension/GuiGraphics.kt Adds KDoc for pose, scissor, and invoke rendering helpers.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/gui/composables/basic/Text.kt Fixes KDoc example to pass KColor (not argb).
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/gametest/AClientGameTestHarness.kt Adds missing/stale KDoc across client GameTest harness interfaces/types.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/config/IConfigSerializer.kt Clarifies KDoc around configFolder resolution and server serverconfig/ behavior.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/config/ConfigSpec.kt Updates stale init() KDoc to match current registration/loading responsibilities.
Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/Archie.kt Updates initClient() KDoc to match the new config screen registration entrypoint.
Suppressed comments (1)

Archie/common/src/main/kotlin/net/kernelpanicsoft/archie/gui/util/extension/GuiGraphics.kt:139

  • GuiGraphics.scissor/its IntRect overload don't disable scissoring if the block throws. That can leave scissor state enabled and clip unrelated rendering. Wrapping disableScissor() in a finally matches the helper's intended semantics (and the docs in gui.md).
fun <T> GuiGraphics.scissor(minX: Int, minY: Int, maxX: Int, maxY: Int, block: () -> T): T
{
    enableScissor(minX, minY, maxX, maxY)
    val ret = block()
    disableScissor()
    return ret

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 120 to 126
@@ -120,6 +126,11 @@ fun <T> GuiGraphics.pose(block: PoseStack.() -> T): T
return ret
Comment on lines +175 to +187
/**
* Registers [spec] as a server-bound "save my changes" packet: when the server receives one,
* it is decoded with [spec]'s own [kotlinx.serialization.KSerializer] (via
* [net.kernelpanicsoft.archie.config.ConfigSpec.serializer]) rather than the reflective one
* used for ordinary packet classes, since a `ConfigSpec` singleton isn't itself
* `@Serializable`. The permission check, persistence, and broadcast/rejection of the
* resulting value happen in `decodeDispatchData`, not in the handler registered here (which
* just calls [net.kernelpanicsoft.archie.config.ConfigSpec.save] again for symmetry with
* [configClientbound]). No-op if [spec] is already registered.
*
* Internal: used by [net.kernelpanicsoft.archie.config.ConfigSpec.init] to wire up
* server/client config sync. Not part of the public packet API.
*/
Comment on lines 44 to 48
* Text(
* text = Component.literal("Hello, Archie!"),
* fontScale = 1.5f,
* color = KColor.YELLOW.argb,
* color = KColor.YELLOW,
* )
@KP2048

KP2048 commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

KP2048 added a commit that referenced this pull request Aug 6, 2026
…ng-fixes

fix: address unresolved Copilot review feedback from PRs #3, #5, #6
@KP2048
KP2048 deleted the worktree-docs-sync-config branch August 6, 2026 21:42
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