Skip to content

feat: replace left nav rail with draggable floating nav fab - #101

Merged
YKDBontekoe merged 5 commits into
mainfrom
cursor/floating-nav-fab-9eae
Jul 13, 2026
Merged

YKDBontekoe merged 5 commits into
mainfrom
cursor/floating-nav-fab-9eae

Conversation

@YKDBontekoe

@YKDBontekoe YKDBontekoe commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the fixed left-edge navigation rail with a draggable floating action button anchored to the bottom-left by default. Tapping the FAB expands a liquid-glass menu with Coach, Health, and Journey destinations; dragging repositions the control anywhere on screen for faster access.

Changes

  • Added KynosFloatingNav — expandable, draggable floating shell navigation
  • Updated ShellPage to overlay the FAB on full-width tab content (no left rail inset)
  • Removed legacy KynosNavRail widget and tests
  • Updated layout tokens and CODEMAP

Visual proof

Collapsed floating nav on coach tab
Expanded navigation options
Floating nav after drag reposition

Checklist

  • flutter analyze — zero issues
  • flutter test — zero failures
  • dart run tool/generate_codemap.dart — CODEMAP.md updated
  • bash scripts/check_design_system.sh — passes
  • bash scripts/check_architecture.sh — passes
  • flutter build web — succeeds
  • Visual proof attached (screenshots)
  • PR title uses Conventional Commits with lowercase subject

Agent notes

Cloud agent run monitoring review feedback.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Added a draggable, expandable floating navigation control with tab selection and quick actions.
    • Added direct access to app Settings from the floating navigation menu.
    • Coach settings now open in an in-app settings sheet.
  • Updates

    • Removed settings buttons from dashboard and page headers.
    • Updated navigation spacing and layout for the floating control.
  • Tests

    • Added coverage for navigation expansion, selection, actions, tooltips, and dragging.

cursoragent and others added 2 commits July 13, 2026 15:00
Transform the shell navigation from a fixed left-edge rail into a
bottom-left floating action button that expands to show tab options and
can be dragged anywhere on screen for faster repositioning.

Co-authored-by: Youri Bontekoe <YKDBontekoe@users.noreply.github.com>
Use immediate drag start behavior and opaque hit testing so the
floating nav can be repositioned reliably with mouse and touch.

