feat(swift): Epic 4 - Navigation & Auth compleet
E4.S1 - Login form uitbreiden: - Interface selector (Swift/Klassiek) toegevoegd - Visuele keuze met icons (Layout/Zap) - Redirect naar gekozen interface na login E4.S2 - Preference opslag: - updateInterfacePreference() in lib/auth/client.ts - getInterfacePreference() voor ophalen - Opslag in user_metadata.preferred_interface E4.S3 - Redirect middleware: - /epd → redirect naar preferred interface - /login → redirect naar preferred interface (als ingelogd) - Default: klassiek (/epd/clients) E4.S4 - Fallback Picker: - FallbackPicker component voor lage confidence - Grid met 3 opties (Notitie, Zoeken, Overdracht) - Keyboard shortcuts [1], [2], [3] - Toont originele input voor context Voortgang: Epic 4 compleet (8 SP) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,12 +8,12 @@
|
||||
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useSwiftStore } from '@/stores/swift-store';
|
||||
import type { BlockType } from '@/lib/swift/types';
|
||||
import type { BlockPrefillData } from '@/stores/swift-store';
|
||||
import type { BlockType, BlockPrefillData } from '@/stores/swift-store';
|
||||
import { DagnotatieBlock } from '../blocks/dagnotitie-block';
|
||||
import { ZoekenBlock } from '../blocks/zoeken-block';
|
||||
import { OverdrachtBlock } from '../blocks/overdracht-block';
|
||||
import { PatientContextCard } from '../blocks/patient-context-card';
|
||||
import { FallbackPicker } from '../blocks/fallback-picker';
|
||||
|
||||
export function CanvasArea() {
|
||||
const { activeBlock, prefillData, activePatient } = useSwiftStore();
|
||||
@@ -26,6 +26,8 @@ export function CanvasArea() {
|
||||
return <ZoekenBlock prefill={prefill} />;
|
||||
case 'overdracht':
|
||||
return <OverdrachtBlock prefill={prefill} />;
|
||||
case 'fallback':
|
||||
return <FallbackPicker originalInput={prefill.content} />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -152,29 +152,16 @@ export const CommandInput = forwardRef<HTMLInputElement>(function CommandInput(_
|
||||
|
||||
clearInput();
|
||||
} else {
|
||||
// Low confidence or unknown intent - temporary fallback to dagnotitie
|
||||
// TODO: Replace with FallbackPicker in E4.S4
|
||||
openBlock('dagnotitie', { content: inputText });
|
||||
|
||||
addRecentAction({
|
||||
intent: 'dagnotitie',
|
||||
label: inputText.slice(0, 50),
|
||||
});
|
||||
|
||||
// Low confidence or unknown intent - show FallbackPicker
|
||||
openBlock('fallback', { content: inputText });
|
||||
clearInput();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error processing intent:', error);
|
||||
|
||||
// On error, fallback to dagnotitie with the input as content
|
||||
|
||||
// On error, show FallbackPicker so user can choose
|
||||
// This ensures the user's input is not lost
|
||||
openBlock('dagnotitie', { content: inputText });
|
||||
|
||||
addRecentAction({
|
||||
intent: 'dagnotitie',
|
||||
label: inputText.slice(0, 50),
|
||||
});
|
||||
|
||||
openBlock('fallback', { content: inputText });
|
||||
clearInput();
|
||||
} finally {
|
||||
setIsProcessing(false);
|
||||
|
||||
Reference in New Issue
Block a user