Slice 1 dynamic remedy crafting was duplicated from Dynamic remedy crafting V0.1
Continue chatting to ask questions about or make changes to it.
We need to change this design.
The first iteration of this will not include a guided selection, common templates, recently used,, quick filters. It will just contain a searchable dropdown of the templates to select from and the ability to complete the form which will populate the template.
Let me explore the current codebase to understand what we're working with.
Let me read the key files to understand the current remedy builder design.
Let me read the rest of the remedy builder to understand the full structure.
Now I understand the full structure. Let me check the Command and Popover UI components for building the searchable dropdown.
Now I have a full understanding. The user wants a simplified first iteration: remove guided selection, common templates, recently used, and quick filters (category chips) — keeping just a searchable dropdown to select a template plus the form to populate it. Let me refactor remedy-builder.tsx.
Let me start with the imports:
Now remove the LEVEL_QUESTIONS constant (only used by guided selection):
Now remove the unused filter-tree helpers, common templates, and recent key:
Now remove the CATEGORIES constant (keep categoryOf since search uses it):
Now remove the Highlight component and its escapeRegExp helper (only used by the old TemplateCard):
Now replace the TemplateCard, Chip, and GuidedSelectionModal components with the new searchable dropdown. Let me read the current state of that region:
Let me find the exact boundaries of the components to replace:
Now I'll replace TemplateCard with the new TemplateCombobox:
Now remove the Chip and GuidedSelectionModal components:
Now let me read the main component to rewrite it:
Now let me simplify the state and helpers in the main component:
Now let me read the current JSX body to rewrite it:
Now I'll replace the body — the manual mode, chooser, and breadcrumb sections — with the new dropdown-based layout:
Now let me remove the GuidedSelectionModal usage at the end and verify the closing structure:
The closing structure is correct. Now remove the GuidedSelectionModal usage:
Let me update the header description and check for any leftover unused references:
templateFields is now unused. Let me remove it and update the header text:
Let me verify no dangling references to removed imports remain:
RotateCcw is imported but no longer used. Let me remove it from the import:
Now let me verify the build compiles by checking the dev logs and running the browser. First let me check the page that uses this:
you should add back in the ability to create a remedy manually (freetext)
also remove any ability to link this to issues that it resolves.
Also remove the 'path' that the template was within - see attached image