Skip to content

#209 Collapse SignTransitionResolver's triplicated join/leave logic - #215

Merged
tpwalke2 merged 4 commits into
mainfrom
feature/tpwalke2/209-signtransitionresolver
Sep 12, 2026
Merged

tpwalke2 merged 4 commits into
mainfrom
feature/tpwalke2/209-signtransitionresolver

Conversation

@tpwalke2

Copy link
Copy Markdown
Owner

What

Collapses SignTransitionResolver's triplicated line/shape/extrude join and leave logic into one parameterized implementation each.

Why

lineJoinAction/lineLeaveAction, shapeJoinAction/shapeLeaveAction, and extrudeJoinAction/extrudeLeaveAction were near-identical, differing only in group resolver, member threshold, and whether fill color applies. Tickets 01-03 already consolidated the action classes and factory methods these dispatch to, making the triplication removable without behavior change (.scratch/marker-action-consolidation/issues/05-collapse-signtransitionresolver-join-leave.md).

Changes

  • Added a GroupResolver functional interface matching LineGroupResolver/ShapeGroupResolver/ExtrudeGroupResolver's shared members(...) signature
  • Replaced the six join/leave methods with multiPointJoinAction/multiPointLeaveAction, parameterized by resolver, minimum-member threshold, and MarkerGroupType kind
  • Added hasFill(MarkerGroupType) to gate fill-color resolution (LINE has none; SHAPE/EXTRUDE do)
  • Updated leaveEffect/joinEffect's switch arms to call the new parameterized methods with method references (LineGroupResolver::members, etc.)
  • No behavior change: join/leave thresholds (2 for line, 3 for shape/extrude) and fill-color handling are preserved exactly

Testing

  • ./gradlew test --tests "*.SignTransitionResolverTest" — existing coverage of line/shape/extrude join/leave transitions passes unmodified
  • ./gradlew build passes

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.

🟢 Approval recommended

Only non-blocking documentation and comment nits remain.

Pull request overview

This PR consolidates triplicated line, shape, and extrude join/leave handling into shared parameterized implementations without behavior changes.

Changes:

  • Adds a shared GroupResolver abstraction.
  • Preserves existing thresholds and fill-color behavior.
  • Updates related architecture, testing, and verification documentation.

Review notes:

  • Nit (1 vote): Update core-pipeline.md to describe the shared parameterized resolver consistently.
  • Nit (2 votes): Fix malformed emphasis markup in SignTransitionResolver.java.
File summaries
File Description
src/main/java/com/tpwalke2/bluemapsignmarkers/core/signs/SignTransitionResolver.java Shared multi-point join/leave implementation
agent-context/README.md Updated verification metadata
agent-context/context/testing.md Updated testing documentation
agent-context/context/core-pipeline.md Updated transition-pipeline documentation
Review details

Suppressed comments (1)

agent-context/context/core-pipeline.md:193

  • The new paragraph describes the consolidation, but the table introduction above still says these types duplicate the pattern “rather than generalizing it.” That now contradicts the documented implementation and can mislead readers; update the introduction to describe the shared parameterized resolver instead.
are the single generic implementation behind all three `LINE`/`SHAPE`/`EXTRUDE` cells above — collapsed from three
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tpwalke2
tpwalke2 merged commit 3cba636 into main Sep 12, 2026
1 check passed
@tpwalke2
tpwalke2 deleted the feature/tpwalke2/209-signtransitionresolver branch September 12, 2026 10:57
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