Skip to content

Feature/#75 build error fix#76

Merged
yiyoonseo merged 2 commits into
developfrom
feature/#75-build_error-fix
May 29, 2026
Merged

Feature/#75 build error fix#76
yiyoonseo merged 2 commits into
developfrom
feature/#75-build_error-fix

Conversation

@yiyoonseo
Copy link
Copy Markdown
Contributor

@yiyoonseo yiyoonseo commented May 29, 2026

🔗 관련 이슈

#75

  • Close #

📝 개요

  • 빌드 에러 수정

⌨️ 작업 상세 내용

  • 빌드 에러 수정
  • 미들웨어 -> 프록시 변경

💡 코드 설명 및 참고사항

📸 스크린샷 (UI 변경 시)

🔍 리뷰 요구사항 (Reviewers)

  • [ ]

⚠️ 로컬 실행 시 유의사항

Summary by CodeRabbit

  • Refactor

    • Removed mock application home interface components and utilities as part of internal code restructuring.
  • Chores

    • Updated internal proxy function naming conventions.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

📝 Walkthrough

Walkthrough

This PR removes the entire mock-application home UI module—including eight UI component files, shared utilities, step definitions, and type exports—and makes two independent corrections: fixing import syntax in a downstream consumer and renaming the proxy middleware export function.

Changes

Mock-application home module removal

