Skip to content

feat: 워크스페이스 설정페이지 구현 - #33

Merged
Kwon812 merged 9 commits into
developfrom
feat/#31/workspace-settings-page
Jul 10, 2026
Merged

feat: 워크스페이스 설정페이지 구현#33
Kwon812 merged 9 commits into
developfrom
feat/#31/workspace-settings-page

Conversation

@Kwon812

@Kwon812 Kwon812 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pull Request

작업 내용

  • 워크스페이스 설정 페이지를 구현했습니다. 사이드바 설정 메뉴(href: 'settings')로 진입하며, URL 쿼리(?tab=) 기반 3개 탭으로 구성됩니다.
    • 워크스페이스 정보: 이름·설명 수정
    • 팀원 관리: 이메일/초대 링크로 팀원 초대 + 멤버 목록
    • 프로필: 현재 사용자의 워크스페이스 닉네임 수정

작업 결과

  • /workspaces/{workspaceId}/settings 라우트 신설, 사이드바 설정 클릭 시 이동
  • 탭 전환이 URL(?tab=workspace|members|profile)로 관리되어 딥링크·뒤로가기 지원
  • 워크스페이스 정보 탭: 이름/설명 프리필 + 변경 시에만 저장 활성화 + "저장되었습니다" 피드백(목업)
  • 팀원 관리 탭: 이메일 초대(형식 검증·중복 방지) / 초대 링크 복사 토글, 멤버 목록에 역할(팀장/팀원)·상태(참여 중/초대됨) 뱃지
  • 프로필 탭: 닉네임 프리필 + 저장(목업)

변경 사항

Added

  • src/app/workspaces/[workspaceId]/settings/page.tsx — 설정 라우트(RSC). ?tab= 파싱 + 표시 데이터(워크스페이스·멤버·현재 사용자) 조회해 주입
  • src/views/settings/ — 설정 뷰
    • ui/SettingsView.tsx — 레이아웃 + 데이터 주입 + 패널 스위칭
    • ui/SettingsTabs.tsx — 탭 네비게이션(URL 기반, 활성 표시/접근성)
    • model/settings-tab.ts — 탭 정의 및 ?tab= 파싱 헬퍼
    • index.ts — public 배럴
  • src/features/manage-workspace-info/ — 워크스페이스 정보 수정 폼
  • src/features/manage-workspace-members/ — 팀원 초대 섹션 + 멤버 목록 + 상태 훅(MemberManagementPanel / MemberInviteSection / MemberList / useMemberManagement)
  • src/features/manage-member-profile/ — 프로필 닉네임 수정 폼
  • src/shared/ui/badge.tsx — 역할·상태 표시용 Badge(cva, brand/neutral/success/warning 톤)
  • src/entities/workspace-member/config/labels.ts — 역할/상태 → 한글 라벨·뱃지 톤 매핑

Changed

  • src/entities/workspace/model/workspace.types.tsWorkspace.description? 추가
  • src/entities/workspace/model/mock-workspace.ts — 목업 워크스페이스 설명 반영
  • src/entities/workspace-member/model/workspace-member.types.tsemail, status('joined' | 'invited'), WorkspaceMemberRole/WorkspaceMemberStatus 타입 추가
  • src/entities/workspace-member/model/mock-workspace-members.ts — email/status 반영 + team-workspace·side-workspace 멤버 시드 추가
  • src/entities/workspace-member/model/mock-current-workspace-member.ts — email/status 반영
  • src/entities/workspace-member/index.ts — 타입·라벨맵 export 추가

Fixed

  • 해당 없음

실행화면

스크린샷 2026-07-09 오후 1 57 00 스크린샷 2026-07-09 오후 1 57 09 스크린샷 2026-07-09 오후 1 57 17

테스트

  • 로컬 실행 확인 (localhost:3000/workspaces/{id}/settings 3개 탭 SSR 렌더 확인)
  • 주요 시나리오 확인 (탭 전환, 정보/닉네임 저장, 이메일 초대·중복 방지, 링크 복사, 뱃지 표시)
  • 영향 범위 확인 (엔티티 필드 추가에 따른 기존 사용처 컴파일 확인)
  • 타입 체크 / 린트 (tsc --noEmit, eslint src 에러·경고 0)

리뷰 체크리스트

  • PR base branch가 올바릅니다. (feature/* -> develop, 배포 시 develop 또는 release/* -> main)
  • 브랜치명이 Type/#issue-number/description 형식을 따릅니다.
  • 커밋 메시지가 컨벤션을 따릅니다.
  • 불필요한 console.log, 주석, 임시 코드를 제거했습니다.
  • 타입 에러와 린트 에러를 확인했습니다.
  • CodeRabbit 1차 리뷰를 확인했습니다.
  • CodeRabbit 리뷰 반영 후 Discord에 공유했습니다.
  • 최소 1명 이상의 approve 후 merge합니다.

리뷰 요청사항

  • 탭 상태: 서버 searchParams → prop 방식으로 URL 기반 탭을 구현했습니다.
  • 엔티티 확장 영향 범위: WorkspaceMemberemail/status를 필수 필드로 추가하여 목업 데이터 전체를 갱신했습니다. 누락된 사용처가 없는지 봐주시면 좋겠습니다.

알려진 한계 (후속 이슈 후보)

  • db미연동으로 목업으로 사용

관련 이슈

Closes #31

Summary by CodeRabbit

  • New Features
    • 워크스페이스 설정 화면을 추가하고, 탭에서 워크스페이스 정보/멤버/개인 프로필을 전환할 수 있게 했습니다.
    • 멤버 초대를 이메일 또는 초대 링크로 진행하고, 멤버 목록에서 역할/상태 배지를 함께 확인할 수 있습니다.
    • 워크스페이스 소개(설명)와 개인/프로필 닉네임을 편집하는 폼을 추가했습니다.
  • Bug Fixes
    • 최근 회의록 위젯이 워크스페이스별 데이터로 표시되도록 개선했습니다.
    • 회의록 표시 및 관련 UI 스타일을 정리했습니다.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 63ecef38-fa21-4312-8ce2-d23f638cd50f

📥 Commits

Reviewing files that changed from the base of the PR and between d2f2d4b and 0f2da5b.

📒 Files selected for processing (1)
  • src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx

📝 Walkthrough

Walkthrough

워크스페이스 설정 페이지와 워크스페이스·멤버 편집 기능을 추가했습니다. 설정 탭 내비게이션, 멤버 초대·목록, 프로필·워크스페이스 정보 폼과 mock 데이터를 연결했으며, RecentNotes의 워크스페이스별 조회 및 여러 UI 스타일을 조정했습니다.

Changes

워크스페이스 설정 기능

Layer / File(s) Summary
워크스페이스 및 멤버 모델 확장
src/entities/workspace/..., src/entities/workspace-member/..., src/shared/ui/badge.tsx
워크스페이스 설명과 멤버 이메일·상태·역할 타입, 라벨 메타데이터, Badge 컴포넌트를 추가했습니다.
설정 탭 모델 및 라우트
src/views/settings/model/settings-tab.ts, src/views/settings/index.ts, src/app/workspaces/[workspaceId]/settings/page.tsx
탭 정의·파서와 설정 라우트를 추가하고 mock 워크스페이스·멤버 데이터를 SettingsView에 전달합니다.
설정 뷰 및 탭 내비게이션
src/views/settings/ui/*
탭 링크와 활성 탭별 워크스페이스 정보·멤버 관리·프로필 패널 렌더링을 추가했습니다.
워크스페이스 정보 편집
src/features/manage-workspace-info/*
워크스페이스 이름·설명을 편집하고 로컬 mock 저장 상태를 표시하는 폼을 추가했습니다.
멤버 초대 및 목록 관리
src/features/manage-workspace-members/*
이메일·링크 초대, 클립보드 복사, 중복 검증, mock 멤버 추가, 역할·상태 배지를 구현했습니다.
프로필 닉네임 편집
src/features/manage-member-profile/*
현재 사용자의 닉네임을 편집하고 mock 저장 완료 메시지를 표시하는 폼을 추가했습니다.

회의록 데이터 및 UI 변경

Layer / File(s) Summary
회의록 카드 및 export 형식
src/entities/meeting-note/index.ts, src/entities/meeting-note/ui/MeetingNoteCard.tsx
타입 export와 카드 JSX·Tailwind 형식을 조정했습니다.
워크스페이스별 최근 회의록
src/widgets/side-project/dashboard-recent-notes/ui/RecentNotes.tsx
workspaceId 기반 조회를 사용하고 meetingDate, decisions 필드를 렌더링합니다.

스타일 및 리팩터링 조정

Layer / File(s) Summary
회의록 폼 및 목록 스타일
src/features/manage-meeting-notes/ui/*
회의록 폼과 목록의 Tailwind 클래스 구성을 조정했습니다.
대시보드 콜백 및 일정 형식
src/features/dashboard/edit-layout/model/useDashboardLayout.ts, src/widgets/store-operation/dashboard-work-schedule/ui/WorkScheduleSummary.tsx
레이아웃 콜백 표현과 근무 일정 JSX 형식을 단순화했습니다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant WorkspaceSettingsPage
  participant SettingsView
  participant MemberManagementPanel
  participant useMemberManagement
  participant MemberInviteSection
  User->>WorkspaceSettingsPage: 설정 페이지 요청
  WorkspaceSettingsPage->>SettingsView: 워크스페이스·멤버·활성 탭 전달
  SettingsView->>MemberManagementPanel: 멤버 탭 렌더링
  MemberManagementPanel->>useMemberManagement: 멤버 관리 상태 초기화
  useMemberManagement-->>MemberManagementPanel: 초대 상태와 멤버 목록 반환
  MemberManagementPanel->>MemberInviteSection: 초대 UI와 핸들러 전달
  User->>MemberInviteSection: 이메일 초대 제출
  MemberInviteSection->>useMemberManagement: inviteByEmail 호출
  useMemberManagement->>useMemberManagement: 초대 멤버 추가 및 이메일 초기화
Loading

Possibly related PRs

Suggested reviewers: 0011810, JiWoongE, wjswlgh96

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 회의록/대시보드/근무요약 등 설정 페이지와 무관한 변경이 함께 포함되어 있습니다. 설정 페이지와 직접 관련 없는 변경은 별도 PR로 분리하거나 이번 PR에서 제거해 주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 워크스페이스 설정 페이지 구현이라는 핵심 변경을 명확히 요약합니다.
Description check ✅ Passed 작업 내용, 결과, 변경 사항, 테스트, 리뷰 체크리스트, 이슈 연결이 템플릿에 맞게 대부분 채워졌습니다.
Linked Issues check ✅ Passed 설정 페이지, URL 탭 전환, 멤버 관리, 프로필 수정, 타입·목업 확장이 이슈 #31의 요구사항을 충족합니다.
✨ 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 feat/#31/workspace-settings-page

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
src/widgets/side-project/dashboard-recent-notes/ui/RecentNotes.tsx (1)

19-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Magic default workspaceId.

Defaulting to the literal 'test' string is fragile mock-data coupling; if the widget catalog (context snippet 1) never passes a real workspaceId, this widget will silently always show test data regardless of the actual workspace context.

🤖 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 `@src/widgets/side-project/dashboard-recent-notes/ui/RecentNotes.tsx` at line
19, The RecentNotes component is using a fragile magic default for workspaceId
by falling back to the literal test value. Update RecentNotes so it no longer
silently defaults to mock data; require the caller or surrounding widget context
to provide the real workspaceId, and if a fallback is still needed make it come
from the actual workspace context rather than a hardcoded string. Use
RecentNotesProps and RecentNotes to locate the prop handling and remove the test
coupling.
src/entities/workspace-member/config/labels.ts (1)

5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

BadgeTone is redefined here instead of imported from shared/ui/badge.

The comment notes this must match the Badge component's tone prop, but redefining the type creates two sources of truth that can silently drift. Since entities may import from shared under the FSD direction (app → views → widgets → features → entities → shared), prefer importing the tone type from src/shared/ui/badge.tsx instead.

♻️ Suggested refactor
-// Badge 컴포넌트의 tone 값과 일치시킵니다.
-export type BadgeTone = 'brand' | 'neutral' | 'success' | 'warning';
+// Badge 컴포넌트의 tone 값과 동일한 타입을 그대로 재사용합니다.
+import type { BadgeTone } from '`@/shared/ui/badge`';
+export type { BadgeTone };

I don't have src/shared/ui/badge.tsx in this review batch to confirm its exported tone type shape; please verify it exports a compatible type before applying this change.

Based on coding guidelines: "Follow the FSD import direction app → views → widgets → features → entities → shared."

🤖 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 `@src/entities/workspace-member/config/labels.ts` at line 5, BadgeTone is being
duplicated in the workspace-member labels config instead of reusing the shared
Badge component type. Update the labels config to import the tone type from the
shared badge module (the Badge component’s exported tone prop type) and remove
the local redefinition so there is a single source of truth. Verify the shared
badge export is compatible before wiring it in, and keep the import direction
consistent with FSD by referencing shared from the entity layer.

Source: Coding guidelines

src/shared/ui/badge.tsx (1)

6-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Tone union duplicated in workspace-member/config/labels.ts.

The BadgeTone type in labels.ts manually re-declares this same union with a comment noting it "must match" the Badge tone values. Deriving it from badgeVariants instead removes the risk of the two drifting out of sync.

♻️ Proposed fix
 type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants>;
+
+export type BadgeTone = NonNullable<VariantProps<typeof badgeVariants>['tone']>;

Then in labels.ts, import and reuse this type instead of redeclaring the literal union.

🤖 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 `@src/shared/ui/badge.tsx` around lines 6 - 21, The Badge tone union is
duplicated and can drift from the source of truth in badgeVariants. Expose the
tone type from the badge component setup (or derive it directly from
badgeVariants) and update workspace-member/config/labels.ts to import and reuse
that type instead of redeclaring the literal union. Keep the tone variants
defined in badgeVariants as the single authoritative list so any future changes
stay in sync.
src/views/settings/ui/SettingsView.tsx (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Unnecessary 'use client' on a purely presentational shell.

This component has no hooks/state/handlers of its own; it just branches on activeTab. It could stay a Server Component, letting only the interactive children (already client components) cross the boundary, slightly trimming the client bundle.

🤖 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 `@src/views/settings/ui/SettingsView.tsx` at line 1, The SettingsView component
is marked as a client component unnecessarily even though it only renders based
on activeTab and has no hooks, state, or event handlers. Remove the 'use client'
directive from SettingsView so it can remain a Server Component, and keep the
interactive tab content in the already client-side child components.
src/features/manage-workspace-members/ui/MemberInviteSection.tsx (1)

82-92: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider linking the duplicate-email error to the input via aria-describedby.

aria-invalid is set on the input but the error text at Line 129 isn't associated with it, so screen readers won't announce the reason for invalidity.

♿️ Optional accessibility improvement
             <input
               type="email"
               value={email}
               onChange={(event) => onChangeEmail(event.target.value)}
               placeholder="초대할 이메일"
               aria-invalid={isDuplicate || undefined}
+              aria-describedby={isDuplicate ? 'invite-email-error' : undefined}
               className="h-11 w-full rounded-2xl bg-slate-100 px-4 text-sm font-medium text-slate-900 outline-none placeholder:text-slate-400 focus:ring-2 focus:ring-indigo-300"
             />
...
       {inviteMode === 'email' && isDuplicate ? (
-        <p className="mt-1 text-sm font-medium text-rose-500">이미 초대된 이메일이에요.</p>
+        <p id="invite-email-error" className="mt-1 text-sm font-medium text-rose-500">이미 초대된 이메일이에요.</p>
       ) : null}

Also applies to: 128-130

🤖 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 `@src/features/manage-workspace-members/ui/MemberInviteSection.tsx` around
lines 82 - 92, The duplicate-email validation in MemberInviteSection is not
associated with the email input for assistive tech. Update the email input in
MemberInviteSection so it uses aria-describedby to point to the duplicate-error
message rendered below, and ensure that message has a stable id the input can
reference while keeping aria-invalid in sync with isDuplicate.
🤖 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 `@src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx`:
- Around line 1-6: The WorkspaceInfoForm component is using a React namespace
type without importing React, which breaks type-checking in this setup. Update
the imports at the top of WorkspaceInfoForm.tsx to bring in FormEvent from react
alongside useState, and change the form handler type annotation in
WorkspaceInfoForm to use FormEvent<HTMLFormElement> instead of
React.FormEvent<HTMLFormElement>.
- Around line 14-19: The WorkspaceInfoForm state is only initialized from
workspace.name and workspace.description on first mount, so switching workspaces
can leave stale values in the inputs. Update WorkspaceInfoForm to resync its
local form state when workspace.id changes, either by adding a key based on
workspace.id in the parent SettingsView or by using a useEffect inside
WorkspaceInfoForm to reset committedName, committedDescription, name,
description, and isSaved whenever the workspace changes.

---

Nitpick comments:
In `@src/entities/workspace-member/config/labels.ts`:
- Line 5: BadgeTone is being duplicated in the workspace-member labels config
instead of reusing the shared Badge component type. Update the labels config to
import the tone type from the shared badge module (the Badge component’s
exported tone prop type) and remove the local redefinition so there is a single
source of truth. Verify the shared badge export is compatible before wiring it
in, and keep the import direction consistent with FSD by referencing shared from
the entity layer.

In `@src/features/manage-workspace-members/ui/MemberInviteSection.tsx`:
- Around line 82-92: The duplicate-email validation in MemberInviteSection is
not associated with the email input for assistive tech. Update the email input
in MemberInviteSection so it uses aria-describedby to point to the
duplicate-error message rendered below, and ensure that message has a stable id
the input can reference while keeping aria-invalid in sync with isDuplicate.

In `@src/shared/ui/badge.tsx`:
- Around line 6-21: The Badge tone union is duplicated and can drift from the
source of truth in badgeVariants. Expose the tone type from the badge component
setup (or derive it directly from badgeVariants) and update
workspace-member/config/labels.ts to import and reuse that type instead of
redeclaring the literal union. Keep the tone variants defined in badgeVariants
as the single authoritative list so any future changes stay in sync.

In `@src/views/settings/ui/SettingsView.tsx`:
- Line 1: The SettingsView component is marked as a client component
unnecessarily even though it only renders based on activeTab and has no hooks,
state, or event handlers. Remove the 'use client' directive from SettingsView so
it can remain a Server Component, and keep the interactive tab content in the
already client-side child components.

In `@src/widgets/side-project/dashboard-recent-notes/ui/RecentNotes.tsx`:
- Line 19: The RecentNotes component is using a fragile magic default for
workspaceId by falling back to the literal test value. Update RecentNotes so it
no longer silently defaults to mock data; require the caller or surrounding
widget context to provide the real workspaceId, and if a fallback is still
needed make it come from the actual workspace context rather than a hardcoded
string. Use RecentNotesProps and RecentNotes to locate the prop handling and
remove the test coupling.
🪄 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: 8f2faf01-c063-4f5d-a382-c527a8013e50

📥 Commits

Reviewing files that changed from the base of the PR and between 2672f79 and d2f2d4b.

📒 Files selected for processing (32)
  • src/app/workspaces/[workspaceId]/settings/page.tsx
  • src/entities/meeting-note/index.ts
  • src/entities/meeting-note/ui/MeetingNoteCard.tsx
  • src/entities/side-project/meeting-note/index.ts
  • src/entities/side-project/meeting-note/model/meeting-note.mock.ts
  • src/entities/side-project/meeting-note/model/meeting-note.types.ts
  • src/entities/workspace-member/config/labels.ts
  • src/entities/workspace-member/index.ts
  • src/entities/workspace-member/model/mock-current-workspace-member.ts
  • src/entities/workspace-member/model/mock-workspace-members.ts
  • src/entities/workspace-member/model/workspace-member.types.ts
  • src/entities/workspace/model/mock-workspace.ts
  • src/entities/workspace/model/workspace.types.ts
  • src/features/dashboard/edit-layout/model/useDashboardLayout.ts
  • src/features/manage-meeting-notes/ui/MeetingNoteForm.tsx
  • src/features/manage-meeting-notes/ui/MeetingNotesList.tsx
  • src/features/manage-member-profile/index.ts
  • src/features/manage-member-profile/ui/MemberProfileForm.tsx
  • src/features/manage-workspace-info/index.ts
  • src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx
  • src/features/manage-workspace-members/index.ts
  • src/features/manage-workspace-members/model/use-member-management.ts
  • src/features/manage-workspace-members/ui/MemberInviteSection.tsx
  • src/features/manage-workspace-members/ui/MemberList.tsx
  • src/features/manage-workspace-members/ui/MemberManagementPanel.tsx
  • src/shared/ui/badge.tsx
  • src/views/settings/index.ts
  • src/views/settings/model/settings-tab.ts
  • src/views/settings/ui/SettingsTabs.tsx
  • src/views/settings/ui/SettingsView.tsx
  • src/widgets/side-project/dashboard-recent-notes/ui/RecentNotes.tsx
  • src/widgets/store-operation/dashboard-work-schedule/ui/WorkScheduleSummary.tsx
💤 Files with no reviewable changes (3)
  • src/entities/side-project/meeting-note/model/meeting-note.mock.ts
  • src/entities/side-project/meeting-note/index.ts
  • src/entities/side-project/meeting-note/model/meeting-note.types.ts

Comment thread src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx
Comment on lines +14 to +19
const [committedName, setCommittedName] = useState(workspace.name);
const [committedDescription, setCommittedDescription] = useState(workspace.description ?? '');

const [name, setName] = useState(workspace.name);
const [description, setDescription] = useState(workspace.description ?? '');
const [isSaved, setIsSaved] = useState(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the relevant files and inspect the component/parent usage.
git ls-files 'src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx' 'src/**/*SettingsView*' 'src/**/*settings*' 'src/**/*workspace*' | sed -n '1,200p'

echo
echo "=== WorkspaceInfoForm.tsx ==="
nl -ba src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx | sed -n '1,220p'

echo
echo "=== Search for WorkspaceInfoForm usage ==="
rg -n "WorkspaceInfoForm" src

echo
echo "=== Search for workspaceId / key usage near settings views ==="
rg -n "workspaceId|key=\\{workspace\\.id\\}|WorkspaceInfoForm" src

Repository: TeampleRun/syncly

Length of output: 2968


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== WorkspaceInfoForm.tsx ==="
cat -n src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx | sed -n '1,240p'

echo
echo "=== SettingsView.tsx ==="
cat -n src/views/settings/ui/SettingsView.tsx | sed -n '1,260p'

echo
echo "=== app settings page ==="
cat -n src/app/workspaces/[workspaceId]/settings/page.tsx | sed -n '1,240p'

echo
echo "=== Search for WorkspaceInfoForm usage and key props ==="
rg -n "WorkspaceInfoForm|key=\\{workspace\\.id\\}|key=\\{.*workspace.*\\}" src/views src/app src/features

Repository: TeampleRun/syncly

Length of output: 8276


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== workspace layout ==="
cat -n src/app/workspaces/[workspaceId]/layout.tsx | sed -n '1,240p'

echo
echo "=== workspace page ==="
cat -n src/app/workspaces/[workspaceId]/page.tsx | sed -n '1,240p'

echo
echo "=== dashboard page (for key usage example) ==="
cat -n src/app/workspaces/[workspaceId]/dashboard/page.tsx | sed -n '1,240p'

Repository: TeampleRun/syncly

Length of output: 2913


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== WorkspaceShell.tsx ==="
cat -n src/widgets/workspace-shell/ui/WorkspaceShell.tsx | sed -n '1,260p'

echo
echo "=== Search for workspaceId keys in workspace shell ==="
rg -n "key=\\{workspaceId\\}|key=\\{.*workspaceId.*\\}" src/widgets/workspace-shell src/views/settings src/app/workspaces

Repository: TeampleRun/syncly

Length of output: 1842


Reset the form when workspace changes. useState only reads workspace.name/workspace.description on the first mount, and SettingsView doesn’t key WorkspaceInfoForm by workspaceId, so switching to another workspace can leave the previous workspace’s values in the inputs. Add a reset on workspace.id change (for example, a key={workspace.id} or a useEffect sync).

🤖 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 `@src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx` around lines 14
- 19, The WorkspaceInfoForm state is only initialized from workspace.name and
workspace.description on first mount, so switching workspaces can leave stale
values in the inputs. Update WorkspaceInfoForm to resync its local form state
when workspace.id changes, either by adding a key based on workspace.id in the
parent SettingsView or by using a useEffect inside WorkspaceInfoForm to reset
committedName, committedDescription, name, description, and isSaved whenever the
workspace changes.

@seongjinss555 seongjinss555 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

해당 사항 수정하시고 진행하면 좋을 거 같습니다~

Comment thread src/features/manage-workspace-info/ui/WorkspaceInfoForm.tsx
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.

feat: 설정 페이지 구현

2 participants