chore: mark US-065 as complete and update progress log
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
11e8daf67c
commit
8418f49787
4
prd.json
4
prd.json
|
|
@ -31,7 +31,7 @@
|
|||
"Typecheck passes"
|
||||
],
|
||||
"priority": 2,
|
||||
"passes": false,
|
||||
"passes": true,
|
||||
"notes": "Dependencies: US-054"
|
||||
},
|
||||
{
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
"Verify in browser using dev-browser skill"
|
||||
],
|
||||
"priority": 3,
|
||||
"passes": false,
|
||||
"passes": true,
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
|
|
|
|||
25
progress.txt
25
progress.txt
|
|
@ -29,6 +29,7 @@
|
|||
- Settings page at `/dashboard/settings` reuses dashboard layout; re-auth via signInWithPassword before updateUser
|
||||
- Character/Variable types (`Character`, `Variable`) and extracted node data types (`DialogueNodeData`, `VariableNodeData`) are in `src/types/flowchart.ts`
|
||||
- New JSONB fields (characters, variables) must be defaulted to `[]` when reading from DB in page.tsx to handle pre-existing data
|
||||
- Reusable `Combobox` component at `src/components/editor/Combobox.tsx` - use for all character/variable dropdowns. Props: items (ComboboxItem[]), value, onChange, placeholder, onAddNew
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -42,3 +43,27 @@
|
|||
- `flowchart_data` is a JSONB column in Supabase, so it comes as `any` type. Always provide defaults for new fields when reading from DB to handle existing data without those fields.
|
||||
- The new `characterId` and `variableId` fields are optional alongside existing `speaker`/`variableName` fields to support migration from free-text to referenced-entity pattern.
|
||||
---
|
||||
|
||||
## 2026-01-23 - US-055
|
||||
- What was implemented: Database migration to update flowchart_data JSONB default to include `characters: []` and `variables: []`
|
||||
- Files changed:
|
||||
- `supabase/migrations/20260123000000_add_characters_variables_to_flowchart_data.sql` - New migration that alters the default value for the flowchart_data column and documents the expected JSONB structure
|
||||
- **Learnings for future iterations:**
|
||||
- Since characters and variables are stored within the existing flowchart_data JSONB column (not as separate tables), schema changes are minimal - just updating the column default. The real data integrity is handled at the application layer.
|
||||
- The app-side defaults in page.tsx (from US-054) already handle existing projects gracefully, so no data migration of existing rows is needed.
|
||||
- For JSONB-embedded arrays, the pattern is: update the DB default for new rows + handle missing fields in app code for old rows.
|
||||
---
|
||||
|
||||
## 2026-01-23 - US-065
|
||||
- What was implemented: Reusable searchable combobox component at `src/components/editor/Combobox.tsx`
|
||||
- Files changed:
|
||||
- `src/components/editor/Combobox.tsx` - New component with searchable dropdown, keyboard navigation, color swatches, badges, "Add new..." option, and auto-positioning
|
||||
- **Learnings for future iterations:**
|
||||
- The Combobox exports both the default component and the `ComboboxItem` type for consumers to use
|
||||
- Props: `items` (ComboboxItem[]), `value` (string | undefined), `onChange` (id: string) => void, `placeholder` (string), `onAddNew` (() => void, optional)
|
||||
- ComboboxItem shape: `{ id: string, label: string, color?: string, badge?: string }`
|
||||
- The component uses neutral zinc colors for borders/backgrounds (not blue/green/orange) so it can be reused across different node types
|
||||
- Dropdown auto-positions above or below based on available viewport space (200px threshold)
|
||||
- Keyboard: ArrowDown/Up navigate, Enter selects, Escape closes
|
||||
- The component is designed to be a drop-in replacement for text inputs in node components (same `w-full` and `text-sm` sizing)
|
||||
---
|
||||
|
|
|
|||
Loading…
Reference in New Issue