fix(mobile): FAB clearance, PIN gate UX, goals visibility, settings avatar

Multi-touch mobile polish from a thorough panel review at iPhone-class viewport:

- app-main pb-20 → pb-40 so the Ask Ivy FAB never overlaps the last content
  row at scroll-end on /control, /system, /memory.
- PrivatePinGate: inputMode=numeric + pattern=[0-9]* + autoComplete=one-time-code
  + maxLength=20 → iOS opens the numeric keypad instead of full QWERTY.
- Move /goals out of (private)/ — goals are motivational, no reason to gate them
  behind the same PIN as people/money/habits/events.
- ProfileSettings: initials-circle fallback when user.image is empty or fails to
  load (was rendering broken-image icon).
- SettingsTabs + SummaryBar + ProjectGrid filter chips: ui-scroll-fade-right mask
  hint so users can see the row is horizontally scrollable.
- AskIvyModal: hide desktop keyboard hints on touch, show "Tap 🎤 for voice"
  instead — Shift+Enter is meaningless on mobile.
- project-card-sections: aria-label on Focus + Collapse icon buttons.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
g-butandClaude Opus 4.7 committed 2026-05-20 17:54:52 +02:00
1 parent d9236b8ec7
commit 1d481656e6
9 files changed
+48 -9

No files matched your search

