-
Notifications
You must be signed in to change notification settings - Fork 0
fix(13-08): ship a default sidebar that renders without extra plugins #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+422
−2
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
20a78e9
test(13-08): pin the shipped sidebar defaults to what a fresh install…
wisdommen 3205b68
fix(13-08): ship a default sidebar that renders without extra plugins
wisdommen 03f4139
test(13-08): prove the legacy %world_name% line survives upgrade with…
wisdommen ed30860
fix(13-08): migrate the persisted %world_name% default line so upgrad…
wisdommen a378d4c
test(13-08): reject invalid server-time patterns in the renderability…
wisdommen 1694c8f
test(13-08): prove the legacy 12-hour server-time line also survives …
wisdommen e6792ed
fix(13-08): also migrate the persisted legacy 12-hour server-time line
wisdommen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On upgrades where
sidebar.ymlalready contains the old shipped&f%server_time_hh:mm:ss%entry,AbstractConfigEntity.init()preserves the persistedlineslist, while the new migration rewrites only the world-name entry. Consequently, thisHHcorrection reaches fresh installations only, and existing servers continue displaying an ambiguous 12-hour time without an AM/PM marker; include the byte-identical legacy time entry in the targeted migration as well.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Real finding, fixed in commits
1694c8f(RED test) ande6792ed(fix).Confirmed by reading
git log -pon this file: the pre-6.3-equivalent shipped default was thebyte-identical line
"&f%server_time_hh:mm:ss%", andAbstractConfigEntity.init()neveroverwrites an existing
linesvalue on disk -- exactly the same persistence gapmigrateLegacyWorldNameDefaultLine()was written for, just not extended to this second entry.
Two new RED tests proved the defect before the fix: a persisted list containing only the legacy
time line was not rewritten, and a real-upgrade scenario (both legacy lines + an operator's
custom line) left the time line stale while migrating the world-name line and preserving the
custom line correctly. Both failed against the unmodified method.
Fix: renamed
migrateLegacyWorldNameDefaultLine()tomigrateLegacyDefaultLines()andgeneralised it to an exact-match lookup table (
LEGACY_LINE_REPLACEMENTS) mapping every trackedlegacy default (the
%world_name%world line and thehh:mm:sstime line) to its correctedreplacement, so a future shipped-default correction only needs a map entry, not a new loop.
SideBarService.init()'s call site and comment updated to match. Operator-customised lines,including a line that only mentions a legacy token inside other text, are still left untouched --
covered by the pre-existing exact-match test.
mvn -B verify: Tests run: 124, Failures: 0, Errors: 0, Skipped: 0;BUILD SUCCESS; jacoco "Allcoverage checks have been met."