From 475d910f8a53a1de7bf6d14fe932db51ab6a355b Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 05:44:17 +0200 Subject: [PATCH] feat(mobile-responsive-polish): Nav + Pages mobile-friendly (Hamburger, stacking) [tsc:fail] --- .phase7-state.json | 5 +- GENERATION_LOG.md | 15 ++++ apps/web/src/components/Nav.tsx | 154 ++++++++++++++------------------ 3 files changed, 84 insertions(+), 90 deletions(-) diff --git a/.phase7-state.json b/.phase7-state.json index 00f7d25..83fd1a7 100644 --- a/.phase7-state.json +++ b/.phase7-state.json @@ -1,9 +1,10 @@ { "completed_features": [], - "current_feature": "email-notification-stub", + "current_feature": "mobile-responsive-polish", "started_at": "2026-05-23T05:40:09.997191", "attempted_features": [ "documents-upload", - "search-everywhere" + "search-everywhere", + "email-notification-stub" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 192f339..8db1564 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -816,3 +816,18 @@ src/routes/documents.ts(36,25): error TS2339: Property 'size' does not exist on src/routes/documents.ts(46,32): error TS2339: Property 'file' does not exist on type 'FastifyRequest>'. src/routes/documents.ts(56,9): error TS2769: No overload matches this call. Overload 1 of 2, '(value: { filename: string | SQL | Placeholder; contentType: string | SQL | Placeholder; sizeBytes: number | SQL<...> | Placeholder<...>; id?: string | ... 2 more ... | undefined; createdAt?: SQL<...> | ... 2 more ... | undefined; userId?: string | ... 3 more ... | undefined; c +- `05:43:30` **INFO** Committed feature email-notification-stub +- `05:43:31` **INFO** Pushed: rc=0 + +## Phase-3 Feature: mobile-responsive-polish (2026-05-23 05:43:31) + +- `05:43:31` **INFO** Description: Nav + Pages mobile-friendly (Hamburger, stacking) +- `05:43:31` **INFO** Generating apps/web/src/components/Nav.tsx (ERWEITERT — Mobile-Hamburger (Menu-Icon) bei md:hidden, full Nav-Links…) +- `05:44:16` **INFO** wrote 4790 chars in 45.2s (attempt 1) +- `05:44:16` **INFO** Running tsc --noEmit on api… +- `05:44:17` **WARN** tsc errors: +src/routes/documents.ts(34,25): error TS2339: Property 'name' does not exist on type 'PgTableWithColumns<{ name: "documents"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "documents"; dataType: "string"; columnType: "PgUUID"; data: string; driverParam: string; notNull: true; hasDefault: true; ... 6 more ...; generated: undefined; }, {}, {}>; ... 5 more ...; createdAt: PgColumn<...'. +src/routes/documents.ts(36,25): error TS2339: Property 'size' does not exist on type 'PgTableWithColumns<{ name: "documents"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "documents"; dataType: "string"; columnType: "PgUUID"; data: string; driverParam: string; notNull: true; hasDefault: true; ... 6 more ...; generated: undefined; }, {}, {}>; ... 5 more ...; createdAt: PgColumn<...'. +src/routes/documents.ts(46,32): error TS2339: Property 'file' does not exist on type 'FastifyRequest>'. +src/routes/documents.ts(56,9): error TS2769: No overload matches this call. + Overload 1 of 2, '(value: { filename: string | SQL | Placeholder; contentType: string | SQL | Placeholder; sizeBytes: number | SQL<...> | Placeholder<...>; id?: string | ... 2 more ... | undefined; createdAt?: SQL<...> | ... 2 more ... | undefined; userId?: string | ... 3 more ... | undefined; c diff --git a/apps/web/src/components/Nav.tsx b/apps/web/src/components/Nav.tsx index 49222ee..cc5146a 100644 --- a/apps/web/src/components/Nav.tsx +++ b/apps/web/src/components/Nav.tsx @@ -1,4 +1,4 @@ -import React from "react" +import React, { useState } from "react" import { Link, useLocation } from "@tanstack/react-router" import { Home, @@ -10,7 +10,9 @@ import { Sun, Moon, Settings, - ListTree + ListTree, + Menu, + X } from "lucide-react" import { useQuery } from "@tanstack/react-query" import { api } from "../lib/api" @@ -19,6 +21,7 @@ import { useTheme } from "../lib/theme" export default function Nav() { const location = useLocation() const { theme, toggleTheme } = useTheme() + const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false) const { data: user } = useQuery({ queryKey: ['me'], @@ -33,6 +36,35 @@ export default function Nav() { { label: "Projects", to: "/projects", icon: FolderKanban }, ] + const adminItems = [ + { label: "Admin", to: "/admin", icon: ShieldCheck }, + { label: "Audit Log", to: "/admin/audit-log", icon: ListTree }, + ] + + const allItems = user?.role === 'admin' + ? [...navItems, ...adminItems] + : navItems + + const NavLink = ({ item, mobile = false }: { item: typeof navItems[0], mobile?: boolean }) => { + const isActive = location.pathname === item.to + const Icon = item.icon + + const baseClasses = "flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors" + const activeClasses = "bg-indigo-50 text-indigo-700 dark:bg-indigo-900/30 dark:text-indigo-300" + const inactiveClasses = "text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-100" + + return ( + setIsMobileMenuOpen(false)} + className={`${baseClasses} ${isActive ? activeClasses : inactiveClasses}`} + > + + {item.label} + + ) + } + return ( ) } \ No newline at end of file