Skip to content

Add mobile responsive design with bottom navigation - #1

Draft
esafwan wants to merge 2 commits into
mainfrom
claude/mobile-responsive-redesign-HhbKO
Draft

esafwan wants to merge 2 commits into
mainfrom
claude/mobile-responsive-redesign-HhbKO

Conversation

@esafwan

@esafwan esafwan commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements comprehensive mobile responsiveness across the Pulse app, transforming it from a desktop-first layout to a mobile-friendly experience. This includes a new bottom navigation component for mobile, responsive typography, card-based layouts for tables on small screens, and optimized spacing throughout.

Key Changes

Navigation & Layout

  • New BottomNav component: Fixed bottom tab bar for mobile (md:hidden) with role-filtered navigation items, icon + label display, and safe-area inset support for notched devices
  • AppLayout updates: Hide sidebar on mobile (hidden md:flex), add bottom nav, adjust main content padding (pb-16 md:pb-0) to account for bottom nav height
  • Topbar refinements: Reduce horizontal padding on mobile, improve responsive header layout

Responsive Typography & Spacing

  • Page titles: Changed from fixed text-3xl to text-2xl sm:text-3xl across Dashboard, Team, Operations, MyTasks, Templates, Insights, and UserProfile pages
  • Global spacing: Reduce padding on mobile (p-5 sm:p-8 instead of p-8), adjust gaps and margins for touch-friendly targets
  • Login page: Add horizontal padding (px-6) and improve tap target sizing for login link

Mobile-First Component Layouts

  • Dashboard: Stack gauge + text vertically on mobile (flex flex-col md:flex-row), reduce gauge size from 220px to 160px on small screens, adjust stat card grid
  • Team page: Replace table with stacked card layout on mobile (md:hidden), show avatar, name, role, and score indicators per card; keep desktop table hidden on mobile (hidden md:block)
  • Operations tree: Remove min-w-[600px] constraint, reduce indentation (level * 1.25rem instead of level * 2rem), shrink avatar size (h-7 w-7 sm:h-8 sm:w-8), simplify tree connectors
  • MyTasks/ChecklistRunner: Full-width sheet on mobile (w-full sm:max-w-md), reduce padding (p-4 sm:p-6), ensure sticky footer above bottom nav
  • Templates: Responsive grid (already had md:grid-cols-2 lg:grid-cols-3), stack header on mobile, adjust sheet width (w-full sm:w-[640px])
  • UserProfile: Stack avatar + header vertically on mobile, responsive gauge sizing, adjust card layout
  • Insights: Hide Role and Branch columns on mobile (hidden sm:table-cell), add horizontal scroll container

Viewport & Meta Tags

  • Update viewport meta tag: Add viewport-fit=cover for notched device support
  • Add overflow-x-hidden to prevent accidental horizontal scroll

Implementation Details

  • All changes use Tailwind responsive utilities (sm:, md: breakpoints) — no new dependencies
  • Mobile cards maintain click/navigation behavior of desktop tables
  • Touch targets meet 44px minimum accessibility standard
  • Dark theme (zinc/indigo palette) preserved across all responsive variants
  • Bottom nav respects safe-area insets for devices with notches/home indicators

https://claude.ai/code/session_01Lfh6MXKQLBaayYSuU6RdGx

claude added 2 commits March 19, 2026 00:13
- Add BottomNav component with role-filtered tab bar for mobile navigation
- Hide desktop sidebar on mobile (md breakpoint), show bottom nav instead
- Stack Dashboard gauge card vertically on mobile with smaller gauge (160px)
- Make ChecklistRunner sheet full-width on mobile with reduced padding
- Add mobile card view for Team page tables (My Team + All Teams tabs)
- Simplify Operations tree for mobile: reduced indentation, hide Own Score column
- Remove min-width constraints that forced horizontal scroll
- Make Templates sheet full-width on mobile, stack signature grid
- Hide less important table columns on mobile for Insights page
- Responsive UserProfile header: stack avatar/name/period selector
- Reduce page title sizes, padding, and gaps on small screens
- Update viewport meta with viewport-fit=cover for notched phones
- Add overflow-x-hidden to prevent horizontal scroll

https://claude.ai/code/session_01Lfh6MXKQLBaayYSuU6RdGx
esafwan added a commit that referenced this pull request Aug 28, 2026
…1, B2, B5, B6, A1, A2, A3, C3a)

Security:
- C9: authorize get_operations_overview/get_user_run_breakdown/get_hierarchy_breakdown
  against the caller's scope via the existing get_scope_for_user helper; add
  Pulse Employee to permission_query_conditions. Previously any authenticated
  user could pass an arbitrary employee ID and read that person's full subtree.

Trust bugs (null-vs-zero, the system's #1 forbidden conflation):
- B1: pass `total` into scoreStatus in Operations.tsx so a person with zero
  generated runs renders as grey "no data", not red "0% failing"; fix the
  no-data meter to render a neutral segment instead of a solid red bar.
- B2/B3: exclude null combined_score from both the numerator and denominator
  of the team roll-up average (previously coerced to 0 and left in the
  denominator); omit no-data reports from the bar chart instead of plotting
  fake 0% bars; reconcile the "View failing runs (N)" count with the FAILED
  count shown in the same card.
- B5: add a shared isPartialBucket() helper and visually distinguish today's
  (necessarily incomplete) bucket in the Insights trend charts, so the daily
  cliff at the current day is no longer misread as a real decline.
- B6: give --none-status a light-theme-appropriate value (was identical to
  the dark value, rendering as a solid near-black bar on the light ground).

Chrome (A1-A3):
- A1: give the sidebar collapse control a visible text label when expanded.
- A2: replace the sidebar search button's synthetic-keydown dispatch (which
  toggled instead of opened, and coupled two components via the global event
  bus) with lifted open/onOpenChange state in AppLayout, shared explicitly
  between Sidebar and CommandSearch.
- A3: fix PeriodToggle's active-state contrast (was 2.96:1/3.04:1, failing
  WCAG AA in both themes) by using --ink as the foreground against --sel
  (5.16:1/4.95:1); unify inner-button radius with the container.

Groundwork:
- C3a: Corrective Action list/update API (pulse/api/corrective_actions.py),
  scoped via get_scope_for_user, following create_corrective_action_for_run's
  existing authorization pattern. Frontend queue page is a follow-up (C3b).

See docs/execution/product-gap-analysis.md for the full finding set and
docs/execution/gap-fix-plan.md for the dependency-mapped execution plan.
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