Skip to content

refactor(dto): type duration_minutes as int to match backend - #70

Merged
CowboyGH merged 1 commit into
developfrom
fix/duration-minutes-int
May 24, 2026
Merged

CowboyGH merged 1 commit into
developfrom
fix/duration-minutes-int

Conversation

@CowboyGH

Copy link
Copy Markdown
Owner

🚀 Summary

The backend now returns duration_minutes as an integer instead of a string, so this PR updates the mobile DTOs to match. Both TestingCatalogItemDto and WorkoutSummaryDto now type the field as int, and the related mappers simply pass the value through.

The defensive _parseDurationMinutes helpers in the workout overview and details mappers are no longer needed and have been removed, along with the now-obsolete "invalid duration" test case. Fixtures were updated to use integer literals.

Backend now returns duration_minutes as an integer, so the workout
and testing catalog DTOs no longer need to parse strings. Drops the
defensive _parseDurationMinutes helpers and the obsolete invalid-
duration test case.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@CowboyGH CowboyGH self-assigned this May 24, 2026
@CowboyGH CowboyGH added type: refactor Code improvements without changing behavior area: network API, requests, and data parsing labels May 24, 2026
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@CowboyGH, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 19 minutes and 11 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0d5a42ed-439c-4181-9fa5-55263e34972f

📥 Commits

Reviewing files that changed from the base of the PR and between 04a844c and 178c147.

📒 Files selected for processing (8)
  • lib/features/tests/catalog/data/dto/testing_catalog_item_dto.dart
  • lib/features/tests/catalog/data/mappers/testing_catalog_mapper.dart
  • lib/features/workouts/data/dto/workout_summary_dto.dart
  • lib/features/workouts/data/mappers/workout_details_mapper.dart
  • lib/features/workouts/data/mappers/workout_overview_mapper.dart
  • test/features/tests/catalog/data/mappers/testing_catalog_mapper_test.dart
  • test/features/tests/catalog/support/testings_dto_fixtures.dart
  • test/features/workouts/support/workouts_dto_fixtures.dart
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/duration-minutes-int

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 and usage tips.

@CowboyGH
CowboyGH merged commit 354c629 into develop May 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network API, requests, and data parsing type: refactor Code improvements without changing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant