Skip to content

feat: display loading ui during search form submission#106

Open
is0692vs wants to merge 2 commits intomainfrom
fix-loading-ui-5049051895702448144
Open

feat: display loading ui during search form submission#106
is0692vs wants to merge 2 commits intomainfrom
fix-loading-ui-5049051895702448144

Conversation

@is0692vs
Copy link
Contributor

Implemented a loading UI indicator in the SearchForm component using Next.js useTransition.

This addresses the user's request to show a "Loading..." message during the search process.

Changes made:

  • Updated src/components/SearchForm.tsx to include useTransition.
  • Wrapped the router.push call inside startTransition.
  • Display "Loading..." text on the submit button while isPending is true.
  • Disable the search button when the transition is pending.

PR created automatically by Jules for task 5049051895702448144 started by @is0692vs

Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel
Copy link

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-user-summary Ready Ready Preview, Comment Mar 21, 2026 7:00am

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience by introducing a loading state for the search functionality. When a user submits the search form, a 'Loading...' message is displayed, and the button is disabled until the navigation completes. This provides clear visual feedback, preventing users from attempting multiple submissions and improving the perceived responsiveness of the application.

Highlights

  • Loading UI Implementation: Implemented a loading indicator in the SearchForm component to provide visual feedback during search form submissions.
  • Next.js useTransition Integration: Utilized Next.js useTransition hook to manage pending states for the search navigation, ensuring a smooth user experience.
  • Dynamic Button State: The search button now displays 'Loading...' text and is disabled while a search transition is in progress.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a loading indicator to the search form, improving user experience by providing feedback during submission. The implementation using useTransition is correct and well-executed. My review includes two main points: the removal of an accidentally committed log file, and the removal of an unused dependency to maintain a clean codebase. Otherwise, the changes look good.

Comment on lines +1 to +25

> github-user-summary@0.1.0 dev
> next dev

▲ Next.js 16.1.6 (Turbopack)
- Local: http://localhost:3000
- Network: http://192.168.0.2:3000

✓ Starting...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

✓ Ready in 1107ms
○ Compiling / ...
GET / 200 in 8.9s (compile: 8.5s, render: 444ms)
GET / 200 in 91ms (compile: 7ms, render: 84ms)
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url
GET / 200 in 70ms (compile: 6ms, render: 64ms)
GET /api/auth/session 200 in 54ms (compile: 38ms, render: 16ms)
⚠ metadataBase property in metadata export is not set for resolving social open graph or twitter images, using "http://localhost:3000". See https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadatabase
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url

Choose a reason for hiding this comment

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

high

This log file appears to have been accidentally committed. Log files from local development should not be part of the source repository as they can contain sensitive information and unnecessarily increase the repository size. Please remove this file and add *.log to your .gitignore file to prevent this from happening in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

high

This log file appears to have been accidentally committed. Log files from local development should not be part of the source repository as they can contain sensitive information and unnecessarily increase the repository size. Please remove this file and add *.log to your .gitignore file to prevent this from happening in the future.

@jules

package.json Outdated
"colord": "^2.9.3",
"fast-average-color": "^9.5.0",
"html-to-image": "^1.11.13",
"lucide-react": "^0.577.0",

Choose a reason for hiding this comment

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

medium

The lucide-react dependency was added in this pull request, but it doesn't seem to be used anywhere in the codebase. To keep the project's dependencies clean and the bundle size minimal, it's best to remove unused packages. If this package is intended for future use, it should be introduced in a separate pull request when it's actually used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

medium

The lucide-react dependency was added in this pull request, but it doesn't seem to be used anywhere in the codebase. To keep the project's dependencies clean and the bundle size minimal, it's best to remove unused packages. If this package is intended for future use, it should be introduced in a separate pull request when it's actually used.

@jules

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed the unused lucide-react dependency to keep the bundle size minimal. Thank you for pointing this out!

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d92e5056-fe50-4abb-a0e9-6cf254aaeebb

📥 Commits

Reviewing files that changed from the base of the PR and between 278eccb and 70e113e.

📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Summary by CodeRabbit

リリースノート

  • New Features
    • 検索フォームに読み込み状態(トランジション)が追加されました。検索実行中はボタンが無効化され、ラベルが "Loading..." に切り替わります。これにより操作中の状態が視覚的に明確になり、誤操作を減らします。

Walkthrough

SearchForm コンポーネントの送信処理をトランジションでラップして遷移中の状態を管理する変更と、package.json に末尾改行を追加する小さなファイル修正が含まれます(機能や公開APIの宣言変更は無し)。

Changes

Cohort / File(s) Summary
パッケージファイル
package.json
ファイル末尾に欠けていた改行を追加(内容・依存関係の変更なし)。
フォーム遷移処理
src/components/SearchForm.tsx
router.push(...)startTransition(...) でラップして遷移をトランジション化。ボタンの無効化条件に isPending を追加し、遷移中はラベルを "Loading..." に切り替え。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 うさぎが跳ねてコードを覗くよ
トランジションで軽やかに行こうよ
Loading は光る、待つは優雅
末尾の改行もそっと整えたよ
さあ送信、ふわりと進め 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
Title check ✅ Passed The pull request title 'feat: display loading ui during search form submission' directly and clearly describes the main change in SearchForm.tsx, which is adding a loading UI during form submission.
Description check ✅ Passed The pull request description is directly related to the changeset, providing clear details about the implementation of loading UI using Next.js useTransition hook in SearchForm.tsx.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-loading-ui-5049051895702448144

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

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

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: 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 `@package.json`:
- Line 21: Remove the unused dependency "lucide-react" from package.json because
there are no imports (e.g., SearchForm.tsx) or usages anywhere in the codebase;
delete the "lucide-react" entry, run your package manager to update node_modules
and the lockfile (npm install / yarn install), and double-check that no files
import from "lucide-react" before committing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a626eba9-8f46-4f9c-9050-879988ee471f

📥 Commits

Reviewing files that changed from the base of the PR and between 90ecfee and 278eccb.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • server.log is excluded by !**/*.log
📒 Files selected for processing (2)
  • package.json
  • src/components/SearchForm.tsx

Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant