Skip to content

feat(platform): split save prompt menu and swap history toggle to clock icon#1589

Merged
Israeltheminer merged 2 commits into
mainfrom
feat/chat-prompt-menu-history-icon
Apr 20, 2026
Merged

feat(platform): split save prompt menu and swap history toggle to clock icon#1589
Israeltheminer merged 2 commits into
mainfrom
feat/chat-prompt-menu-history-icon

Conversation

@Israeltheminer
Copy link
Copy Markdown
Collaborator

@Israeltheminer Israeltheminer commented Apr 20, 2026

Summary

  • Extract save prompt + prompt library actions into a dedicated SavePromptMenu sitting next to the composer mode menu, cleaning them out of the mode menu's flow.
  • Swap the history sidebar toggle to a Clock icon and standardize on showHistory / hideHistory strings (drop the unused openSidebar / closeSidebar keys).
  • Rewrite the history sidebar as a single scroll column with a persisted, collapsible "Archived" section (replaces the tabs-based layout).
  • Add a metrics breadcrumb on the automations layout and use the shared SearchInput in the automations table.

Test plan

  • Open a chat — verify the new bookmark menu appears beside the composer, saving a prompt draft still works, and "Prompt library" opens the dialog.
  • Toggle the history sidebar from the header — icon shows Clock, tooltip reads "Show/Hide history", keyboard shortcut still works.
  • Open the history sidebar — confirm the single scroll column, expand/collapse "Archived", refresh to verify the expanded state persists.
  • Visit /dashboard/:id/automations/metrics — breadcrumb shows Automations › Metrics; folder breadcrumbs still work elsewhere.
  • Search within the automations table — styling matches other SearchInput instances.
  • Quick pass across en / de / fr to confirm no missing strings in these surfaces.

Summary by CodeRabbit

  • New Features

    • Integrated prompt library access in chat interface
    • Added capability to save prompt drafts
    • Collapsible archived section in chat history sidebar
  • Refactor

    • Improved search input component in automations table
    • Simplified metrics page header layout
    • Updated chat history toggle icon

…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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

This PR refactors chat and automations UI components across multiple interconnected systems. In the chat module, the prompt-save functionality is migrated from ComposerModeMenu to a new dedicated SavePromptMenu component, while PromptLibraryDialog is integrated into ChatInterface with state management for opening/closing. The ChatHeader removes the onSelectPrompt prop and updates icon styling for the history toggle. ChatHistorySidebar undergoes structural changes: it removes the tabs-based UI for switching between history and archived sections, replacing it with a collapsible archived section controlled by persisted state. The automations table replaces an inline text input with a SearchInput component, and the metrics page simplifies its header layout. Corresponding i18n strings are added and removed across German, English, and French translations to reflect UI label changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the two primary changes: extracting the save prompt menu and replacing the history sidebar toggle icon with a clock icon.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/chat-prompt-menu-history-icon

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e9deb5a and ff96922.

📒 Files selected for processing (13)
  • services/platform/app/features/automations/components/automations-table.tsx
  • services/platform/app/features/automations/metrics/metrics-page.tsx
  • services/platform/app/features/chat/components/chat-header.tsx
  • services/platform/app/features/chat/components/chat-history-sidebar.tsx
  • services/platform/app/features/chat/components/chat-input.tsx
  • services/platform/app/features/chat/components/chat-interface.tsx
  • services/platform/app/features/chat/components/composer-mode-menu.tsx
  • services/platform/app/features/chat/components/save-prompt-menu.tsx
  • services/platform/app/routes/dashboard/$id/automations.tsx
  • services/platform/app/routes/dashboard/$id/chat.tsx
  • services/platform/messages/de.json
  • services/platform/messages/en.json
  • services/platform/messages/fr.json
💤 Files with no reviewable changes (1)
  • services/platform/app/features/chat/components/composer-mode-menu.tsx

Comment thread services/platform/app/features/chat/components/chat-input.tsx Outdated
@Israeltheminer Israeltheminer merged commit 0b7be62 into main Apr 20, 2026
15 checks passed
@Israeltheminer Israeltheminer deleted the feat/chat-prompt-menu-history-icon branch April 20, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant