feat(dive-centers): remember what worked with an operator's rental gear - #2087
Conversation
|
📦 Build artifacts for this PR · commit
Artifacts expire in 7 days. Downloading requires being signed in to GitHub. macOS needs two extractions: unzip the downloaded artifact, then unzip the Updated automatically on each push. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🔵 Needs a closer look
One or more issues must be addressed before approval.
Pull request overview
Adds rental-gear memory for dive centers, including synced notes, last-dive recall, unit-aware editing, and localization.
Changes:
- Adds schema v221 storage and parent-gated sync support.
- Adds rental note CRUD, shared editing sheet, and detail-page section.
- Surfaces previous dive weights/tanks with optional application to the current dive.
File summaries
| File | Description |
|---|---|
| test/l10n/rental_gear_memory_strings_test.dart | Updated as part of this pull request. |
| test/features/dive_log/presentation/widgets/edit_sections/trip_section_test.dart | Updated as part of this pull request. |
| test/features/dive_log/presentation/pages/dive_edit_rental_memory_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/presentation/widgets/rental_memory_card_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/presentation/widgets/rental_gear_section_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/presentation/widgets/rental_gear_note_sheet_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/domain/services/rental_memory_resolver_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/domain/entities/dive_center_gear_note_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/data/repositories/dive_center_repository_latest_dive_test.dart | Updated as part of this pull request. |
| test/features/dive_centers/data/repositories/dive_center_gear_note_repository_test.dart | Updated as part of this pull request. |
| test/core/services/sync/sync_parent_refs_completeness_test.dart | Updated as part of this pull request. |
| test/core/services/sync/dive_center_gear_notes_sync_test.dart | Updated as part of this pull request. |
| test/core/database/migration_v221_dive_center_gear_notes_test.dart | Updated as part of this pull request. |
| test/core/database/migration_v219_equipment_tags_test.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_zh.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_pt.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_nl.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_zh.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_pt.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_nl.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_it.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_hu.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_he.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_fr.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_es.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_en.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_de.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_localizations_ar.dart | Updated as part of this pull request. |
| lib/l10n/arb/app_it.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_hu.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_he.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_fr.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_es.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_en.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_de.arb | Updated as part of this pull request. |
| lib/l10n/arb/app_ar.arb | Updated as part of this pull request. |
| lib/features/dive_log/presentation/widgets/edit_sections/trip_section.dart | Updated as part of this pull request. |
| lib/features/dive_log/presentation/pages/dive_edit_page.dart | Updated as part of this pull request. |
| lib/features/dive_centers/presentation/widgets/rental_memory_card.dart | Updated as part of this pull request. |
| lib/features/dive_centers/presentation/widgets/rental_gear_section.dart | Updated as part of this pull request. |
| lib/features/dive_centers/presentation/widgets/rental_gear_note_sheet.dart | Updated as part of this pull request. |
| lib/features/dive_centers/presentation/providers/dive_center_gear_note_providers.dart | Updated as part of this pull request. |
| lib/features/dive_centers/presentation/pages/dive_center_detail_page.dart | Updated as part of this pull request. |
| lib/features/dive_centers/domain/services/rental_memory_resolver.dart | Updated as part of this pull request. |
| lib/features/dive_centers/domain/entities/dive_center_gear_note.dart | Updated as part of this pull request. |
| lib/features/dive_centers/data/repositories/dive_center_repository.dart | Updated as part of this pull request. |
| lib/features/dive_centers/data/repositories/dive_center_gear_note_repository.dart | Updated as part of this pull request. |
| lib/core/services/sync/sync_service.dart | Updated as part of this pull request. |
| lib/core/services/sync/sync_data_serializer.dart | Updated as part of this pull request. |
| lib/core/database/database.dart | Updated as part of this pull request. |
| lib/core/data/repositories/sync_repository.dart | Updated as part of this pull request. |
| docs/superpowers/specs/2026-09-18-rental-gear-memory-design.md | Updated as part of this pull request. |
Review details
Suppressed comments (1)
lib/features/dive_log/presentation/pages/dive_edit_page.dart:4538
- This condition does not treat a zero-valued weight row as existing form data, so applying the last dive can silently replace an already-present weight row without showing the required confirmation. The requirement is to confirm when any weights or tanks are present; check the collection itself rather than only positive amounts.
if (_weights.any((w) => w.amountKg > 0) || _tanks.isNotEmpty) {
- Files reviewed: 53/54 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ar-memory-2db80e # Conflicts: # lib/core/database/database.dart # test/core/database/migration_v219_equipment_tags_test.dart
Closes #2075
Remember what worked with a dive center's rental gear, and surface it on a return visit.
dive_center_gear_notes(schema v221), holds typed notes: gear type, the operator's label, size, a worked/avoid verdict, an optional lead adjustment, an optional true tank capacity, free text, and the dive it was noticed on.Schema rung 221 sits directly above v220, which #1980 shipped while this was in review. #2040, #1978 and #1860 still claim 220 and will need to renumber above 221 if this merges first.
Full suite: one unrelated failure,
service_clock_baseline_test("deleting the service that took over hands the clock back to the baseline"), which fails when its file runs and passes alone; this branch touches no equipment or service code and main was green on the same base. It is a same-millisecond race between the record's creation stamp and the baseline's set time, filed as #2088.Design:
docs/superpowers/specs/2026-09-18-rental-gear-memory-design.md. Plan:docs/superpowers/plans/2026-09-18-rental-gear-memory.md.