feat: implement mobile app usability improvements

Mobile Navigation:
- Add MobileNav component with bottom tab bar
- Show mobile nav on small screens, hide desktop sidebar
- Add session count badge to Sessions tab
- Add safe area padding for notched devices

Session Management:
- Redesign SessionCard for mobile with action menu
- Add MobileActionSheet for session actions
- Keep primary action prominent

Forms & Dialogs:
- Stack form fields vertically on mobile
- Ensure 44px minimum touch targets
- Update dialogs for 320px viewport

Responsive Layout:
- Add MobilePageHeader with back button
- Reduce page padding on mobile
- Stack multi-column grids vertically

Touch & Interaction:
- Add active states to interactive elements
- Ensure 8px spacing between touch targets

Complex Pages:
- Update Repo Workspace for mobile
- Update Tool Workshop and Config Profiles

Build: TypeScript check passes, production build succeeds
This commit is contained in:
Fusion
2026-05-25 11:20:25 +02:00
parent 8fb4b67372
commit adaedb70ef
18 changed files with 1239 additions and 152 deletions
+357
View File
@@ -173,6 +173,116 @@ a {
height: 100%;
}
/* Mobile Navigation */
.mobile-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-around;
align-items: center;
background: var(--panel);
border-top: 1px solid var(--border);
padding-bottom: env(safe-area-inset-bottom, 0);
z-index: 100;
height: 64px;
}
.mobile-nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
padding: 8px 12px;
color: var(--muted);
text-decoration: none;
font-size: 11px;
min-width: 64px;
min-height: 44px;
border-radius: 8px;
transition: color 0.15s ease;
}
.mobile-nav-item.active {
color: var(--brand);
}
.mobile-nav-icon-wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.mobile-nav-badge {
position: absolute;
top: -6px;
right: -8px;
background: var(--danger);
color: white;
font-size: 10px;
font-weight: 600;
min-width: 16px;
height: 16px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 4px;
}
/* Mobile Page Header */
.mobile-page-header {
display: flex;
align-items: center;
gap: var(--space-2);
padding: var(--space-2) 0;
margin-bottom: var(--space-3);
border-bottom: 1px solid var(--border);
}
.mobile-page-header-back {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
background: transparent;
border: none;
color: var(--text);
cursor: pointer;
border-radius: 8px;
padding: 0;
}
.mobile-page-header-back:active {
background: var(--color-border);
}
.mobile-page-header h1 {
margin: 0;
font-size: 1.1rem;
font-weight: 600;
flex: 1;
}
.mobile-page-header-actions {
display: flex;
gap: var(--space-2);
}
.mobile-nav-label {
font-size: 11px;
font-weight: 500;
}
/* Mobile shell content padding adjustment */
.shell-content.mobile {
padding-bottom: calc(1.25rem + 64px);
}
.eyebrow {
margin: 0;
font-size: var(--font-size-xs);
@@ -419,6 +529,32 @@ a {
flex-direction: column;
align-items: flex-start;
}
/* Ensure minimum touch targets on mobile */
button,
a,
input,
select,
textarea,
[role="button"] {
min-height: 44px;
min-width: 44px;
}
/* Active states for touch feedback */
button:active,
a:active,
[role="button"]:active {
opacity: 0.8;
transform: scale(0.98);
}
/* Remove transform on buttons that shouldn't scale */
.mobile-nav-item:active,
.mobile-action-sheet-button:active,
.mobile-action-sheet-cancel:active {
transform: none;
}
}
.project-list {
@@ -538,6 +674,18 @@ a {
gap: 0.6rem;
}
@media (max-width: 767px) {
.dialog-actions {
flex-direction: column-reverse;
gap: 0.5rem;
}
.dialog-actions button {
width: 100%;
min-height: 44px;
}
}
.keys-list {
display: flex;
flex-direction: column;
@@ -1072,6 +1220,17 @@ a {
width: 100%;
flex-wrap: wrap;
}
.workspace-main {
padding: var(--space-2);
}
.tree-entry {
padding: 0.5rem;
min-height: 44px;
display: flex;
align-items: center;
}
}
.sidebar-section {
@@ -1308,6 +1467,27 @@ a {
overflow: auto;
}
@media (max-width: 767px) {
.modal-content {
min-width: auto;
width: calc(100% - 2rem);
max-width: 100%;
margin: 1rem;
padding: 1rem;
max-height: calc(100vh - 2rem);
}
.modal-actions {
flex-direction: column-reverse;
gap: 0.5rem;
}
.modal-actions button {
width: 100%;
min-height: 44px;
}
}
.modal-content h2 {
margin: 0 0 1rem 0;
font-size: 1.25rem;
@@ -2699,6 +2879,39 @@ a.nav-item,
margin-bottom: var(--space-6);
}
/* Mobile Sessions Page */
@media (max-width: 767px) {
.sessions-page {
padding: var(--space-2);
}
.sessions-page .page-header {
margin-bottom: var(--space-3);
}
.sessions-page .page-header h1 {
font-size: 1.25rem;
}
.last-session-section {
margin-bottom: var(--space-4);
}
.last-session-section h2 {
font-size: 1rem;
margin-bottom: var(--space-2);
}
.create-session-section {
padding: var(--space-3);
}
.create-session-section h2 {
font-size: 1rem;
margin-bottom: var(--space-2);
}
}
.last-session-card {
display: flex;
justify-content: space-between;
@@ -2888,6 +3101,29 @@ a.nav-item,
.session-card-actions a {
padding: var(--space-1);
}
.session-card-actions.mobile {
display: flex;
gap: var(--space-2);
padding-top: var(--space-3);
border-top: 1px solid var(--color-border);
}
.session-card-actions.mobile .mobile-primary {
flex: 1;
justify-content: center;
min-height: 44px;
padding: var(--space-2) var(--space-3);
}
.session-card-actions.mobile .mobile-more {
min-width: 44px;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-2);
}
}
.recent-sessions-section {
@@ -3019,6 +3255,20 @@ a.nav-item,
gap: var(--space-4);
}
@media (max-width: 767px) {
.create-session-form .form-row {
grid-template-columns: 1fr;
gap: var(--space-3);
}
.create-session-form input,
.create-session-form select,
.create-session-form textarea,
.create-session-form button {
min-height: 44px;
}
}
/* Workflow Step Styles */
.workflow-form {
display: flex;
@@ -3566,6 +3816,113 @@ a.nav-item,
cursor: pointer;
}
/* Mobile Action Sheet */
.mobile-action-sheet-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
display: flex;
align-items: flex-end;
justify-content: center;
animation: fadeIn 0.2s ease;
}
.mobile-action-sheet {
background: var(--bg);
border-radius: 16px 16px 0 0;
width: 100%;
max-width: 500px;
max-height: 80vh;
overflow-y: auto;
animation: slideUp 0.3s ease;
padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-action-sheet-header {
padding: var(--space-3) var(--space-4) var(--space-2);
text-align: center;
}
.mobile-action-sheet-handle {
width: 36px;
height: 4px;
background: var(--color-border);
border-radius: 2px;
margin: 0 auto var(--space-3);
}
.mobile-action-sheet-header h3 {
margin: 0;
font-size: 1rem;
font-weight: 600;
}
.mobile-action-sheet-actions {
display: flex;
flex-direction: column;
gap: 1px;
background: var(--color-border);
margin: 0 var(--space-2);
border-radius: 12px;
overflow: hidden;
}
.mobile-action-sheet-button {
display: flex;
align-items: center;
gap: var(--space-3);
width: 100%;
padding: var(--space-3) var(--space-4);
background: var(--bg);
border: none;
color: var(--text);
font-size: 1rem;
cursor: pointer;
min-height: 56px;
text-align: left;
}
.mobile-action-sheet-button.danger {
color: #cd3131;
}
.mobile-action-sheet-button:active {
background: var(--color-border);
}
.mobile-action-sheet-cancel {
display: block;
width: calc(100% - var(--space-4));
margin: var(--space-3) var(--space-2);
padding: var(--space-3);
background: var(--bg);
border: 1px solid var(--color-border);
border-radius: 12px;
color: var(--text);
font-size: 1rem;
font-weight: 600;
cursor: pointer;
min-height: 56px;
}
.mobile-action-sheet-cancel:active {
background: var(--color-border);
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from { transform: translateY(100%); }
to { transform: translateY(0); }
}
/* AppShell mobile menu */
@media (max-width: 767px) {
.shell-nav {