Benjamin Sutter
da50f3b5ea
feat: premium redesign — DM Serif, refined palette, flat score badges
...
- Design tokens (ds.ts, theme.ts, scoreTheme.ts): new warm palette
(#152642 navy, #f9f8f6 warm white, #e8e7e4 borders, #b8975a gold accent),
flat score tier badges replacing CSS gradients, Inter + DM Serif Display typography
- Card components: white-background cards, DM Serif score numbers, max-2 badge
chips with +N overflow tooltip, editorial score badge positioning
- Layout shell: gold left-accent nav active state, 64px top bar, outlined
workspace chip, DM Serif page titles
- Shared atoms: GenericBadge (outlined/solid variants), ResultFilterBar
(simplified chip styles), DecisionContextPanel (dot metrics, no left accent)
- Global replacement (118 files): #1e3a5f→#152642, #e2e8f0→#e8e7e4,
#f4f6f9→#f9f8f6 — all handled via Node.js for proper UTF-8 safety
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-09 22:26:30 +02:00
Benjamin Sutter
e36c5bc979
refactor(arch): eliminate direct service calls in components — route all through hooks
...
New hook files:
- useAuth.ts: useLogin, useSwitchDemoRole, useSwitchOrganization
- useAI.ts: useParseNeed, useGenerateOfferEmail, useGenerateDecisionBrief, useParseListingText
- useAssistant.ts: useAssistantSuggestions (useQuery), useAssistantAnswer (useMutation)
- useOfferReport.ts: useOfferReportByInquiry, useCreateOfferReport, useUpdateOfferReport, useGenerateOfferReportPdf
- useInquiryReport.ts: useInquiryReportByInquiry, useCreateInquiryReport, useUpdateInquiryReport, useFinalizeInquiryReport
- useMarketReport.ts: useMarketReport
- useWeighting.ts: useDefaultWeights (synchronous wrapper)
- useUnitMatches.ts: useUnitMatchesMap, useUnitBundle, useBundleMatches (useMemo wrappers)
Extended hooks: useProperties (add update/create/remove mutations),
useNeeds (add useCreateNeed), useMatches (add useNeedMatchesForProperty,
useAdditionalMatchesForInquiry), useReviewQueue (add useCreateReviewTask)
Updated 21 components/pages: all direct service imports replaced with hooks.
Deliberate exception: getRecommendedActions in DataQuality.tsx (pure sync utility, no provider access).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-24 14:56:32 +02:00
Benjamin Sutter
7934da7669
feat: design token system — DS_TEXT/DS_SURFACE/DS_BORDER + 237 hex migrations
...
Token infrastructure (src/lib/ds.ts):
- DS_TEXT: 16 semantic text color tokens (primary/secondary/muted/success/
warning/error/info/brand/signal + dark variants successDark/warningDark/
signalDark/infoDark for text on tinted surfaces)
- DS_BG: page/surface/subtle/muted background tokens
- DS_BORDER: default/muted/strong border tokens
- DS_SURFACE: 10 bg+border surface pairs (success/warning/error/info/indigo/
purple/orange/blue/neutral/slate)
- DS_MATCH_TIER: score-tier surface aliases keyed by strong/moderate/weak
- DS_PRE_MARKET / DS_MARKET_SIGNAL: named aliases for futureCard tokens
- DS_SHADOW: card/panel/dialog elevation tokens
- BADGE_COLORS: 14 semantic presets for GenericBadge (confidenceHigh,
riskMedium, preMarket, marketSignal, verified, gold, silver, bronze…)
GenericBadge (src/components/shared/GenericBadge.tsx):
- New semanticVariant prop (keyof BADGE_COLORS) — preferred over raw hex
- color prop becomes optional (fallback), type-documented as escape hatch
Priority file migrations — 237 hex literals replaced across 10 files:
ScoreBreakdownPanel.tsx −22 PipelineDetailPanel.tsx −22
FutureAvailabilityCard.tsx −26 AICompareSummary.tsx −27
LocationIntelligencePanel −39 AssistantPromptSuggestions −18
UnitStructurePanel.tsx −25 BerichtDialog.tsx −24
PreMarketPanel.tsx −24 PropertyActivityLogPanel −10
ESLint (eslint.config.js):
- Updated rule message to reference new tokens (DS_TEXT, DS_SURFACE, etc.)
- Added 'stroke' to monitored property names
- Remains 'warn' for gradual migration; use check:tokens for CI gate
CI script (scripts/check-tokens.js + npm run check:tokens):
- Counts hex patterns in components/ + pages/
- Fails if count > THRESHOLD (ratchet: 1958 baseline, lower per sprint)
- Reports top 15 offenders for prioritizing next migration batch
Results: ESLint targeted sx-prop violations: 1752 → 1030 (−41%)
0 TypeScript errors, 154 tests green
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-24 14:05:52 +02:00
Benjamin Sutter
5d53f35dea
refactor(state): clean layoutStore, add selectors, centralise STALE constants
...
- layoutStore: remove 4 dead field groups (pinnedPanels, selectedResultId,
compareTrayVisible, notificationsOpen) — none were read outside the store
- CompareTray: drop dead useLayoutStore side-effect (state was write-only)
- 8 components: replace bare useStore() with explicit selectors / useShallow
to prevent unnecessary re-renders on unrelated state mutations
- lib/constants: add STALE_MARKET_SIGNALS + STALE_REVIEW_QUEUE (30s each)
- useMarketSignals, useReviewQueue: use global constants instead of
hook-local magic numbers
- Add STATE_MANAGEMENT.md: decision tree + rules for RQ/Zustand/local/derived
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-24 01:30:44 +02:00
Benjamin Sutter
d15a13e485
feat: remove Administration workspace — keep only Verwaltung + Suche
...
- Delete all ops page components (ReviewQueue, AIMonitoring, Governance,
SourceMonitoring, ActivityTimeline, SignalPipeline)
- Remove OPERATIONS workspace from AppShell config, nav order, path detection
- Remove all /ops/* routes from App.tsx
- Remove WorkspaceType.OPERATIONS from allowedWorkspaces in authService,
sessionStore, permissions
- Keep MarketIntelligence page (already moved to /supply/market-intelligence)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-19 20:32:41 +02:00
Benjamin Sutter
30e840489d
feat: F024 global AI assistant — contextual decision intelligence drawer
...
Wires the existing "AI Assistent" button in the TopBar and adds a 420px
slide-in drawer with context-aware suggestions, message thread, loading
animation, and action cards requiring manual confirmation. Template-based
mock service returns German-language answers keyed by route + question
keywords — no real LLM calls, no invented facts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-17 13:27:33 +02:00