Skip to content

Conversation

@oriNuguri25
Copy link
Collaborator

@oriNuguri25 oriNuguri25 commented Aug 26, 2025

작업 내용

문제점 및 어려움

해결 방안

공유 사항

Summary by CodeRabbit

  • Style

    • Tightened login vertical spacing and reduced Cancel button horizontal padding for a sleeker UI; no behavior changes.
  • Chores

    • API endpoints and client calls now use store public codes (string) instead of numeric IDs.
    • Order response includes a new publicCode field.
    • Removed an external /orders rewrite from deployment config.

@coderabbitai
Copy link

coderabbitai bot commented Aug 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Replaced numeric store identifiers with string public codes across API functions and their callers; added publicCode to an order response type; removed a Vercel rewrite for /orders; plus minor presentational spacing/padding tweaks in login and cancel modal components.

Changes

Cohort / File(s) Summary of Changes
API: store identifier → publicCode
apps/nowait-user/src/api/menu.ts, apps/nowait-user/src/api/order.ts, apps/nowait-user/src/api/reservation.ts
Changed functions to accept publicCode: string instead of numeric storeId (updated endpoint paths to use publicCode). Signatures updated for getStoreMenus, getStoreMenu, createOrder, getOrderDetails, getStorePayments, and getStore. Return types and error handling preserved.
Call sites: pass string publicCode (remove Number coercion)
apps/nowait-user/src/pages/order/... (e.g. StorePage.tsx, OrderDetailsPage.tsx, OrderListPage.tsx, RemittancePage.tsx, RemittanceWaitPage.tsx, addMenu/AddMenuPage.tsx), apps/nowait-user/src/pages/waiting/... (e.g. WaitingSummaryPage.tsx, storeDetail/StoreDetailPage.tsx)
Updated useQuery / createOrder call sites to pass storeId (string) directly to the updated API functions instead of coercing to Number; removed one console.log(store) and added one console.log(menus, "asd").
Types: order response
apps/nowait-user/src/types/order/order.ts
Added required field publicCode: string to CreateOrderServerResponse.response.
Vercel config: removed rewrite
apps/nowait-user/vercel.json
Removed the /orders/:path* rewrite that proxied to https://nowait.co.kr/orders/:path*. Other rewrites/headers unchanged.
UI: minor presentational tweaks
apps/nowait-user/src/pages/login/LoginPage.tsx, apps/nowait-user/src/pages/home/components/CancelWaitingModal.tsx
Login: reduced top margins (mt-15mt-10, mt-16mt-12.5). Cancel modal: removed px-3 from Cancel button className. No logic changes.

Sequence Diagram(s)

sequenceDiagram
    participant UI as Frontend Page Components
    participant API as local API wrappers (menu.ts / order.ts / reservation.ts)
    participant BE as Backend (nowait services)

    Note over UI,API: User-triggered flows now pass publicCode (string)

    UI->>API: getStoreMenus(publicCode)
    API->>BE: GET /v1/menus/{publicCode}
    BE-->>API: 200 menus
    API-->>UI: menus

    UI->>API: createOrder(publicCode, tableId, payload)
    API->>BE: POST /orders/create/{publicCode}/{tableId}
    BE-->>API: 201 { response: { storeId, publicCode, storeName, ... } }
    API-->>UI: createOrder response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • merge to main #376 — Modifies createOrder and getOrderDetails in apps/nowait-user/src/api/order.ts (overlapping API changes).
  • Develop #373 — Changes the /orders rewrite in apps/nowait-user/vercel.json (directly related to removed rewrite).
  • Develop #233 — Modifies getStoreMenus / getStoreMenu signatures in apps/nowait-user/src/api/menu.ts (directly related).

Suggested reviewers

  • dgKim1

Poem

A rabbit hops with publicCode in paw,
Strings not numbers now guide the draw.
Margins trimmed, a button sleek and small,
Rewrites dropped, the endpoints heed the call.
Tiny hops — big changes, nimble and raw. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 48eaa19 and 350118e.

📒 Files selected for processing (13)
  • apps/nowait-user/src/api/menu.ts (2 hunks)
  • apps/nowait-user/src/api/order.ts (1 hunks)
  • apps/nowait-user/src/api/reservation.ts (1 hunks)
  • apps/nowait-user/src/pages/order/addMenu/AddMenuPage.tsx (1 hunks)
  • apps/nowait-user/src/pages/order/home/StorePage.tsx (1 hunks)
  • apps/nowait-user/src/pages/order/orderDetails/OrderDetailsPage.tsx (1 hunks)
  • apps/nowait-user/src/pages/order/orderList/OrderListPage.tsx (1 hunks)
  • apps/nowait-user/src/pages/order/remittance/RemittancePage.tsx (1 hunks)
  • apps/nowait-user/src/pages/order/remittenceWait/RemittanceWaitPage.tsx (1 hunks)
  • apps/nowait-user/src/pages/waiting/WaitingSummary/WaitingSummaryPage.tsx (1 hunks)
  • apps/nowait-user/src/pages/waiting/storeDetail/StoreDetailPage.tsx (1 hunks)
  • apps/nowait-user/src/types/order/order.ts (1 hunks)
  • apps/nowait-user/vercel.json (0 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@github-actions github-actions bot requested a review from hwangdae August 26, 2025 08:05
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 (5)
apps/nowait-user/src/pages/home/components/CancelWaitingModal.tsx (3)

36-41: Centering classes are ineffective without display:flex; add type and loading-safe attrs

items-center/justify-center won’t apply unless the button is a flex container. Also, default type is "submit" which can accidentally submit a surrounding form. While we’re here, disabling the button during isLoading prevents double-interactions.

Apply this diff within the button tag:

-            <button
-              onClick={onClose}
-              className="flex-1 py-2.5 rounded-[10px] bg-black-20 text-[16px] font-semibold leading-[136%] tracking-normal text-black-65 items-center justify-center"
-            >
+            <button
+              type="button"
+              onClick={onClose}
+              disabled={isLoading}
+              className="flex flex-1 py-2.5 rounded-[10px] bg-black-20 text-[16px] font-semibold leading-[136%] tracking-normal text-black-65 items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
+            >

19-20: Optional: guard against modal dismissal while loading

If a cancel request is in-flight, consider preventing accidental close via the overlay. A simple pattern is to no-op the onClick when isLoading is true.

Example:

<div
  className="fixed inset-0 bg-black/60 z-50"
  onClick={isLoading ? undefined : onClose}
/>

44-49: Mirror loading-safety and semantics on the Confirm button

For consistency, add type="button", disabled while loading, and optionally aria-busy for a11y. Consider a small spinner if available in your design system.

Example:

<button
  type="button"
  onClick={onConfirm}
  disabled={isLoading}
  aria-busy={isLoading}
  className="flex flex-1 py-2.5 rounded-[10px] bg-primary text-[16px] font-semibold leading-[136%] tracking-normal text-white-100 items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
>
  {isLoading ? "취소 중..." : "확인"}
</button>
apps/nowait-user/src/pages/login/LoginPage.tsx (2)

14-19: Replace non-standard element with semantic HTML for accessibility

isn’t a valid HTML element. Use a semantic heading (h1/h2) or a span/p with appropriate roles for better a11y and SEO.

Example:

<h1 className="text-headline-28-bold text-black-100">
  기다림 없는
  <br />
  우리의 즐거운 축제
</h1>

9-9: Consider 100svh for more reliable mobile viewport height

h-[100dvh] can cause layout jumps under mobile browser UI chrome. 100svh is often a safer fit for full-height sections on mobile.

Example:

<div className="flex flex-col px-6 overflow-x-hidden min-h-[100svh]">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 53d7109 and 48eaa19.

📒 Files selected for processing (2)
  • apps/nowait-user/src/pages/home/components/CancelWaitingModal.tsx (1 hunks)
  • apps/nowait-user/src/pages/login/LoginPage.tsx (2 hunks)
🔇 Additional comments (2)
apps/nowait-user/src/pages/login/LoginPage.tsx (2)

10-12: LGTM: reduced top margin for header block

mt-15 → mt-10 tightens the top whitespace; looks consistent with the overall spacing scale.


20-24: LGTM: tightened spacing around the hero image

mt-16 → mt-12.5 should bring the visual above-the-fold content higher without affecting layout logic.

@hwangdae hwangdae merged commit 438cb39 into main Aug 26, 2025
1 of 2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 10, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jan 1, 2026
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.

3 participants