iachat/app/javascript/dashboard/components-next
Sivin Varghese 5bf39d20e5
feat: Update Captain navigation structure (#12761)
# Pull Request Template

## Description

This PR includes an update to the Captain navigation structure.

## Route Structure

```javascript
1. captain_assistants_responses_index    → /captain/:assistantId/faqs
2. captain_assistants_documents_index    → /captain/:assistantId/documents
3. captain_assistants_scenarios_index    → /captain/:assistantId/scenarios
4. captain_assistants_playground_index   → /captain/:assistantId/playground
5. captain_assistants_inboxes_index      → /captain/:assistantId/inboxes
6. captain_tools_index                   → /captain/tools
7. captain_assistants_settings_index     → /captain/:assistantId/settings
8. captain_assistants_guardrails_index   → /captain/:assistantId/settings/guardrails
9. captain_assistants_guidelines_index   → /captain/:assistantId/settings/guidelines
10. captain_assistants_index             → /captain/:navigationPath
```

**How it works:**

1. User clicks sidebar item → Routes to `captain_assistants_index` with
`navigationPath`
2. `AssistantsIndexPage` validates route and gets last active assistant,
if not redirects to assistant create page.
3. Routes to actual page: `/captain/:assistantId/:page`
4. Page loads with correct assistant context

Fixes
https://linear.app/chatwoot/issue/CW-5832/updating-captain-navigation

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?




## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2025-11-06 16:31:23 -08:00
..
Accordion feat: Allow customizing the responses, flows in Captain (#11385) 2025-04-29 15:42:15 -07:00
AssignmentPolicy chore: Assignment policy improvements (#12429) 2025-09-16 14:10:10 +05:30
avatar fix: RTL issues in new conversation form (#12163) 2025-08-11 14:16:48 -07:00
banner chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
breadcrumb chore: Optimize contact page for smaller displays (#12183) 2025-08-14 19:07:20 +05:30
button feat: Enhance button interactions (#12738) 2025-11-06 16:24:05 +05:30
buttonGroup feat: Enhance button interactions (#12738) 2025-11-06 16:24:05 +05:30
Campaigns feat: WhatsApp enhanced templates front end changes (#12117) 2025-08-12 18:53:19 +05:30
captain feat: Update Captain navigation structure (#12761) 2025-11-06 16:31:23 -08:00
changelog-card feat: Changelog card components (#12673) 2025-10-27 14:39:49 +05:30
checkbox feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
colorpicker chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
combobox feat: Enhance button interactions (#12738) 2025-11-06 16:24:05 +05:30
Contacts feat: Bulk delete for contacts (#12778) 2025-11-04 17:47:53 -08:00
content-templates feat: Add twilio content templates (#12277) 2025-08-29 16:13:25 +05:30
Conversation feat: Enhance button interactions (#12738) 2025-11-06 16:24:05 +05:30
copilot feat: Update Captain navigation structure (#12761) 2025-11-06 16:31:23 -08:00
CustomAttributes feat(v4): Add new contact details screen (#10504) 2024-12-03 21:29:47 -08:00
dialog feat: Add Teleport component to fix RTL/LTR utility classes (#11455) 2025-05-12 11:49:23 -07:00
dropdown-menu fix: add scrollbar to search bar dropdown (#12362) 2025-09-04 01:25:13 -07:00
Editor fix: Add empty line before signature in compose conversation editor (#12702) 2025-11-06 14:05:52 +05:30
feature-spotlight chore: Hide "Learn More" button in feature spotlight for self-hosted (#12675) 2025-10-16 12:04:53 +05:30
filter fix: Remove unnecessary scroll bars from filter dropdown (#12515) 2025-09-24 20:55:52 +05:30
flag feat: Flag icon component (#10564) 2024-12-10 11:53:24 +05:30
HelpCenter feat: Enhance button interactions (#12738) 2025-11-06 16:24:05 +05:30
icon feat: Update Inbox/Team creation UI (#12305) 2025-09-02 14:11:38 +05:30
Inbox chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
inline-input chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
input feat: Add the frontend support for MFA (#12372) 2025-09-18 21:16:06 +05:30
Label feat: Agent capacity policy Create/Edit pages (#12424) 2025-09-12 18:42:55 +05:30
message fix: Video bubble click and play issue (#12764) 2025-11-05 15:40:11 +05:30
NewConversation fix: Add empty line before signature in compose conversation editor (#12702) 2025-11-06 14:05:52 +05:30
pagination chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
phonenumberinput fix: Accidental contact creation on country dropdown toggle (#11494) 2025-05-16 16:14:00 +05:30
selectmenu feat: Update conversation basic filter (#11415) 2025-05-06 12:44:23 +05:30
sidebar feat: Update Captain navigation structure (#12761) 2025-11-06 16:31:23 -08:00
spinner feat: Add Spinner to new components (#10303) 2024-10-16 17:53:46 -07:00
switch chore: Migrate to next Switch component (#12005) 2025-07-23 13:56:17 +05:30
tabbar feat: Enhance button interactions (#12738) 2025-11-06 16:24:05 +05:30
taginput fix: RTL issues in new conversation form (#12163) 2025-08-11 14:16:48 -07:00
textarea chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
whatsapp feat: Add media_name support for WhatsApp templates document files (#12462) 2025-09-18 15:25:31 +05:30
CardLayout.vue feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
EmptyStateLayout.vue chore: Improvements in pending FAQs (#12755) 2025-10-29 14:34:28 -07:00
SidebarActionsHeader.story.vue feat: Update the UI to support the change for Copilot as a universal copilot (#11618) 2025-05-29 12:35:10 +05:30
SidebarActionsHeader.vue feat: Update the UI to support the change for Copilot as a universal copilot (#11618) 2025-05-29 12:35:10 +05:30
TeleportWithDirection.vue feat: Add Teleport component to fix RTL/LTR utility classes (#11455) 2025-05-12 11:49:23 -07:00