File renamed without changes.
+12 -1
View File
@@ -296,7 +296,8 @@
/* Shell */
.app-shell-frame { @apply min-h-screen text-text-primary; }
.app-main { @apply min-w-0 flex-1 overflow-y-auto pb-20 md:pb-0; }
/* pb-32 mobile leaves clearance for the bottom nav (~82px) + Ask Ivy FAB top edge (152px from bottom) */
.app-main { @apply min-w-0 flex-1 overflow-y-auto pb-40 md:pb-0; }
.app-page {
width: min(100%, var(--shell-max));
@apply mx-auto px-5 py-6 md:px-8 md:py-8;
@@ -719,6 +720,16 @@
@apply inline-flex shrink-0 items-center gap-1 rounded-full border border-border-subtle bg-surface-overlay px-2.5 py-1 text-xs font-medium text-text-tertiary;
}
/* Mobile-only right-edge fade — visual hint that a horizontally-scrolling row has more content off-screen.
Applied to scroll containers; vanishes at sm: when the row wraps naturally. */
.ui-scroll-fade-right {
mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
-webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
}
@media (min-width: 640px) {
.ui-scroll-fade-right { mask-image: none; -webkit-mask-image: none; }
}
/* Prompt-library category chip colors — applied alongside .ui-chip or as filter-chip active state */
.ui-cat-fleet { @apply bg-amber-500/15 text-amber-400 border-amber-500/20; }
.ui-cat-security { @apply bg-red-500/15 text-red-400 border-red-500/20; }
@@ -168,6 +168,7 @@ export function ProjectCardHeader({
<button
onClick={onFocus}
title="Focus on this project"
aria-label="Focus on this project"
className="ui-icon-action"
>
<Focus className="h-4 w-4" />
@@ -177,6 +178,7 @@ export function ProjectCardHeader({
<button
onClick={onCollapse}
title="Collapse"
aria-label="Collapse this project card"
className="ui-icon-action"
>
<ChevronsDown className="h-4 w-4" />
+1 -1
View File
@@ -203,7 +203,7 @@ export function ProjectGrid({ projects }: { projects: Project[] }) {
</div>
{statuses.length > 1 && (
<div className="flex gap-1.5 overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:flex-wrap sm:overflow-x-visible">
<div className="flex gap-1.5 overflow-x-auto ui-scroll-fade-right [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:flex-wrap sm:overflow-x-visible">
{statuses.map((s) => {
const truncated = s.length > CHIP_MAX_CHARS ? s.slice(0, CHIP_MAX_CHARS) + "…" : s;
return (
+24 -2
View File
@@ -12,9 +12,17 @@ type Props = {
user: { id: string; name: string; username: string; image: string };
};
function getInitials(name: string): string {
const parts = name.trim().split(/\s+/).filter(Boolean);
if (parts.length === 0) return "?";
if (parts.length === 1) return parts[0]!.slice(0, 2).toUpperCase();
return (parts[0]![0]! + parts[parts.length - 1]![0]!).toUpperCase();
}
export function ProfileSettings({ user }: Props) {
const [name, setName] = useState(user.name);
const [username, setUsername] = useState(user.username);
const [imgFailed, setImgFailed] = useState(false);
const [saving, setSaving] = useState(false);
const [error, setError] = useState("");
const [saved, setSaved] = useState(false);
@@ -40,8 +48,22 @@ export function ProfileSettings({ user }: Props) {
<section className="ui-settings-section">
<h2 className="font-medium text-text-primary">Profile</h2>
{user.image && (
<Image src={user.image} alt={name} width={48} height={48} className="h-12 w-12 rounded-full" />
{user.image && !imgFailed ? (
<Image
src={user.image}
alt={name}
width={48}
height={48}
className="h-12 w-12 rounded-full"
onError={() => setImgFailed(true)}
/>
) : (
<div
className="flex h-12 w-12 items-center justify-center rounded-full bg-accent-muted text-sm font-semibold text-accent-text"
aria-label={`Avatar for ${name}`}
>
{getInitials(name)}
</div>
)}
<div className="space-y-3">
+1 -1
View File
@@ -51,7 +51,7 @@ export function SettingsTabs({ user, userPrefs, projects, teamProjects, projectL
return (
<div>
{/* Tab nav */}
<div className="border-b border-border-subtle -mx-4 px-4 mb-6 overflow-x-auto">
<div className="border-b border-border-subtle -mx-4 px-4 mb-6 overflow-x-auto ui-scroll-fade-right [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden">
<div className="flex min-w-max">
{TABS.map((tab) => (
<button
+4 -1
View File
@@ -54,12 +54,15 @@ export function PrivatePinGate({ children }: { children: React.ReactNode }) {
<input
ref={inputRef}
type="password"
inputMode="numeric"
pattern="[0-9]*"
placeholder="PIN"
value={pin}
onChange={(e) => setPin(e.target.value)}
className="ui-input text-center text-xl tracking-widest"
disabled={loading}
autoComplete="current-password"
autoComplete="one-time-code"
maxLength={20}
/>
{error && (
<p className="ui-error text-center">{error}</p>
+2 -1
View File
@@ -224,7 +224,8 @@ export function AskIvyModal({ onClose, initialInput = "" }: { onClose: () => voi
<p className="mt-1.5 text-center ui-error-xs">{micError}</p>
)}
<div className="mt-1.5 text-center text-micro text-text-tertiary">
Enter to send · Shift+Enter for new line · Esc to close · ? to reopen · 🎤 Whisper
<span className="hidden sm:inline">Enter to send · Shift+Enter for new line · Esc to close · ? to reopen · </span>
<span className="sm:hidden">Tap </span>🎤<span className="sm:hidden"> for voice</span><span className="hidden sm:inline"> Whisper</span>
</div>
</div>
</Modal>
+2 -2
View File
@@ -9,7 +9,7 @@ import { APP_LOCALE } from "@/lib/constants";
export function SummaryBarSkeleton() {
const widths = ["5rem", "7rem", "6rem", "5rem", "5rem"];
return (
<div className="flex gap-3 overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:flex-wrap sm:overflow-x-visible">
<div className="flex gap-3 overflow-x-auto ui-scroll-fade-right [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:flex-wrap sm:overflow-x-visible">
{widths.map((w, i) => (
<div
key={i}
@@ -44,7 +44,7 @@ export async function SummaryBar() {
].filter(Boolean).join("\n");
return (
<div className="flex gap-3 overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:flex-wrap sm:overflow-x-visible">
<div className="flex gap-3 overflow-x-auto ui-scroll-fade-right [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden sm:flex-wrap sm:overflow-x-visible">
{s.activeGoals > 0 && (
<Pill icon={Target} value={`${s.activeGoals} goals · ${s.avgGoalProgress}%`} href="/goals" />
)}