Mobile Performance & Responsiveness — What's Broken and the Fix Plan #124
LarytheLord
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Why This Discussion Exists
As the platform grows — more pages, more data, more components — mobile experience has become a real problem. The dashboard, rankings, and admin pages were built desktop-first and are showing it. This discussion covers what's broken, why it's heavy, and the plan to fix it.
The Core Problem
The app is doing several things that hurt mobile performance:
1. WebGL shader hero on the landing page
components/ui/animated-shader-hero.tsxis 572 lines. It runs a WebGL shader loop on every landing page visit. On low-end Android devices (which is most of India's mobile market — directly relevant given the Open Paws Bangalore context) this:The component already has a CSS gradient fallback for when WebGL fails. The fix is to also trigger that fallback on mobile/low-memory devices before attempting WebGL, not after it crashes.
2. Dashboard pages have fixed heights that break on mobile
app/dashboard/page.tsxandapp/dashboard/company/quests/page.tsxuse fixed heights (h-[200px],min-h-[320px]) on loading states and empty states. On a 375px wide phone these look disproportionate and waste significant viewport space.3. Rankings table overflows horizontally
components/RankingsBoard.tsxusesmin-w-[100px]on columns in a flex layout. On mobile the table scrolls horizontally with no visual indicator that more content exists. Users miss columns silently.4. Admin pages have no mobile layout
/admin/qa-queue,/admin/quests,/admin/users— all built as desktop-only tables. The admin is Open Paws team members who may be on their phones reviewing submissions. Currently unusable on mobile.5. Large JS bundle from unoptimized components
Three components are >500 lines and are loaded as single modules:
CompanyPortal.tsx— 786 lines (company dashboard)AdminDashboard.tsx— 576 lines (admin panel)animated-shader-hero.tsx— 572 lines (landing page)These aren't code-split, so the entire module is bundled even when only part of it is needed.
What Good Mobile Looks Like for This App
The primary mobile users are:
The dashboard and QA queue must be fully usable on mobile. The landing page must load fast on a slow 4G connection.
Fix Plan
Critical (blocks mobile usability)
animated-shader-hero.tsxnavigator.hardwareConcurrency < 4ornavigator.deviceMemory < 2→ skip to CSS fallbackdashboard/page.tsx,company/quests/page.tsxh-[200px]withmin-h-[120px] sm:h-[200px]RankingsBoard.tsxoverflow-x-auto, add sticky first column, show fewer columns on mobile/admin/qa-queue/page.tsxmax-w-fulland responsive padding auditHigh (degrades experience)
app/home/page.tsxhidden lg:flexHowItWorks.tsxhidden lg:blockgradient line with a vertical connector for mobileCompanyPortal.tsxCompanyDashboardStats,CompanyQuestList,CompanyRecentActivityMedium (code quality)
useApiFetch()custom hooklib/status-utils.ts<DashboardKpiGrid>component used by both adventurer and company dashboardsBundle Size Quick Wins
animated-shader-hero.tsx— extract WebGL renderer class tolib/webgl-renderer.tsso it can be lazy-loadedCompanyPortal.tsx— split so each sub-component is only loaded when that tab is activeMobile Viewport Targets
All pages must be functional at:
"Functional" means: the user can complete their primary task without horizontal scrolling or content being cut off.
Beta Was this translation helpful? Give feedback.
All reactions