Files
Business-Management/changelog/2026-04-17_switch-penpot-to-figma.md
curo1305 d2042153a7 Add re-analyse button and POST /documents/{id}/reprocess endpoint
Resets status to pending, clears error_message, and re-enqueues the
background AI extraction task. Button is disabled while the document
is already pending or processing; returns 409 in that case from the API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 17:00:17 +02:00

8.2 KiB

2026-04-17 — Switch UX/UI design tool from Penpot to Figma

Timestamp: 2026-04-17T00:00:00

Summary: Replaced all references to Penpot with Figma across the project. The ux-designer agent now describes Figma REST API integration instead of the Penpot API.

Files Modified:

  • .claude/agents/ux-designer.md — rewrote Penpot setup checklist and API docs to use Figma (personal access token, X-Figma-Token header, api.figma.com/v1 endpoints)
  • frontend/STATUS.md — updated Known limitations and Future work to reference Figma instead of Penpot
  • TODO.md — replaced "UX/UI — Penpot setup" section with "UX/UI — Figma setup"

Files Added:

  • changelog/2026-04-17_switch-penpot-to-figma.md — this entry

2026-04-17 — Adopt shadcn/ui + Tailwind CSS as UI layer

Timestamp: 2026-04-17T00:00:00

Summary: Confirmed shadcn/ui + Tailwind CSS as the UI component library and styling system. Updated CLAUDE.md stack table and frontend/STATUS.md to reflect this decision.

Files Modified:

  • CLAUDE.md — added UI Library (shadcn/ui) and Styling (Tailwind CSS v3) rows to Stack table
  • frontend/STATUS.md — marked shadcn/ui checklist item as done; updated Known limitations note from "evaluation pending" to "adoption in progress"

2026-04-17 — Implement shadcn/ui + Tailwind CSS UI layer

Timestamp: 2026-04-17T12:00:00

Summary: Full implementation of the shadcn/ui + Tailwind CSS UI layer: design token system, theme context, new LoginPage, AppShell + Sidebar replacing the inline Nav component.

Files Added:

  • frontend/tailwind.config.ts — Tailwind config with CSS-variable-based design tokens (primary, accent, background, surface, border, foreground, muted)
  • frontend/postcss.config.js — PostCSS config (tailwindcss + autoprefixer)
  • frontend/components.json — shadcn/ui init config (style: default, baseColor: slate, cssVariables: true)
  • frontend/src/styles/theme.css — Tailwind directives + full CSS custom property token set (light/dark mode)
  • frontend/src/lib/utils.tscn() utility (clsx + tailwind-merge)
  • frontend/src/components/ui/button.tsx — shadcn/ui Button (default, ghost, outline, destructive variants)
  • frontend/src/components/ui/input.tsx — shadcn/ui Input
  • frontend/src/hooks/useTheme.ts — theme hook (localStorage + OS preference detection)
  • frontend/src/components/ThemeToggle.tsx — sun/moon ghost icon button
  • frontend/src/components/Sidebar.tsx — collapsible left sidebar (expanded/collapsed states, NavLinks, admin-only item, user avatar, logout)
  • frontend/src/components/AppShell.tsx — layout wrapper (Sidebar + scrollable main)

Files Modified:

  • frontend/package.json — added lucide-react, clsx, tailwind-merge, class-variance-authority, @radix-ui/react-slot, tailwindcss, autoprefixer, postcss
  • frontend/vite.config.ts — added @/ path alias via fileURLToPath
  • frontend/src/main.tsx — import theme.css
  • frontend/src/App.tsx — PrivateRoute and AdminRoute now wrap children in AppShell; removed Nav import
  • frontend/src/pages/LoginPage.tsx — full redesign: two-column grid (form panel + hero panel), shadcn Input/Button, ThemeToggle
  • frontend/src/pages/DashboardPage.tsx — removed Nav, applied Tailwind headings
  • frontend/src/pages/AppsPage.tsx — removed Nav
  • frontend/src/pages/ProfilePage.tsx — removed Nav
  • frontend/src/pages/AdminPage.tsx — removed Nav
  • frontend/src/pages/DocumentsPage.tsx — removed Nav
  • frontend/src/pages/DocumentAdminSettingsPage.tsx — removed Nav
  • frontend/src/pages/AIAdminSettingsPage.tsx — removed Nav
  • frontend/STATUS.md — added component inventory table; updated What it is; updated Future work checklist

2026-04-17 — Per-service system prompts with AI Settings tab view

Timestamp: 2026-04-17T12:00:00

Summary: Added runtime-editable system prompts per service, stored in each service's config file on the shared volume. The AI Service Settings page now has a tab view (General / System Prompts).

Files Added / Modified / Deleted

  • backend/app/core/app_config.py — Added DocServiceSystemPrompts model, updated DocServiceConfig, added load_all_system_prompts, save_service_system_prompts, SYSTEM_PROMPT_SERVICES registry
  • backend/app/routers/settings.py — Added SystemPromptUpdate schema, GET /system-prompts and PATCH /system-prompts/{service_id} endpoints
  • features/doc-service/app/services/config_reader.py — Added _DEFAULT_SYSTEM_PROMPT, _DEFAULT_USER_TEMPLATE, and system_prompts key to _DEFAULT_CONFIG
  • features/doc-service/app/services/ai_client.py — Loads system prompt and user template dynamically from config at runtime; falls back to defaults
  • frontend/src/api/client.ts — Added ServiceSystemPrompt, SystemPromptsData types, getSystemPrompts and updateSystemPrompt API functions
  • frontend/src/pages/AIAdminSettingsPage.tsx — Refactored to tab view (General | System Prompts); System Prompts tab shows per-service editable textarea cards
  • features/ai-service/STATUS.md — Documented system prompts architecture
  • features/doc-service/STATUS.md — Documented runtime prompt loading

2026-04-17 — Apps page: card surface colour + whole-card click

Timestamp: 2026-04-17T00:00:00

Summary: Cards on the Apps page now render with the --color-surface token (distinct from the page background), and clickable cards (status = available + path set) are wrapped in a <Link> so the entire frame navigates to the app. The Settings link is unchanged and stops click propagation.

Files Modified:

  • frontend/src/pages/AppsPage.tsx — Added cardStyle/clickableCardStyle objects using CSS custom properties; conditionally wraps card in <Link> vs <div>; removed standalone "Open" button; settings link gains e.stopPropagation()

2026-04-17 — Sidebar app sub-navigation, category filtering, and re-analysis on category creation

Timestamp: 2026-04-17T00:00:00

Summary: Added expandable Apps section to the sidebar with Documents → categories sub-navigation. Clicking a category filters the documents view. Removed tag UI from the document list (deferred). When a new category is created, similar existing categories are detected and affected documents are re-analysed in the background so the new category surfaces as a pending AI suggestion.

Files Modified:

  • frontend/src/components/Sidebar.tsx — replaced flat Apps nav item with collapsible accordion; Documents sub-item expands to list all user categories; category links navigate to /apps/documents?category_id=<id>
  • frontend/src/pages/DocumentsPage.tsx — removed TagEditor component; added useSearchParams for category_id URL param; category filter chip shown in FilterBar with dismiss button; "Clear filters" now also clears category filter
  • frontend/src/api/client.ts — added category_id field to DocumentListParams
  • features/doc-service/app/routers/documents.py — added category_id query param to GET /documents; filters via subquery on category_assignments
  • features/doc-service/app/routers/categories.pyPOST /documents/categories now finds similar categories by name (word overlap + SequenceMatcher) and triggers a background task to re-run AI extraction on affected documents, merging new suggested_categories into their extracted_data
  • features/doc-service/STATUS.md — updated endpoints table and filter params table
  • frontend/STATUS.md — updated sidebar and documents page sections

2026-04-17 — Re-analyse button for documents

Timestamp: 2026-04-17T00:00:00

Summary: Added a Re-analyse button to each document row that re-runs AI extraction on demand. The endpoint resets status to pending, clears any previous error, and enqueues the background processing task. The button is disabled while the document is already pending or processing.

Files Modified:

  • features/doc-service/app/routers/documents.py — added POST /documents/{id}/reprocess endpoint
  • frontend/src/api/client.ts — added reprocessDocument(id) API function
  • frontend/src/pages/DocumentsPage.tsx — added reprocessMut mutation and Re-analyse button in document row header
  • features/doc-service/STATUS.md — marked reprocess as done, added endpoint to table