Skip to content

Change paths back to not use assistant chat#469

Merged
elie222 merged 3 commits intomainfrom
feat/assistant-paths
May 29, 2025
Merged

Change paths back to not use assistant chat#469
elie222 merged 3 commits intomainfrom
feat/assistant-paths

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented May 29, 2025

Summary by CodeRabbit

  • New Features

    • Added a "View Setup" button to the Automation page for easier access to onboarding.
  • Improvements

    • Streamlined navigation and URL generation for rule editing and history views.
    • Updated the "Add Rule via Prompt" button to direct users to the correct location.
    • Improved consistency in navigation behavior across assistant-related pages.
    • Removed outdated "View Setup" button from the assistant rules page.
    • Enhanced URL handling for assistant navigation and redirection.
  • Other

    • Updated version to v1.2.23.
    • Updated package manager version to pnpm 10.11.0.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update removes the isTest prop from the RuleCell component and its usages, changes how URLs are generated for assistant-related navigation to use an explicit path parameter, updates some UI elements and button placements, and increments the application version to v1.2.23.

Changes

File(s) Change Summary
.../assistant/ExecutedRulesTable.tsx, .../assistant/History.tsx, .../assistant/Pending.tsx Removed isTest prop from RuleCell component and its usages. Updated URL generation to use path.
.../assistant/Rules.tsx Updated rule edit/history URLs to use path param. Removed "View Setup" button. Changed prompt button link.
.../automation/page.tsx Added "View Setup" button with SlidersIcon to automation toolbar.
.../hooks/useAssistantNavigation.ts Changed createAssistantUrl param type to use explicit path and input fields. Updated URL logic.
.../assistant/FixWithChat.tsx Added explicit path property to URL generation for redirection logic.
version.txt Updated version from v1.2.22 to v1.2.23.
package.json Updated packageManager field from pnpm@10.8.1+sha512... to pnpm@10.11.0.

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
Loading

Possibly related PRs

  • elie222/inbox-zero#455: Refactors RuleCell to use useAssistantNavigation for URL creation, closely related to URL generation changes here.
  • elie222/inbox-zero#462: Modifies RuleCell and related components in ExecutedRulesTable.tsx, related to UI and prop handling changes.
  • elie222/inbox-zero#469: Removes isTest prop from RuleCell and adds path property to URL generation, directly related.

Poem

A hop and a skip, the URLs are new,
No more isTest—we bid you adieu!
Buttons rearranged, the toolbar's in style,
Version hops forward, mile by mile.
With every small tweak, the code feels just right—
A rabbit’s delight, coding through the night!
🐇✨

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/app/(app)/[emailAccountId]/assistant/FixWithChat.tsx

Oops! 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.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:

https://eslint.org/docs/latest/use/configure/migration-guide

If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.

apps/web/hooks/useAssistantNavigation.ts

Oops! 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.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:

https://eslint.org/docs/latest/use/configure/migration-guide

If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac19155 and 1c12337.

📒 Files selected for processing (2)
  • apps/web/app/(app)/[emailAccountId]/assistant/FixWithChat.tsx (1 hunks)
  • apps/web/hooks/useAssistantNavigation.ts (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link

vercel bot commented May 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
inbox-zero 🛑 Canceled (Inspect) May 29, 2025 11:11am

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a8ddf5b and e4dd5db.

📒 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 path parameter 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 SlidersIcon import 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 asChild pattern
  • Correct Link component implementation
  • Good responsive design (icon hidden on mobile with md:block)
  • Appropriate use of prefixPath utility for URL generation

This 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 setRuleRunOnThreadsAction import while keeping the needed setRuleEnabledAction.


198-202: URL generation updated correctly for rule editing.

The addition of the explicit path parameter 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=prompt to /automation?tab=prompt properly 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 (path and input) enhances type safety and makes the API more predictable. The path parameter with the template literal type /${string} ensures paths always start with a slash, which is good practice.

@elie222 elie222 merged commit ebc3e1e into main May 29, 2025
2 of 4 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Aug 21, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 16, 2025
@elie222 elie222 deleted the feat/assistant-paths branch December 18, 2025 23:01
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

Comments