Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@masabinhok
Copy link
Contributor

@masabinhok masabinhok commented Jul 18, 2025

Description

This PR introduces a back navigation button to the top-right corner of the Create Search Space page. The button is styled with MoveLeftIcon and redirects users to /dashboard using next/navigation.

Fixes: #196

Why

Improves UX by giving users an intuitive way to return to the dashboard without relying on browser navigation.

Changes

Imported MoveLeftIcon from lucide-react

Used router.push('/dashboard') to handle navigation

Styled button with hover effect and gradient feedback

Summary by CodeRabbit

  • New Features

    • Added a button with a back arrow icon to the header of the search space form, allowing users to quickly navigate back to the dashboard.
  • Style

    • Updated the form header layout for improved alignment and spacing between the title, description, and the new navigation button.

@vercel
Copy link

vercel bot commented Jul 18, 2025

@masabinhok is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jul 18, 2025

Walkthrough

A back button with a left-arrow icon was added to the header of the Search Space form. This button uses Next.js routing to navigate the user to the dashboard page when clicked. The header layout was updated to align the title, description, and new button horizontally.

Changes

File(s) Change Summary
surfsense_web/components/search-space-form.tsx Added back button with MoveLeftIcon, integrated Next.js router for navigation, updated header layout

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SearchSpaceForm
    participant Router

    User->>SearchSpaceForm: Clicks Back Button
    SearchSpaceForm->>Router: router.push('/dashboard')
    Router-->>User: Navigates to /dashboard
Loading

Poem

A button appears, a leftward glance,
Now hopping back, you get the chance.
With a single click, you’re on your way,
To the dashboard, without delay!
🐇⬅️✨

✨ 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.

@recurseml
Copy link

recurseml bot commented Jul 18, 2025

✨ No issues found! Your code is sparkling clean! ✨

Need help? Join our Discord for support!
https://discord.gg/qEjHQk64Z9

Copy link

@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: 0

🧹 Nitpick comments (1)
surfsense_web/components/search-space-form.tsx (1)

120-143: Enhance accessibility and consider configurability.

The back button implementation is well-styled and functional, but could benefit from accessibility improvements and better maintainability.

Consider these improvements:

        <button
+         aria-label="Go back to dashboard"
+         title="Back to Dashboard"
          className="group relative rounded-full p-3 bg-background/80 hover:bg-muted border border-border hover:border-primary/20 shadow-sm hover:shadow-md transition-all duration-200 backdrop-blur-sm"
          onClick={() => {
            router.push('/dashboard')
          }}
        >
          <MoveLeftIcon
            size={18}
            className="text-muted-foreground group-hover:text-foreground transition-colors duration-200"
          />
-         <div className="absolute inset-0 rounded-full bg-gradient-to-r from-blue-500/10 to-purple-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
        </button>

Optional considerations:

  • Add aria-label and title for better accessibility
  • Consider making the navigation route configurable via props
  • The gradient overlay might be unnecessary visual complexity
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 63d0603 and d8fceb7.

📒 Files selected for processing (1)
  • surfsense_web/components/search-space-form.tsx (7 hunks)
🔇 Additional comments (4)
surfsense_web/components/search-space-form.tsx (4)

6-6: LGTM! Clean import addition.

The MoveLeftIcon import is correctly added to the existing lucide-react imports and follows the established pattern.


36-36: LGTM! Correct Next.js navigation import.

The useRouter import from "next/navigation" is the correct choice for Next.js 13+ app router navigation.


63-63: LGTM! Proper router instance creation.

The router instance is correctly created using the useRouter hook and follows React conventions.


144-145: Formatting changes look good.

The spacing adjustments maintain consistent code formatting.

@MODSetter
Copy link
Owner

@masabinhok Thanks 👍

@MODSetter MODSetter merged commit d5aae6b into MODSetter:main Jul 18, 2025
2 of 3 checks passed
CREDO23 pushed a commit to CREDO23/SurfSense that referenced this pull request Jul 25, 2025
…backButton

fix(ui): Add back button in Create Search Space Page
aptdnfapt pushed a commit to aptdnfapt/SurfSense that referenced this pull request Oct 19, 2025
…backButton

fix(ui): Add back button in Create Search Space Page
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.

fix(ui): Add back button in Create Search Space Page

2 participants