Layer / File(s) Summary
Component and utility removal
jobdri/src/components/mock-application/home/*, jobdri/src/components/mockApply/MockApplicationHomePageClient.tsx
Deletes all UI components (PausedApplicationCard, ResultApplicationCard, ApplicationCardShared, ApplicationKebabButton, ApplicationProgressSteps, EmptyApplicationState, MockApplicationHomeIntro, SavedApplicationsModal), utilities (applicationHomeUtils.ts), step definitions (homeSteps.ts), type definitions (types.ts), and re-exports from index.ts. Corrects import syntax in MockApplicationHomePageClient.tsx to handle the removal.

Proxy middleware export rename

Layer / File(s) Summary
Middleware function rename
jobdri/src/proxy.ts
Renames the exported request handler from middleware to proxy while preserving the function signature and route-matching configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • minnngo

Poem

🐰 The home screen fades away,
Components cleared, utilities removed,
A proxy renamed finds its way—
The mock-apply stage improved.
Fresh code paths beckon, clean and light. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Feature/#75 build error fix' accurately reflects the main objective—fixing build errors. However, it lacks specificity about the scope of changes (12 files deleted/modified across multiple components and utilities).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#75-build_error-fix

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

Copy link
Copy Markdown

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
jobdri/src/proxy.ts (1)

21-23: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

config.matcher export is only effective in a middleware file.

The config export with matcher is a Next.js middleware convention that only works when placed in a file named middleware.ts. Since this file is proxy.ts, this config will be ignored by Next.js.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@jobdri/src/proxy.ts` around lines 21 - 23, The exported config object
(config.matcher) in proxy.ts is ignored because Next.js only reads that
convention from a middleware file; move the config export into a proper
middleware file (create or update middleware.ts) or rename proxy.ts to
middleware.ts so Next.js will recognize it, ensuring the existing matcher value
("/((?!_next/static|_next/image|favicon.ico|.*\\..*).*)") remains unchanged and
referenced alongside any middleware handler functions (e.g., the request
handler) so routing rules are applied.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@jobdri/src/proxy.ts`:
- Line 6: The proxy function defined as proxy(request: NextRequest) won't be
invoked by Next.js because middleware must be exported from a file named
middleware.ts/ts or via an exported symbol named middleware; update the
entrypoint by either renaming/moving the current proxy file to middleware.ts and
change its export to export function middleware(request: NextRequest) { ... }
(keeping the existing logic), or add a new middleware.ts that exports function
middleware(request: NextRequest) { return proxy(request) } so Next.js sees the
middleware; ensure the exported middleware uses the NextRequest/NextResponse
signatures your logic expects and preserves any imports used by proxy.

---

Outside diff comments:
In `@jobdri/src/proxy.ts`:
- Around line 21-23: The exported config object (config.matcher) in proxy.ts is
ignored because Next.js only reads that convention from a middleware file; move
the config export into a proper middleware file (create or update middleware.ts)
or rename proxy.ts to middleware.ts so Next.js will recognize it, ensuring the
existing matcher value ("/((?!_next/static|_next/image|favicon.ico|.*\\..*).*)")
remains unchanged and referenced alongside any middleware handler functions
(e.g., the request handler) so routing rules are applied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a11bbc61-df07-4ea1-b5a9-3531b3f91534

📥 Commits

Reviewing files that changed from the base of the PR and between d9f6bb5 and 0043069.

📒 Files selected for processing (14)
  • jobdri/src/components/mock-application/home/ApplicationCardShared.tsx
  • jobdri/src/components/mock-application/home/ApplicationKebabButton.tsx
  • jobdri/src/components/mock-application/home/ApplicationProgressSteps.tsx
  • jobdri/src/components/mock-application/home/EmptyApplicationState.tsx
  • jobdri/src/components/mock-application/home/MockApplicationHomeIntro.tsx
  • jobdri/src/components/mock-application/home/PausedApplicationCard.tsx
  • jobdri/src/components/mock-application/home/ResultApplicationCard.tsx
  • jobdri/src/components/mock-application/home/SavedApplicationsModal.tsx
  • jobdri/src/components/mock-application/home/applicationHomeUtils.ts
  • jobdri/src/components/mock-application/home/homeSteps.ts
  • jobdri/src/components/mock-application/home/index.ts
  • jobdri/src/components/mock-application/home/types.ts
  • jobdri/src/components/mockApply/MockApplicationHomePageClient.tsx
  • jobdri/src/proxy.ts
💤 Files with no reviewable changes (12)
  • jobdri/src/components/mock-application/home/MockApplicationHomeIntro.tsx
  • jobdri/src/components/mock-application/home/ResultApplicationCard.tsx
  • jobdri/src/components/mock-application/home/EmptyApplicationState.tsx
  • jobdri/src/components/mock-application/home/ApplicationKebabButton.tsx
  • jobdri/src/components/mock-application/home/PausedApplicationCard.tsx
  • jobdri/src/components/mock-application/home/ApplicationProgressSteps.tsx
  • jobdri/src/components/mock-application/home/SavedApplicationsModal.tsx
  • jobdri/src/components/mock-application/home/index.ts
  • jobdri/src/components/mock-application/home/homeSteps.ts
  • jobdri/src/components/mock-application/home/applicationHomeUtils.ts
  • jobdri/src/components/mock-application/home/types.ts
  • jobdri/src/components/mock-application/home/ApplicationCardShared.tsx

Comment thread jobdri/src/proxy.ts
const PUBLIC_ROUTES = ["/login", "/oauth2"];

export function middleware(request: NextRequest) {
export function proxy(request: NextRequest) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if a separate middleware.ts exists that might import/re-export this proxy function
echo "=== Searching for middleware.ts files ==="
fd -i 'middleware\.(ts|js)$'

echo ""
echo "=== Checking if any file imports the proxy function from proxy.ts ==="
rg -n "from ['\"].*proxy['\"]" --type=ts --type=js

echo ""
echo "=== Looking for any middleware exports ==="
rg -n "export.*middleware" --type=ts --type=js

Repository: JobDri-Developer/FrontEnd

Length of output: 226


Fix Next.js middleware entrypoint—proxy won’t be picked up
Next.js middleware requires a middleware.ts/middleware.js exporting middleware. This repo has no middleware.ts/middleware.js, no export.*middleware occurrences, and no imports referencing proxy, so the auth redirect logic in jobdri/src/proxy.ts will not run. Rename/move it back to middleware.ts and export function middleware(...) (or add a middleware.ts wrapper that exports middleware and calls proxy).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@jobdri/src/proxy.ts` at line 6, The proxy function defined as proxy(request:
NextRequest) won't be invoked by Next.js because middleware must be exported
from a file named middleware.ts/ts or via an exported symbol named middleware;
update the entrypoint by either renaming/moving the current proxy file to
middleware.ts and change its export to export function middleware(request:
NextRequest) { ... } (keeping the existing logic), or add a new middleware.ts
that exports function middleware(request: NextRequest) { return proxy(request) }
so Next.js sees the middleware; ensure the exported middleware uses the
NextRequest/NextResponse signatures your logic expects and preserves any imports
used by proxy.

@yiyoonseo yiyoonseo merged commit 045cb83 into develop May 29, 2026
1 check passed
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