Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: enlarge compact navigation touch targets (#9898)

Adam Eivyda555f3b4609
diff --git a/client/src/components/ui/TabPills.jsx b/client/src/components/ui/TabPills.jsx
index 02e87d2691..3812cf12e9 100644
--- a/client/src/components/ui/TabPills.jsx
+++ b/client/src/components/ui/TabPills.jsx
@@ -49,7 +49,7 @@ const SIZE = {
// Chevrons are the only overflow cue an icon row gets — with labels gone there
// is no half-clipped word hinting that the strip continues. They sit in flow
// beside the strip rather than over it, so they never cover a destination.
-const ARROW_CLASS = 'sm:hidden shrink-0 flex items-center justify-center self-stretch px-1 text-gray-400 hover:text-white';
+const ARROW_CLASS = 'sm:hidden shrink-0 flex min-w-[44px] min-h-[44px] items-center justify-center self-stretch px-1 text-gray-400 hover:text-white';
export default function TabPills({
tabs,
@@ -247,7 +247,7 @@ export default function TabPills({
disabled={t.disabled}
onClick={() => onChange(t.id)}
onKeyDown={!isFilter ? (event) => handleTabKeyDown(event, index) : undefined}
- className={`flex items-center ${sz.gap} ${sz.padding} rounded ${sz.text} transition-colors whitespace-nowrap ${
+ className={`flex items-center ${iconRow ? 'max-sm:min-w-[44px] max-sm:min-h-[44px]' : ''} ${sz.gap} ${sz.padding} rounded ${sz.text} transition-colors whitespace-nowrap ${
active
? 'bg-port-accent/20 text-port-accent border border-port-accent/40'
: 'text-gray-300 hover:bg-port-bg border border-transparent'
@@ -301,7 +301,7 @@ export default function TabPills({
disabled={t.disabled}
onClick={() => onChange(t.id)}
onKeyDown={(event) => handleTabKeyDown(event, index)}
- className={`flex items-center ${stretch ? 'flex-1 min-w-0 justify-center' : 'shrink-0 justify-center'} ${sz.gap} ${sz.padding} ${sz.text} font-medium transition-colors whitespace-nowrap min-h-[44px] sm:min-h-[40px] border-b-2 -mb-px ${
+ className={`flex items-center ${stretch ? 'flex-1 min-w-0 justify-center' : 'shrink-0 justify-center'} ${iconRow ? 'max-sm:min-w-[44px] max-sm:min-h-[44px]' : ''} ${sz.gap} ${sz.padding} ${sz.text} font-medium transition-colors whitespace-nowrap min-h-[44px] sm:min-h-[40px] border-b-2 -mb-px ${
active
? 'text-port-accent border-port-accent bg-port-accent/5'
: 'text-gray-400 border-transparent hover:text-white hover:bg-port-card'
diff --git a/client/src/components/ui/TabPills.test.jsx b/client/src/components/ui/TabPills.test.jsx
index 1835edfeda..74d1a3e562 100644
--- a/client/src/components/ui/TabPills.test.jsx
+++ b/client/src/components/ui/TabPills.test.jsx
@@ -172,6 +172,13 @@ describe('TabPills — underline variant (default)', () => {
// reads as a form control rather than navigation, so it is reserved for the
// bars that have no icons to show (#7283 made it universal; this reverses that).
describe('TabPills — mobileCompact icon row', () => {
+ it.each(['underline', 'pills', 'filter'])('gives compact %s controls a 44px touch target', (variant) => {
+ render(<TabPills variant={variant} mobileCompact tabs={sampleTabs} activeTab="cast" onChange={() => {}} />);
+ for (const tab of screen.getAllByRole(variant === 'filter' ? 'button' : 'tab')) {
+ expect(tab).toHaveClass('max-sm:min-w-[44px]', 'max-sm:min-h-[44px]');
+ }
+ });
+
it('keeps one tablist and hides each label below `sm` without renaming the tab', () => {
render(<TabPills mobileCompact tabs={sampleTabs} activeTab="cast" onChange={() => {}} />);
@@ -209,12 +216,16 @@ describe('TabPills — mobileCompact icon row', () => {
act(() => { for (const cb of resize) cb(); });
expect(screen.queryByRole('button', { name: 'Scroll tabs left' })).toBeNull();
- await user.click(screen.getByRole('button', { name: 'Scroll tabs right' }));
+ const rightArrow = screen.getByRole('button', { name: 'Scroll tabs right' });
+ expect(rightArrow).toHaveClass('min-w-[44px]', 'min-h-[44px]');
+ await user.click(rightArrow);
expect(scrollBy).toHaveBeenCalledWith({ left: 240, behavior });
strip.scrollLeft = 200;
fireEvent.scroll(strip);
- await user.click(screen.getByRole('button', { name: 'Scroll tabs left' }));
+ const leftArrow = screen.getByRole('button', { name: 'Scroll tabs left' });
+ expect(leftArrow).toHaveClass('min-w-[44px]', 'min-h-[44px]');
+ await user.click(leftArrow);
expect(scrollBy).toHaveBeenLastCalledWith({ left: -240, behavior });
changePreference(!reduced);
await user.click(screen.getByRole('button', { name: 'Scroll tabs right' }));