Replace the UI with the Organic design handoff (docs/design_handoff_pansy_ui)
Build image / build-and-push (push) Successful in 31s
Gadfly review (reusable) / review (pull_request) Failing after 1s
Adversarial Review (Gadfly) / review (pull_request) Failing after 1s

The frontend is rebuilt screen by screen from the handoff: warm cream ground,
terracotta + sage accents, Caprasimo over Figtree, every control a pill. Same
React/Vite/TanStack stack and the same lib/ data layer; the presentation is new.

- Tokens: web/src/styles/index.css declares the handoff's styles.css variables
  through Tailwind's @theme under the same names; dark mode is those variables
  overridden on <html> by the handoff's pansy-theme.js, inlined in index.html
  so it runs before first paint. Lucide glyphs at stroke 2.75; a small pill kit
  (Button, Dialog, Field, Seg, Toggle, Tag, toast).
- Login / Register: the centered column over soft accent circles; OIDC button
  and signup footer still follow /auth/providers.
- Gardens: cards with a real SVG plot thumbnail (objects + plant-colored dots
  from /full), a `plan` tag for "<name> — <year>" copies, shares line, Open +
  share/copy/edit/delete; New garden / Share / Plan-a-season dialogs.
- Plants: monogram markers derived from the name (collision-resolved across the
  catalog — replaces emoji icons), category chips, expandable lot cards, the
  scan-packet flow as a two-step dialog that never auto-creates.
- Settings: Appearance (theme seg), Who gets in (read-only sign-in config),
  Garden assistant (self-saving toggle + chat/vision model fields), You.
- Editor: a new canvas with the prototype's pointer model (wheel-to-cursor,
  pinch about the centroid, 3″ snap, one PATCH per drop, semantic-zoom
  monograms/labels), plus corner resize handles; desktop three-card workspace
  (toolkit | plan | rail with Plot/Journal/History/Assistant) and, below 760px
  of container width, the phone chrome (header, peek panel, tool strip, mode
  bar). Seasons as a segmented control over the years with data plus plan
  copies; Undo re-reads history before reverting the newest step.
- Public read-only view and the register page restyled to match.
- GET /settings gains a read-only `auth` view (registration mode, local auth,
  OIDC issuer) so the Settings page can show what's in force.
- README / DESIGN.md / CLAUDE.md updated; @use-gesture/react dropped.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-08-22 19:12:29 -04:00
co-authored by Claude Fable 5
parent 18b36870d4
commit 52b2c09a9e
111 changed files with 6621 additions and 7215 deletions
+61
View File
@@ -0,0 +1,61 @@
import { Link } from '@tanstack/react-router'
import { Icon } from '@/components/ui/Icon'
import { useMe } from '@/lib/auth'
import { cn } from '@/lib/cn'
import { AccountMenu } from './AccountMenu'
import { ThemeButton } from './ThemeButton'
export type NavSection = 'gardens' | 'plants' | 'settings'
/** The brand mark: sage sprout + "pansy" in the display face. */
export function Brand({ size = 19, textClassName }: { size?: number; textClassName?: string }) {
return (
<span className="inline-flex items-center gap-2 font-heading text-lg text-text">
<Icon name="sprout" size={size} className="text-accent-2-600" />
<span className={textClassName}>pansy</span>
</span>
)
}
/**
* The top nav shared by the Gardens, Plants and Settings pages (and the editor
* on desktop): brand, centered section links, and the right cluster — theme
* toggle, the settings gear for admins, the account avatar.
*/
export function Nav({ active }: { active?: NavSection }) {
const me = useMe()
const user = me.data
const link = (to: '/gardens' | '/plants', id: NavSection, label: string) => (
<Link
to={to}
aria-current={active === id ? 'page' : undefined}
className={cn('text-sm text-text no-underline hover:text-accent', active === id && 'text-accent')}
>
{label}
</Link>
)
return (
<nav className="flex flex-none items-center gap-[17.6px] px-[17.6px] py-[13.2px]">
<Link to="/gardens" className="mr-auto no-underline">
<Brand />
</Link>
{link('/gardens', 'gardens', 'Gardens')}
{link('/plants', 'plants', 'Plants')}
<span className="ml-auto flex items-center gap-2.5">
<ThemeButton />
{user?.isAdmin && (
<Link
to="/settings"
aria-current={active === 'settings' ? 'page' : undefined}
title="Settings"
aria-label="Settings"
className={cn('btn btn-icon btn-secondary', active === 'settings' && 'bg-accent-100 text-accent')}
>
<Icon name="settings" />
</Link>
)}
{user && <AccountMenu user={user} />}
</span>
</nav>
)
}