Dive planner Phase 3: Live Profile Canvas UI and cutover#486
Merged
Conversation
addSimplePlan now produces bottom-only segments so the PlanEngine computes the ascent and real deco stops (the legacy full-profile simple plan showed a safety stop but no deco). planCanvasSeriesProvider builds the profile, ceiling approximation, gas-switch markers, and stop labels; planOutcomeProvider runs the engine live off editing state.
New PlanCanvasPage (phone: chart + chips + editor list with a draggable results sheet; wide: editor column + chart + always-visible results pane) replaces the 3-tab DivePlannerPage. Deletes the old page and its deco/gas/profile panels and the plannerTabIndexProvider; reuses the settings/tank/segment editing widgets. Router now points /planning/dive-planner and :planId at the canvas.
Translated the 17 new plannerCanvas_* keys into ar, de, es, fr, he, hu, it, nl, pt, zh. gen-l10n reports zero untranslated messages.
Contributor
There was a problem hiding this comment.
Pull request overview
Implements Phase 3 of the dive planner redesign by cutting over the planner route to a new “Live Profile Canvas” UI: a chart-centric, live-recalculating planner with status chips, a results sheet/pane, and a saved-plans picker, all driven by the Phase 2 PlanEngine.
Changes:
- Added a new planner presentation layer (
planOutcomeProvider/canvas series providers + canvas chart, status chips, results sheet, saved plans sheet, and the newPlanCanvasPage). - Cut over routing from the legacy 3-tab
DivePlannerPagetoPlanCanvasPageand removed the legacy results/chart panels. - Updated “quick plan” generation to author only bottom segments (descent + bottom) so ascent/deco are computed by
PlanEngine, plus added l10n keys and widget tests for the new UI.
Reviewed changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/features/planner/saved_plans_sheet_test.dart | Widget coverage for saved plans list/empty/delete confirmation flow. |
| test/features/planner/plan_results_widgets_test.dart | Widget coverage for status chips + results sheet rendering. |
| test/features/planner/plan_canvas_providers_test.dart | Unit coverage for canvas providers/series generation and defaults. |
| test/features/planner/plan_canvas_page_test.dart | Widget coverage for responsive page layout + save action behavior. |
| test/features/planner/plan_canvas_chart_test.dart | Unit/widget coverage for segment time mapping + chart empty/non-empty states. |
| lib/l10n/arb/app_zh.arb | Adds planner canvas l10n strings (zh). |
| lib/l10n/arb/app_pt.arb | Adds planner canvas l10n strings (pt). |
| lib/l10n/arb/app_nl.arb | Adds planner canvas l10n strings (nl). |
| lib/l10n/arb/app_localizations.dart | Generated localization API updates for new planner canvas keys. |
| lib/l10n/arb/app_localizations_zh.dart | Generated zh localization implementation for new keys. |
| lib/l10n/arb/app_localizations_pt.dart | Generated pt localization implementation for new keys. |
| lib/l10n/arb/app_localizations_nl.dart | Generated nl localization implementation for new keys. |
| lib/l10n/arb/app_localizations_it.dart | Generated it localization implementation for new keys. |
| lib/l10n/arb/app_localizations_hu.dart | Generated hu localization implementation for new keys. |
| lib/l10n/arb/app_localizations_he.dart | Generated he localization implementation for new keys. |
| lib/l10n/arb/app_localizations_fr.dart | Generated fr localization implementation for new keys. |
| lib/l10n/arb/app_localizations_es.dart | Generated es localization implementation for new keys. |
| lib/l10n/arb/app_localizations_en.dart | Generated en localization implementation for new keys. |
| lib/l10n/arb/app_localizations_de.dart | Generated de localization implementation for new keys. |
| lib/l10n/arb/app_localizations_ar.dart | Generated ar localization implementation for new keys. |
| lib/l10n/arb/app_it.arb | Adds planner canvas l10n strings (it). |
| lib/l10n/arb/app_hu.arb | Adds planner canvas l10n strings (hu). |
| lib/l10n/arb/app_he.arb | Adds planner canvas l10n strings (he). |
| lib/l10n/arb/app_fr.arb | Adds planner canvas l10n strings (fr). |
| lib/l10n/arb/app_es.arb | Adds planner canvas l10n strings (es). |
| lib/l10n/arb/app_en.arb | Adds planner canvas l10n strings + placeholder metadata (en). |
| lib/l10n/arb/app_de.arb | Adds planner canvas l10n strings (de). |
| lib/l10n/arb/app_ar.arb | Adds planner canvas l10n strings (ar). |
| lib/features/planner/presentation/widgets/saved_plans_sheet.dart | New saved plans bottom sheet (open/duplicate/delete) wired to repository/providers. |
| lib/features/planner/presentation/widgets/plan_status_chips.dart | New always-visible headline chips (RT, NDL/TTS, Deco, CNS, Issues). |
| lib/features/planner/presentation/widgets/plan_results_sheet.dart | New results content (runtime table, per-tank gas, severity-sorted issues). |
| lib/features/planner/presentation/widgets/plan_canvas_chart.dart | New hero canvas chart (profile + ceiling overlay + gas switches + scrub). |
| lib/features/planner/presentation/providers/plan_canvas_providers.dart | New providers: engine config, plan outcome, scrub state, and canvas series assembly. |
| lib/features/planner/presentation/pages/plan_canvas_page.dart | New responsive planner page (phone sheet vs wide results pane) + app bar actions. |
| lib/features/dive_planner/presentation/widgets/plan_profile_chart.dart | Removed legacy profile chart (superseded by canvas chart). |
| lib/features/dive_planner/presentation/widgets/gas_results_panel.dart | Removed legacy gas results panel (superseded by results sheet). |
| lib/features/dive_planner/presentation/widgets/deco_results_panel.dart | Removed legacy deco results panel (superseded by results sheet). |
| lib/features/dive_planner/presentation/providers/dive_planner_providers.dart | Updates quick-plan generation and removes obsolete tab index provider. |
| lib/features/dive_planner/presentation/pages/dive_planner_page.dart | Removed legacy 3-tab planner page (route cutover). |
| lib/core/router/app_router.dart | Routes /planning/dive-planner and :planId now build PlanCanvasPage. |
| docs/superpowers/plans/2026-07-05-dive-planner-phase3-canvas.md | Adds/updates Phase 3 implementation plan document. |
This was referenced Jul 5, 2026
…-planner-phase3-canvas
…mments - Wide layout: hoist and dispose the results ScrollController (was created per build); wire the issues chip to scroll the pane to the issues section - Drop the hardcoded 'OC' badge — a real state-derived OC/CCR toggle lands with CCR support in a later phase - Add canvas page/chart interaction coverage (menus, dialogs, sheets, gas switches, scrub readout)
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 3 of the dive planner redesign (spec, plan). Stacked on #485 (Phase 2 domain/PlanEngine) — this PR's base is
worktree-dive-planner-phase2-domain, so review #484 and #485 first.Replaces the clunky 3-tab planner with the approved Live Profile Canvas — chart-centric, live-recalculating, results in a swipe-up sheet.
What the diver sees
DraggableScrollableSheetholding the runtime table, per-tank gas plan, and severity-sorted issues.divePlanSummariesProvider; the app-bar save button persists with list-summary numbers, and/planning/dive-planner/:planIdreopens a saved plan.Under the hood
lib/features/planner/presentation/—planCanvasSeriesProvider/planOutcomeProvider(live PlanEngine),PlanCanvasChart,PlanStatusChips,PlanResultsSheet,SavedPlansSheet,PlanCanvasPage.addSimplePlannow produces bottom-only segments so the PlanEngine computes the ascent and real deco stops — the legacy quick plan baked in a fixed ascent + safety stop and showed no deco for a 45 m/25 min air dive.DivePlannerPageand its deco/gas/profile panels andplannerTabIndexProvider; reuses the settings/tank/segment editing widgets unchanged. Router points the planner routes at the canvas.divePlanner_warning_*strings where types overlap; the 17 genuinely-newplannerCanvas_*keys are translated into all 10 non-en locales (gen-l10n reports zero untranslated).Deferred (later phases, per spec)
Contingency ghost overlays and one-tap deviations (5); CCR toggle/badge and bailout scrub (4); tissue bars and a per-sample ceiling envelope; convert-to-dive persistence and plan-vs-actual (6); hub restyle, compare, slate (7); waypoint drag-editing.
Verification
100 planner + dive_planner tests and 304 deco tests green;
flutter analyzeclean project-wide; all locales valid. Manual macOS smoke (quick-plan → live chart/chips/sheet → save → reopen) recommended before merge.