Co-authored-by: Youri Bontekoe <YKDBontekoe@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@cursor[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 37b7b37b-15ab-4fe6-a836-99e43da793be

📥 Commits

Reviewing files that changed from the base of the PR and between f218e59 and ca8aebc.

📒 Files selected for processing (2)
  • CODEMAP.md
  • lib/shared/widgets/kynos_floating_nav.dart
📝 Walkthrough

Walkthrough

The app shell replaces its left navigation rail with a draggable floating navigation control. Layout tokens now share a floating-nav size, coach settings open an inference settings sheet, and app-settings actions are removed from dashboard and page-header controls.

Changes

Floating navigation and settings flow

Layer / File(s) Summary
Floating navigation control
lib/shared/widgets/kynos_floating_nav.dart, lib/shared/widgets/widgets.dart, test/shared/widgets/kynos_floating_nav_test.dart
Adds expandable, draggable navigation with tab selection, secondary actions, semantics, tooltips, animations, and widget tests.
Shell navigation integration
lib/app/shell_page.dart, lib/core/theme/layout.dart, CODEMAP.md
Replaces KynosNavRail with KynosFloatingNav, preserves animated tab content, and introduces shellFloatingNavSize for shared sizing.
Settings entry points
lib/features/coach_chat/..., lib/features/dashboard/..., lib/shared/widgets/kynos_page_header.dart
Routes coach settings to showInferenceSettingsSheet and removes app-settings actions and routing dependencies from other headers.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant KynosFloatingNav
  participant ShellPage
  participant NavigationShell
  User->>KynosFloatingNav: Select a tab
  KynosFloatingNav->>ShellPage: Call onSelected(index)
  ShellPage->>NavigationShell: Call goBranch(index)
  NavigationShell->>ShellPage: Update active branch
Loading

Possibly related PRs

Suggested labels: released

Poem

A rabbit hops where the nav rail stood,
Dragging tabs through the glasswood.
Coach settings bloom in a sheet,
Floating buttons make paths neat.
“Bunny navigation!” we cheer,
With haptic hops from ear to ear.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Clearly summarizes the main change: replacing the left nav rail with a draggable floating nav FAB.
Description check ✅ Passed It includes the required Summary, Checklist, and Agent notes sections, plus visual proof and completed checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

Add Settings as an expandable action on the draggable floating nav and
remove duplicate settings buttons from page headers and the coach menu.

Co-authored-by: Youri Bontekoe <YKDBontekoe@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review July 13, 2026 15:11
Co-authored-by: Youri Bontekoe <YKDBontekoe@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
lib/shared/widgets/kynos_floating_nav.dart (2)

50-52: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated magic number instead of the shared layout token.

_fabSize = 52 duplicates LayoutTokens.shellFloatingNavSize introduced in lib/core/theme/layout.dart, whose doc comment explicitly calls it out as the diameter for "the draggable shell floating navigation button." Referencing the token here avoids the two values silently drifting apart later.

♻️ Proposed fix referencing the shared token
-  static const double _fabSize = 52;
+  static const double _fabSize = LayoutTokens.shellFloatingNavSize;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/shared/widgets/kynos_floating_nav.dart` around lines 50 - 52, Update the
_fabSize constant in the floating navigation widget to reference
LayoutTokens.shellFloatingNavSize instead of duplicating the literal 52. Keep
_itemSize and _dragThreshold unchanged.

1-477: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

File exceeds the ~250-line guideline for hand-written Dart files.

At roughly 476 lines this is nearly double the limit. Consider extracting _FloatingNavControl, _NavOption, and _NavActionOption into presentation/widgets/ as their own files.

As per coding guidelines, "Keep hand-written files under about 250 lines; split larger UI code into presentation/widgets/."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/shared/widgets/kynos_floating_nav.dart` around lines 1 - 477, Split the
oversized Kynos floating navigation implementation into focused files under
presentation/widgets/. Move _FloatingNavControl, _NavOption, and
_NavActionOption into separate widget files, preserving their existing APIs and
behavior; leave KynosFloatingNav and its state in the primary file and update
imports/references as needed.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/shared/widgets/kynos_floating_nav.dart`:
- Around line 323-357: Add accessible semantics and a tooltip to the primary FAB
GestureDetector that invokes onFabTap, using a clear label describing the
navigation expand/collapse action. Preserve the existing visual structure and
tap behavior, adjusting only the surrounding wrappers and closing brackets as
needed.
- Around line 157-178: Update _clampPosition to use math.max when calculating
maxLeft and maxBottom so each clamp range remains valid on small layouts. In the
selected-item access, handle an empty items collection before applying
selectedIndex.clamp or indexing, while preserving the existing selection
behavior for non-empty items.
- Around line 309-317: Update the separator logic in the widget’s
actions-rendering loop to track whether any menu element has already been
rendered, inserting a Gap before every subsequent item or action regardless of
whether items is empty. Keep the first rendered element gap-free and align the
rendered separator count with the _stackHeight calculation.

---

Nitpick comments:
In `@lib/shared/widgets/kynos_floating_nav.dart`:
- Around line 50-52: Update the _fabSize constant in the floating navigation
widget to reference LayoutTokens.shellFloatingNavSize instead of duplicating the
literal 52. Keep _itemSize and _dragThreshold unchanged.
- Around line 1-477: Split the oversized Kynos floating navigation
implementation into focused files under presentation/widgets/. Move
_FloatingNavControl, _NavOption, and _NavActionOption into separate widget
files, preserving their existing APIs and behavior; leave KynosFloatingNav and
its state in the primary file and update imports/references as needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 91b182ae-c44c-46df-bab5-2fc407012299

📥 Commits

Reviewing files that changed from the base of the PR and between 58dd451 and f218e59.

📒 Files selected for processing (11)
  • CODEMAP.md
  • lib/app/shell_page.dart
  • lib/core/theme/layout.dart
  • lib/features/coach_chat/presentation/widgets/coach_chat_app_bar.dart
  • lib/features/dashboard/presentation/widgets/dashboard_header_sliver.dart
  • lib/shared/widgets/kynos_floating_nav.dart
  • lib/shared/widgets/kynos_nav_rail.dart
  • lib/shared/widgets/kynos_page_header.dart
  • lib/shared/widgets/widgets.dart
  • test/shared/widgets/kynos_floating_nav_test.dart
  • test/shared/widgets/kynos_nav_rail_test.dart
💤 Files with no reviewable changes (3)
  • lib/shared/widgets/kynos_nav_rail.dart
  • test/shared/widgets/kynos_nav_rail_test.dart
  • lib/features/coach_chat/presentation/widgets/coach_chat_app_bar.dart

Comment thread lib/shared/widgets/kynos_floating_nav.dart
Comment thread lib/shared/widgets/kynos_floating_nav.dart Outdated
Comment thread lib/shared/widgets/kynos_floating_nav.dart Outdated
Harden clamp bounds on small layouts, fix action separator gaps, add FAB
semantics label, and guard empty tab item lists.

Co-authored-by: Youri Bontekoe <YKDBontekoe@users.noreply.github.com>
@YKDBontekoe
YKDBontekoe enabled auto-merge (squash) July 13, 2026 15:37
@YKDBontekoe
YKDBontekoe merged commit 40d9c92 into main Jul 13, 2026
13 checks passed
@YKDBontekoe
YKDBontekoe deleted the cursor/floating-nav-fab-9eae branch July 13, 2026 15:37
kynos-release-bot Bot pushed a commit that referenced this pull request Jul 13, 2026
# [1.21.0](v1.20.0...v1.21.0) (2026-07-13)

### Bug Fixes

* remove ask coach button from health page header ([#100](#100)) ([f337c84](f337c84))

### Features

* replace left nav rail with draggable floating nav fab ([#101](#101)) ([40d9c92](40d9c92))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants