Skip to content

Commit 382c636

Browse files
Valentin Grünerclaude
andcommitted
refactor(server): name the area-detail package after what it holds
The package was called reviewhistory but held both halves of the area detail page: the review history AND the trend query service behind /practice-areas/{areaSlug}/trend. Its own controller already told the truth — PracticeAreaDetailController — so the package name was the odd one out, and a reader opening reviewhistory had no reason to expect a trend service there. Renamed to areadetail, with a package-info that records where the boundary runs: the trend QUERY lives here because it answers for a screen, while the trend MATHEMATICS stays in practices.observation.trend. Nothing outside the package references any of these types, so the move is closed under the compiler and no module boundary shifts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XBuU2tfPFntHoE34Cmw1Z
1 parent 26358ad commit 382c636

9 files changed

Lines changed: 28 additions & 12 deletions

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/PracticeAreaDetailController.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/PracticeAreaDetailController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail;
22

3+
import de.tum.cit.aet.hephaestus.practices.areadetail.dto.PracticeAreaReviewMomentDTO;
34
import de.tum.cit.aet.hephaestus.practices.observation.trend.dto.PracticeAreaTrendDTO;
4-
import de.tum.cit.aet.hephaestus.practices.reviewhistory.dto.PracticeAreaReviewMomentDTO;
55
import de.tum.cit.aet.hephaestus.workspace.context.WorkspaceContext;
66
import de.tum.cit.aet.hephaestus.workspace.context.WorkspaceScopedController;
77
import io.swagger.v3.oas.annotations.Operation;

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/PracticeAreaReviewHistoryFilterParams.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/PracticeAreaReviewHistoryFilterParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail;
22

33
import de.tum.cit.aet.hephaestus.integration.core.signal.ArtifactKind;
44
import de.tum.cit.aet.hephaestus.practices.model.Severity;

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/PracticeAreaReviewHistoryService.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/PracticeAreaReviewHistoryService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail;
22

33
import de.tum.cit.aet.hephaestus.integration.core.signal.ArtifactKind;
44
import de.tum.cit.aet.hephaestus.practices.PracticeAreaService;
5+
import de.tum.cit.aet.hephaestus.practices.areadetail.dto.PracticeAreaReviewArtifactDTO;
6+
import de.tum.cit.aet.hephaestus.practices.areadetail.dto.PracticeAreaReviewFindingDTO;
7+
import de.tum.cit.aet.hephaestus.practices.areadetail.dto.PracticeAreaReviewMomentDTO;
58
import de.tum.cit.aet.hephaestus.practices.feedback.FeedbackObservationRepository;
69
import de.tum.cit.aet.hephaestus.practices.feedback.FeedbackObservationRepository.DeliveredFeedbackBinding;
710
import de.tum.cit.aet.hephaestus.practices.feedback.FeedbackRatingState;
@@ -10,9 +13,6 @@
1013
import de.tum.cit.aet.hephaestus.practices.model.Severity;
1114
import de.tum.cit.aet.hephaestus.practices.observation.ObservationRepository;
1215
import de.tum.cit.aet.hephaestus.practices.observation.ObservationRepository.ReviewHistoryRunRow;
13-
import de.tum.cit.aet.hephaestus.practices.reviewhistory.dto.PracticeAreaReviewArtifactDTO;
14-
import de.tum.cit.aet.hephaestus.practices.reviewhistory.dto.PracticeAreaReviewFindingDTO;
15-
import de.tum.cit.aet.hephaestus.practices.reviewhistory.dto.PracticeAreaReviewMomentDTO;
1616
import de.tum.cit.aet.hephaestus.practices.spi.CurrentDeveloperLookup;
1717
import de.tum.cit.aet.hephaestus.practices.spi.ReviewRunTargetLookup;
1818
import de.tum.cit.aet.hephaestus.workspace.context.WorkspaceContext;

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/PracticeAreaTrendQueryService.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/PracticeAreaTrendQueryService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail;
22

33
import de.tum.cit.aet.hephaestus.practices.PracticeAreaService;
44
import de.tum.cit.aet.hephaestus.practices.model.Observation;

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/dto/PracticeAreaReviewArtifactDTO.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/dto/PracticeAreaReviewArtifactDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory.dto;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail.dto;
22

33
import de.tum.cit.aet.hephaestus.integration.core.signal.ArtifactKind;
44
import de.tum.cit.aet.hephaestus.integration.core.spi.IntegrationKind;

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/dto/PracticeAreaReviewFindingDTO.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/dto/PracticeAreaReviewFindingDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory.dto;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail.dto;
22

33
import de.tum.cit.aet.hephaestus.practices.feedback.FeedbackRatingState;
44
import de.tum.cit.aet.hephaestus.practices.model.Assessment;

server/src/main/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/dto/PracticeAreaReviewMomentDTO.java renamed to server/src/main/java/de/tum/cit/aet/hephaestus/practices/areadetail/dto/PracticeAreaReviewMomentDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory.dto;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail.dto;
22

33
import io.swagger.v3.oas.annotations.media.Schema;
44
import java.time.Instant;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Read models behind one practice area's detail page: the direction it is heading and the review moments
3+
* that produced its feedback. Both halves are served by a single controller under
4+
* {@code /practice-areas/{areaSlug}}, which is why they share a package rather than sitting with the
5+
* machinery they read from.
6+
*
7+
* <p>The trend QUERY service lives here; the trend MATHEMATICS does not. Posterior estimation, bundling and
8+
* classification stay in {@code practices.observation.trend} — this package only asks that module a
9+
* question on behalf of a screen, scoped to one area. Naming the package after the review history alone
10+
* hid that second half.
11+
*
12+
* <p>Deliberately not a named interface: nothing outside reads these types. Everything the rest of the
13+
* application needs about an area's standing comes through {@code practices.observation}, and keeping this
14+
* package closed is what lets a screen's shape change without a module boundary moving.
15+
*/
16+
package de.tum.cit.aet.hephaestus.practices.areadetail;

server/src/test/java/de/tum/cit/aet/hephaestus/practices/reviewhistory/PracticeAreaTrendControllerIntegrationTest.java renamed to server/src/test/java/de/tum/cit/aet/hephaestus/practices/areadetail/PracticeAreaTrendControllerIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.tum.cit.aet.hephaestus.practices.reviewhistory;
1+
package de.tum.cit.aet.hephaestus.practices.areadetail;
22

33
import de.tum.cit.aet.hephaestus.integration.scm.domain.user.User;
44
import de.tum.cit.aet.hephaestus.practices.PracticeAreaRepository;

0 commit comments

Comments
 (0)