Skip to content

refactor(server): standardize practice groups and feedback responses - #1539

Merged
FelixTJDietrich merged 14 commits into
feat/practice-area-serverfrom
review/practice-area-server
Aug 27, 2026
Merged

refactor(server): standardize practice groups and feedback responses#1539
FelixTJDietrich merged 14 commits into
feat/practice-area-serverfrom
review/practice-area-server

Conversation

@FelixTJDietrich

@FelixTJDietrich FelixTJDietrich commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Makes practice group the canonical product term for related practices and aligns the database, server, REST API, generated client, existing administration UI, tests, and documentation. It also tightens the standing, trend, review-run, and feedback-response contracts introduced by the parent API PR so the stack can merge with one coherent public model.

This is a required correction stacked on #1486. Merge this PR into feat/practice-area-server before merging #1486 into main; then restack the developer-profile UI in #1487 on the corrected contract.

What changes

  • Uses PracticeGroup, groupSlug, groupName, and /practice-groups consistently across persistence, Java, OpenAPI, the generated TypeScript client, and the existing catalog UI.
  • Replaces learner/reflection/finding/history API terminology with reviewed practice, standing, observation, and review run.
  • Models a feedback response as a singleton resource: PUT replaces it, GET reads it, and idempotent DELETE withdraws it. Omitted usefulness or resolution values are cleared by replacement.
  • Preserves append-only feedback-response history while avoiding redundant replacements and withdrawals.
  • Validates review-run pagination at the HTTP boundary, applies filters without truncating selected runs, and does not publish totals that post-query visibility filtering cannot calculate truthfully.
  • Derives practice standings, group standings, and trends from the same developer-scoped evidence snapshot.
  • Regenerates OpenAPI, the TypeScript client, and the ERD from their source models.
  • Removes name-based UI guesses for group appearance; persisted icon and color choices are authoritative, with a neutral fallback.

REST resources

GET    /workspaces/{workspaceSlug}/practices/standings
GET    /workspaces/{workspaceSlug}/practices/reviewed
GET    /workspaces/{workspaceSlug}/practice-groups/standings
GET    /workspaces/{workspaceSlug}/practice-groups/{groupSlug}/trend
GET    /workspaces/{workspaceSlug}/practice-groups/{groupSlug}/review-runs
GET    /workspaces/{workspaceSlug}/practices/feedback/resolution-counts
GET    /workspaces/{workspaceSlug}/practices/feedback/{feedbackId}/response
PUT    /workspaces/{workspaceSlug}/practices/feedback/{feedbackId}/response
DELETE /workspaces/{workspaceSlug}/practices/feedback/{feedbackId}/response

All developer-facing reads require authentication and return data only for the signed-in developer.

Compatibility and migration

The standing and review-run resources have not shipped, so this stack corrects their names without preserving aliases for abandoned contracts. Direct API callers using the retired practice-area, learner-projection, or reaction contracts must migrate as documented in MIGRATION.md; the bundled generated client is updated in the same release.

Liquibase automatically renames the affected tables, columns, indexes, constraints, and revision projections. Released changelogs remain untouched. Existing feedback-response history and append-only configuration-audit history are preserved; historical audit values are translated when read rather than rewritten. No manual data migration or new configuration is required.

How to test

CI runs every repository gate applicable to this stack. To reproduce the main local checks:

pnpm run format
pnpm run check
pnpm run db:generate-erd-docs

Focused server verification:

cd server
MANAGEMENT_PORT=0 SERVER_PORT=0 ./mvnw -q verify -P'!quick' \
  -Dopenapi.server.port=38231 \
  -Dopenapi.jmx.port=9161 \
  -Dtest=FeedbackResponseSuppressionFilterTest,FeedbackResponseServiceTest,PracticeGroupServiceTest,PracticeStandingServiceTest \
  -Dit.test=FeedbackResponseControllerIntegrationTest,PracticeGroupControllerIntegrationTest,PracticeGroupReviewRunIntegrationTest,PracticeGroupStandingIntegrationTest,PracticeGroupTrendControllerIntegrationTest

Manual API smoke test as an authenticated workspace member:

  1. Read practice standings, group standings, one group trend, and one page of group review runs.
  2. Replace a feedback response with both usefulness and resolution, then replace it with usefulness only; verify GET no longer returns a resolution.
  3. Delete the response twice; verify both requests succeed and GET reports no current response.
  4. Request a negative or oversized review-run page; verify the API returns 400.
  5. Create a group without an appearance; verify the catalog uses the neutral fallback, then select an icon and color and verify the saved values are used consistently.

Checklist

  • My changeset summary reads as an operator/user-facing note (it becomes the changelog entry) — see .changeset/README.md
  • If the operator must act on this change (new required env var, manual migration step), the changeset summary says how (**Operators:** …) and MIGRATION.md is updated

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de1cee72-1672-4864-875f-84a40a20d10d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added application-server Spring Boot server: APIs, business logic, database webapp React app: UI components, routes, state management size:XL This PR changes 500-999 lines, ignoring generated files. bug Something isn't working documentation Improvements or additions to documentation size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Preview

Preview has been removed (PR closed)

@FelixTJDietrich FelixTJDietrich changed the title fix(server): harden practice-area profile contracts fix(server): make practice-area profile contracts consistent Aug 27, 2026
@FelixTJDietrich FelixTJDietrich changed the title fix(server): make practice-area profile contracts consistent fix(server): make practice feedback API contracts consistent Aug 27, 2026
@FelixTJDietrich FelixTJDietrich changed the title fix(server): make practice feedback API contracts consistent fix(server): correct practice standing and feedback contracts Aug 27, 2026
@FelixTJDietrich FelixTJDietrich changed the title fix(server): correct practice standing and feedback contracts refactor: standardize practice-group contracts and implementation Aug 27, 2026
@github-actions github-actions Bot added the refactor Code restructuring without changing behavior label Aug 27, 2026
@FelixTJDietrich FelixTJDietrich changed the title refactor: standardize practice-group contracts and implementation refactor(server): standardize practice-group contracts Aug 27, 2026
@FelixTJDietrich
FelixTJDietrich force-pushed the feat/practice-area-server branch from 7135992 to b164e38 Compare August 27, 2026 16:31
@FelixTJDietrich
FelixTJDietrich force-pushed the review/practice-area-server branch from 668465b to 0ea7787 Compare August 27, 2026 16:32
@FelixTJDietrich FelixTJDietrich changed the title refactor(server): standardize practice-group contracts refactor(server): standardize practice groups and feedback responses Aug 27, 2026
@FelixTJDietrich
FelixTJDietrich merged commit c249080 into feat/practice-area-server Aug 27, 2026
37 checks passed
@FelixTJDietrich
FelixTJDietrich deleted the review/practice-area-server branch August 27, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application-server Spring Boot server: APIs, business logic, database bug Something isn't working documentation Improvements or additions to documentation refactor Code restructuring without changing behavior size:XXL This PR changes 1000+ lines, ignoring generated files. webapp React app: UI components, routes, state management

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant