mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2381] [MERGED] Keep AM/PM suffix on spaced 12-hour world times #5570
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5570
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2381
Author: @Romuromylus
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/world-tile-meridiem-order📝 Commits (1)
8fac427Keep AM/PM suffix on spaced 12-hour world times📊 Changes
2 files changed (+80 additions, -13 deletions)
View changed files
➕
src/features/runtime/world-state/lib/world-state-display.test.ts(+65 -0)📝
src/features/runtime/world-state/lib/world-state-display.ts(+15 -13)📄 Description
Linked issue
Closes #2372
Why this change
getWorldTimeDisplaytried the 24-hour regex before the meridiem regex, so a spaced 12-hour time like6:00 PMmatched the 24-hour pattern on6:00(the trailing space acts as a word boundary) and returned an empty suffix, dropping the AM/PM badge on the roleplay World tile. This worked onmain, where meridiem is tried first — a regression.What changed
main's ordering. The refactor-only[:.h]separator andkeywordHourfallback are preserved.Refactor impact
Primary owner: runtime / world-state (
src/features/runtime/world-state/lib/world-state-display.ts)Impact areas reviewed:
string -> objecthelper used by both the roleplay HUD World widget and the tracker World tile; reordering two disjoint regex branches.Boundary notes:
Pressure points touched:
Validation
pnpm checkpasses before PR push/handoffManual verification notes
pnpm vitest run src/features/runtime/world-state/lib/world-state-display.test.ts— 9 passed (spaced PM/AM keep suffix, dottedp.m., 12AM->0 / 12PM->12, no-space6pm, 24h18:00,6h30separator, keywordmorning, empty/null).pnpm exec tsc -b— clean.Feature Discoverability
Reason:
Docs and release impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.