Skip to content

Add jump link when logs originate from game channels#4606

Open
wholton wants to merge 1 commit intomasterfrom
codex/add-jump-link-to-game-channel-log
Open

Add jump link when logs originate from game channels#4606
wholton wants to merge 1 commit intomasterfrom
codex/add-jump-link-to-game-channel-log

Conversation

@wholton
Copy link
Copy Markdown
Collaborator

@wholton wholton commented Mar 29, 2026

Motivation

  • Improve log usefulness by including a direct jump link when an interaction originates from a game channel so maintainers/admins can quickly navigate to the source message.

Description

  • Enhanced LogOrigin to detect when an interaction originates from a valid game channel via GameNameService.getGameNameFromChannel(event) and GameManager.isValid(...) and append a Channel: <jump-url> line to the event string when present (src/main/java/ti4/message/logging/LogOrigin.java).
  • Added a helper method getGameChannelJumpLink(...) to encapsulate the detection and jump-link retrieval logic.
  • Extended LogOriginTest to mock a game-channel MessageChannelUnion and GameManager.isValid(...) and assert the new Channel: <jump-url> line appears in the generated log (src/test/java/ti4/message/logging/LogOriginTest.java).

Testing

  • Updated unit test ti4.message.logging.LogOriginTest verifies the jump link is included in the formatted log output and passes locally in the code changes (mocked behavior).
  • Attempted to run mvn -Dtest=LogOriginTest test in the environment, but the Maven run failed due to dependency resolution (403 Forbidden fetching org.springframework.boot:spring-boot-starter-parent:4.0.3) so the full test execution could not complete here.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant