5 Commits
Author SHA1 Message Date
g-butandClaude Opus 4.5 ad79791f80 refactor: add toDateString utility and DRY date formatting
- Add toDateString() to lib/format.ts for YYYY-MM-DD date strings
- Update lib/blog.ts to use shared toDateString (removed getCurrentDate)
- Update lib/knowledge.ts to use shared toDateString (4 usages)

DRY: Eliminates duplicate date formatting pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:25:25 +01:00
g-butandClaude Opus 4.5 6c25dc8dfe refactor: comprehensive code quality improvements (DRY, SSOT, SoC)
## Broken Links Fixed
- Fix /projects/governance/build link to /contact in HeroSection.tsx

## Console Statements Removed (production code)
- Remove console.log/error from client components
- Replace with silent error handling or UI feedback
- Files: documents/page.tsx, try/page.tsx, settings/page.tsx,
  ConversationList.tsx, ProfessionalDemo.tsx, and more

## Inline Styles Converted to Tailwind
- Replace animation-delay inline styles with Tailwind arbitrary values
- Files: DemoMessage.tsx, DemoChat.tsx, ProfessionalDemo.tsx,
  QuickChat.tsx, demo/page.tsx, HeroSection.tsx

## Governance Types Consolidated (SSOT)
- Create app/projects/governance/types.ts as single source of truth
- Create app/projects/governance/utils.ts for formatting functions
- Remove duplicate EnhancedTransaction from TransactionWithTraceability.tsx
- Update component type files to re-export from SSOT

## Colors Config Extended
- Extend COLOR_CLASSES to support all 16 accent colors
- Fix type mismatch in custom bot pages

## Magic Numbers Extracted
- Add formatBytes utility to lib/format.ts (DRY)
- Add DEMO_MAX_FILE_SIZE to VALIDATION constants
- Update try/page.tsx to use centralized constants

## Minor Fixes
- Fix unused variable warning in CollaborationForm.tsx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 00:24:27 +01:00
g-butandClaude Opus 4.5 1c7abeebac docs(claude): add global standards reference and update date
- Add @~/.claude/CLAUDE.md import for global engineering standards
- Update Last Updated date to 2026-01-23

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:22:36 +01:00
g-butandClaude Sonnet 4.5 9aa417e273 refactor: clean up API routes and components, add shared utilities
Refactored multiple API routes and components to improve code organization and reduce duplication:
- Simplified API route implementations across chat, documents, consultations, and other endpoints
- Reorganized navigation components for better maintainability
- Added shared utility functions and hooks
- Created reusable Avatar and Logo components
- Added validation schemas and API utilities
- Improved type definitions and constants management

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 11:04:19 +01:00
g-butandClaude Opus 4.5 5951943cfe refactor: deduplicate validation and formatting utilities
- Create lib/validation.ts with shared email validation, text helpers
- Create lib/format.ts with currency, number, date, percent formatters
- Refactor api/waitlist/route.ts to use shared isValidEmail
- Update swiss-german-teacher validation to re-export from shared lib
- Update governance utils to re-export formatCurrency from shared lib
- Remove duplicate formatCurrency from 4 governance components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:32:22 +01:00