feat(platform): split save prompt menu and swap history toggle to clock icon#1589
Conversation
…ck icon - Extract save prompt and prompt library actions into a new SavePromptMenu next to the composer mode menu, removing them from the mode menu. - Swap the history sidebar toggle to a Clock icon and reuse the existing show/hide history strings; drop the unused openSidebar/closeSidebar keys. - Replace the tabs-based history sidebar with a single scroll column and a persisted collapsible "Archived" section. - Add a metrics breadcrumb on the automations layout and use the shared SearchInput in the automations table.
📝 WalkthroughWalkthroughThis PR refactors chat and automations UI components across multiple interconnected systems. In the chat module, the prompt-save functionality is migrated from Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@services/platform/app/features/chat/components/chat-input.tsx`:
- Around line 427-436: The SavePromptMenu is rendered when either onSavePrompt
or onOpenPromptLibrary exists, but the "Prompt Library" item can become a
clickable no-op if onOpenPromptLibrary is missing; update the render to either
require both callbacks or, preferably, pass an explicit flag into SavePromptMenu
(e.g., canOpenPromptLibrary={!!onOpenPromptLibrary}) and keep the current
top-level condition, then modify SavePromptMenu to disable the "Prompt Library"
menu item (render non-clickable/aria-disabled and styled as disabled) when
canOpenPromptLibrary is false so clicks do nothing and accessibility reflects
the disabled state; reference the SavePromptMenu component, the
onOpenPromptLibrary and onSavePrompt props, and the existing canSavePromptDraft
prop when adding this new flag.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e5fc23a4-3099-4d23-a9cb-3aa3bf0528e8
📒 Files selected for processing (13)
services/platform/app/features/automations/components/automations-table.tsxservices/platform/app/features/automations/metrics/metrics-page.tsxservices/platform/app/features/chat/components/chat-header.tsxservices/platform/app/features/chat/components/chat-history-sidebar.tsxservices/platform/app/features/chat/components/chat-input.tsxservices/platform/app/features/chat/components/chat-interface.tsxservices/platform/app/features/chat/components/composer-mode-menu.tsxservices/platform/app/features/chat/components/save-prompt-menu.tsxservices/platform/app/routes/dashboard/$id/automations.tsxservices/platform/app/routes/dashboard/$id/chat.tsxservices/platform/messages/de.jsonservices/platform/messages/en.jsonservices/platform/messages/fr.json
💤 Files with no reviewable changes (1)
- services/platform/app/features/chat/components/composer-mode-menu.tsx
Summary
SavePromptMenusitting next to the composer mode menu, cleaning them out of the mode menu's flow.Clockicon and standardize onshowHistory/hideHistorystrings (drop the unusedopenSidebar/closeSidebarkeys).SearchInputin the automations table.Test plan
/dashboard/:id/automations/metrics— breadcrumb showsAutomations › Metrics; folder breadcrumbs still work elsewhere.SearchInputinstances.en/de/frto confirm no missing strings in these surfaces.Summary by CodeRabbit
New Features
Refactor