Change paths back to not use assistant chat#469
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update removes the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI_Component
participant useAssistantNavigation
User->>UI_Component: Clicks "View" or navigation button
UI_Component->>useAssistantNavigation: Calls createAssistantUrl({ path: "/assistant/rule/123" })
useAssistantNavigation-->>UI_Component: Returns constructed URL with path
UI_Component-->>User: Navigates to new URL
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
apps/web/app/(app)/[emailAccountId]/assistant/FixWithChat.tsxOops! Something went wrong! :( ESLint: 9.24.0 ESLint couldn't find an eslint.config.(js|mjs|cjs) file. From ESLint v9.0.0, the default configuration file is now eslint.config.js. https://eslint.org/docs/latest/use/configure/migration-guide If you still have problems after following the migration guide, please stop by apps/web/hooks/useAssistantNavigation.tsOops! Something went wrong! :( ESLint: 9.24.0 ESLint couldn't find an eslint.config.(js|mjs|cjs) file. From ESLint v9.0.0, the default configuration file is now eslint.config.js. https://eslint.org/docs/latest/use/configure/migration-guide If you still have problems after following the migration guide, please stop by 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
apps/web/app/(app)/[emailAccountId]/assistant/ExecutedRulesTable.tsx(1 hunks)apps/web/app/(app)/[emailAccountId]/assistant/History.tsx(0 hunks)apps/web/app/(app)/[emailAccountId]/assistant/Pending.tsx(0 hunks)apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx(4 hunks)apps/web/app/(app)/[emailAccountId]/automation/page.tsx(2 hunks)apps/web/hooks/useAssistantNavigation.ts(2 hunks)version.txt(1 hunks)
💤 Files with no reviewable changes (2)
- apps/web/app/(app)/[emailAccountId]/assistant/History.tsx
- apps/web/app/(app)/[emailAccountId]/assistant/Pending.tsx
🧰 Additional context used
🧬 Code Graph Analysis (3)
apps/web/app/(app)/[emailAccountId]/automation/page.tsx (1)
apps/web/utils/path.ts (1)
prefixPath(1-4)
apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx (1)
apps/web/utils/path.ts (1)
prefixPath(1-4)
apps/web/hooks/useAssistantNavigation.ts (1)
apps/web/utils/path.ts (1)
prefixPath(1-4)
🔇 Additional comments (9)
version.txt (1)
1-1: Version bump looks appropriate.The version increment from v1.2.22 to v1.2.23 aligns well with the coordinated navigation and UI changes made across multiple files.
apps/web/app/(app)/[emailAccountId]/assistant/ExecutedRulesTable.tsx (1)
104-108: URL generation change looks good.The addition of the explicit
pathparameter aligns with the PR objective of moving away from assistant chat navigation. The path format/assistant/rule/${rule.id}follows REST conventions and maintains consistency with the new navigation pattern.apps/web/app/(app)/[emailAccountId]/automation/page.tsx (2)
5-5: Icon import added correctly.The
SlidersIconimport is properly added to support the new "View Setup" button.
91-98: Well-implemented "View Setup" button.The new button follows React/Next.js best practices:
- Proper use of Button component with
asChildpattern- Correct Link component implementation
- Good responsive design (icon hidden on mobile with
md:block)- Appropriate use of
prefixPathutility for URL generationThis addition enhances the automation page UX by providing direct access to setup configuration.
apps/web/app/(app)/[emailAccountId]/assistant/Rules.tsx (4)
38-38: Clean import removal.Good cleanup removing the unused
setRuleRunOnThreadsActionimport while keeping the neededsetRuleEnabledAction.
198-202: URL generation updated correctly for rule editing.The addition of the explicit
pathparameter with/assistant/rule/${rule.id}aligns with the new navigation pattern and moves away from assistant chat-based routing.
297-301: Consistent URL pattern for history navigation.The explicit
path: "/assistant?tab=history"maintains consistency with the new navigation approach while preserving the tab-based interface for history viewing.
405-410: Navigation redirect to automation section.The link change from
/assistant?tab=promptto/automation?tab=promptproperly redirects the "Add Rule via Prompt" functionality to the automation section, which aligns with the PR's goal of reorganizing the navigation structure.apps/web/hooks/useAssistantNavigation.ts (1)
28-31: Improved type safety with explicit parameter definitions.The change from a generic index signature to explicit optional parameters (
pathandinput) enhances type safety and makes the API more predictable. Thepathparameter with the template literal type/${string}ensures paths always start with a slash, which is good practice.
Summary by CodeRabbit
New Features
Improvements
Other