Skip to content

Replace the mobile desktop-style header with bottom navigation #1726

Closed

Description

@propr-dev

Context

The current active-plan and task-review buttons disappear below the md breakpoint. A desktop header compressed onto a phone is also a poor primary navigation model. The requested mobile structure is a fixed bottom navigation with Inbox, Activity, New Plan, Repositories, and More.

Requirements

  • Keep the existing full GlobalHeader for md and larger screens.
  • Add fixed mobile bottom navigation below md.
  • Add destinations in this order: Inbox, Activity, New Plan, Repositories, More.
  • Show the unread Inbox count on the Inbox tab.
  • Use Activity for the task list route.
  • Make New Plan visually prominent but not oversized.
  • Implement More as an accessible bottom sheet containing Plans, Coding Agents, Logs, Settings, system health, user identity, and sign out.
  • Respect env(safe-area-inset-bottom) on iPhone devices.
  • Add bottom content padding so route controls cannot be obscured.
  • Preserve desktop keyboard shortcuts and header dropdown behavior.

Acceptance Criteria

  • All five destinations are visible at widths below 768px.
  • Active state follows the current route.
  • Inbox badge updates from the notification unread-count API.
  • More opens and closes with tap, Escape, backdrop click, and route navigation.
  • Focus moves into the sheet and returns to the More button.
  • Desktop header appearance and behavior are unchanged.
  • No page's final controls are hidden under the fixed navigation.

Created by ProPR AI Planner

Activity

  1. propr-dev commented on Aug 2, 2026

    @propr-dev
    ContributorAuthor

    Suggested Implementation:

    Implementation Approach

    Create a route-aware mobile component instead of conditionally rearranging the desktop header. The desktop controls have popovers and dense status content that do not translate cleanly to a phone. A separate mobile navigation component keeps the responsive boundary explicit, while shared APIs provide the unread count and user/system information.

    File: propr-ui/src/components/MobileBottomNavigation.tsx (new file)

    Why this file: This component owns the five-tab navigation and More sheet independently from desktop header complexity.

    import React, { useEffect, useRef, useState } from 'react';
    import { Activity, Bell, Bot, FileClock, FolderGit2, ListChecks, Menu, Plus, Settings, X } from 'lucide-react';
    import { NavLink, useLocation, useNavigate } from 'react-router-dom';
    import { getUnreadNotificationCount } from '../api/notificationsApi';
    
    const tabs = [
      { label: 'Inbox', to: '/inbox', icon: Bell },
      { label: 'Activity', to: '/tasks', icon: Activity },
      { label: 'New Plan', to: '/studio/new', icon: Plus, primary: true },
      { label: 'Repositories', to: '/repositories', icon: FolderGit2 },
    ] as const;
    
    const moreLinks = [
      { label: 'Plans', to: '/plans', icon: ListChecks },
      { label: 'Coding Agents', to: '/agents', icon: Bot },
      { label: 'LLM Logs', to: '/logs', icon: FileClock },
      { label: 'Settings', to: '/settings', icon: Settings },
    ] as const;
    
    export function MobileBottomNavigation() {
      const navigate = useNavigate();
      const location = useLocation();
      const [moreOpen, setMoreOpen] = useState(false);
      const [unreadCount, setUnreadCount] = useState(0);
      const moreButtonRef = useRef<HTMLButtonElement>(null);
      const sheetRef = useRef<HTMLDivElement>(null);
    
      useEffect(() => {
        void getUnreadNotificationCount().then(result => setUnreadCount(result.unreadCount)).catch(() => undefined);
      }, [location.pathname]);
    
      useEffect(() => {
        if (!moreOpen) return;
        sheetRef.current?.querySelector<HTMLElement>('a,button')?.focus();
        const onKeyDown = (event: KeyboardEvent) => {
          if (event.key === 'Escape') setMoreOpen(false);
        };
        window.addEventListener('keydown', onKeyDown);
        return () => window.removeEventListener('keydown', onKeyDown);
      }, [moreOpen]);
    
      const closeMore = () => {
        setMoreOpen(false);
        requestAnimationFrame(() => moreButtonRef.current?.focus());
      };
    
      return (
        <>
          {moreOpen && (
            <div className='md:hidden fixed inset-0 z-40 bg-black/40' onMouseDown={event => event.target === event.currentTarget && closeMore()}>
              <div ref={sheetRef} role='dialog' aria-modal='true' aria-label='More navigation' className='absolute inset-x-0 bottom-0 rounded-t-2xl bg-white p-4 pb-[calc(1rem+env(safe-area-inset-bottom))] shadow-2xl'>
                <div className='mb-3 flex items-center justify-between'><h2 className='font-semibold'>More</h2><button type='button' onClick={closeMore} aria-label='Close More menu' className='rounded p-2'><X className='h-5 w-5' /></button></div>
                <nav className='grid gap-1'>
                  {moreLinks.map(link => <button key={link.to} type='button' onClick={() => { closeMore(); navigate(link.to); }} className='flex min-h-12 items-center gap-3 rounded-lg px-3 text-left hover:bg-slate-100'><link.icon className='h-5 w-5 text-slate-500' />{link.label}</button>)}
                </nav>
              </div>
            </div>
          )}
    
          <nav aria-label='Primary mobile navigation' className='md:hidden fixed inset-x-0 bottom-0 z-30 border-t border-slate-200 bg-white/95 pb-[env(safe-area-inset-bottom)] backdrop-blur'>
            <div className='grid h-16 grid-cols-5'>
              {tabs.map(tab => (
                <NavLink key={tab.to} to={tab.to} className={({ isActive }) => `relative flex flex-col items-center justify-center gap-1 text-[11px] ${isActive ? 'text-teal-700' : 'text-slate-500'}`}>
                  <span className={tab.primary ? 'rounded-full bg-teal-700 p-2 text-white' : ''}><tab.icon className='h-5 w-5' /></span>
                  <span>{tab.label}</span>
                  {tab.label === 'Inbox' && unreadCount > 0 && <span aria-label={`${unreadCount} unread notifications`} className='absolute right-[24%] top-1 rounded-full bg-red-600 px-1.5 text-[10px] leading-4 text-white'>{Math.min(unreadCount, 99)}</span>}
                </NavLink>
              ))}
              <button ref={moreButtonRef} type='button' aria-expanded={moreOpen} onClick={() => setMoreOpen(true)} className='flex flex-col items-center justify-center gap-1 text-[11px] text-slate-500'><Menu className='h-5 w-5' /><span>More</span></button>
            </div>
          </nav>
        </>
      );
    }

    File: propr-ui/src/components/GlobalHeader.tsx

    Why this file: The desktop header remains intact but should not render as the primary phone navigation.

    --- a/propr-ui/src/components/GlobalHeader.tsx
    +++ b/propr-ui/src/components/GlobalHeader.tsx
    @@ -120,7 +120,10 @@
    -  return <header className='sticky top-0 z-30 ...'>
    +  // Mobile uses a dedicated bottom navigation because header popovers and dense
    +  // desktop controls are not appropriate phone interactions.
    +  return <header className='hidden md:flex sticky top-0 z-30 ...'>
    @@ -150,8 +153,8 @@
    -    <ActivePlansButton className='hidden md:flex' />
    -    <TasksButton className='hidden md:flex' />
    +    <ActivePlansButton />
    +    <TasksButton />

    File: propr-ui/src/App.tsx

    Why this file: Mount mobile navigation once inside the authenticated shell and reserve space beneath every route.

    --- a/propr-ui/src/App.tsx
    +++ b/propr-ui/src/App.tsx
    @@ -1,5 +1,6 @@
    +import { MobileBottomNavigation } from './components/MobileBottomNavigation';
    @@ -120,7 +121,10 @@
    -      <div className='flex-1 min-h-0'>
    +      {/* Bottom padding prevents fixed mobile navigation from covering route-level
    +          submit, stop, or pagination controls. Desktop retains its existing size. */}
    +      <div className='flex-1 min-h-0 pb-[calc(4rem+env(safe-area-inset-bottom))] md:pb-0'>
             <Routes>{/* existing routes */}</Routes>
           </div>
    +      <MobileBottomNavigation />
  2. propr-dev commented on Aug 24, 2026

    @propr-dev
    ContributorAuthor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 1726/gpt-5.6-sol-replace-the-mobile-deskto-20260824-2300-aho
    • Base Branch: 1716-epic-failed-to-3m8
    • Worktree: issue-1726-20260824-2300-gpt-5.6-sol-aho

    🔍 Track Task Execution

  3. added a commit that references this issue on Aug 24, 2026
  4. added a commit that references this issue on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions