Skip to content

fix(motd): match precise native alignment to the shared viewer - #113

Merged
lusu007 merged 1 commit into
mainfrom
fix/native-motd-alignment-precision
Oct 28, 2026
Merged

lusu007 merged 1 commit into
mainfrom
fix/native-motd-alignment-precision

Conversation

@lusu007

@lusu007 lusu007 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Problem

Proxy centering used regular-space-only padding and excluded the native bold-space advance from text measurement. Its output could differ from the shared editor/viewer and visibly misalign two centered lines.

Change

After resolving runtime values, choose the closest non-overflowing combination of regular 4-pixel and bold 5-pixel spaces. Use the same tie-breaking and fixtures as library-motd#142; keep existing modern/legacy widths. Prefix styles do not leak into the actual message. Cached templates and network-wide player/region context remain unchanged, with no I/O on the ping path.

Validation

All 200 Velocity tests pass, including production multi-proxy handler coverage. Added byte-identical shared alignment fixtures and an independent exhaustive check for remaining widths 0–280, covering short/right-aligned lines and explicit normal-text style after bold padding. Spotless passes with stale build/configuration caches disabled.

Closes #112. Related library change: groundsgg/library-motd#142.

@lusu007
lusu007 merged commit fc2203b into main Oct 28, 2026
3 checks passed
@lusu007
lusu007 deleted the fix/native-motd-alignment-precision branch October 28, 2026 21:38
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.

fix: match precise native MOTD alignment to the shared viewer

1 participant